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 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/.github/workflows/cronet.yml b/.github/workflows/cronet.yml index 0b35e16aae..0976a756ff 100644 --- a/.github/workflows/cronet.yml +++ b/.github/workflows/cronet.yml @@ -6,10 +6,12 @@ on: - main - master paths: + - '.github/workflows/cronet.yaml' - 'pkgs/cronet_http/**' - 'pkgs/http_client_conformance_tests/**' pull_request: paths: + - '.github/workflows/cronet.yaml' - 'pkgs/cronet_http/**' - 'pkgs/http_client_conformance_tests/**' schedule: @@ -19,50 +21,48 @@ 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@v3 + - 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@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 + 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: playstore - arch: x86_64 + target: ${{ matrix.package == 'cronet_http_embedded' && 'google_apis' || 'playstore' }} 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/.github/workflows/cupertino.yml b/.github/workflows/cupertino.yml index 83fd796e76..6617635ce2 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" @@ -26,17 +28,22 @@ jobs: run: working-directory: pkgs/cupertino_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 - # pins version 1.21.1 or later of 'package:test' - channel: 'master' + channel: 'stable' - id: install name: Install dependencies run: flutter pub get - name: Check formatting - run: flutter 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 @@ -46,19 +53,35 @@ 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: working-directory: pkgs/cupertino_http/example steps: - - uses: actions/checkout@v3 - - uses: futureware-tech/simulator-action@v1 + - uses: actions/checkout@v4 + - uses: futureware-tech/simulator-action@v3 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' + flutter-version: ${{ matrix.flutter-version }} + channel: 'stable' - name: Run tests - run: 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/.github/workflows/dart.yml b/.github/workflows/dart.yml index 780b5715ef..3cb8d19d33 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.6.1 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@704facf57e6136b1bc63b828d79edcd491f0ee84 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable" @@ -29,46 +29,37 @@ 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@b64355ae6ca0b5d484f0106a033dd1388965d06d with: sdk: stable - id: checkout name: Checkout repository - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - name: mono_repo self validate - run: dart pub global activate mono_repo 6.5.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: - name: "analyze_and_format; Dart 2.19.0; PKGS: pkgs/http, 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@627f0f41f6904a5b1efbaed9f96d9eb58e92e920 + uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 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: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-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@a57a6c04cf7d4840e88432aad6281d1e125f0d46 + uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d with: - sdk: "2.19.0" + sdk: "3.0.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 analyze --fatal-infos" - run: dart analyze --fatal-infos - if: "always() && steps.pkgs_http_pub_upgrade.conclusion == 'success'" - working-directory: pkgs/http + 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 @@ -78,27 +69,66 @@ 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_003: - name: "analyze_and_format; Dart dev; PKGS: pkgs/http, pkgs/http_client_conformance_tests; `dart analyze --fatal-infos`" + 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@627f0f41f6904a5b1efbaed9f96d9eb58e92e920 + 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:3.2.0;packages:pkgs/http;commands:analyze_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: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_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: + - 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_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 os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46 + uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d with: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -117,27 +147,36 @@ 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: - name: "analyze_and_format; Dart dev; PKGS: pkgs/http, pkgs/http_client_conformance_tests; `dart format --output=none --set-exit-if-changed .`" + - 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; 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 - uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920 + 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 - name: Setup Dart SDK - uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46 + uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d with: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -156,27 +195,134 @@ 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`" + - 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: "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: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_profile; `dart test --platform vm`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920 + uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 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;packages:pkgs/http_profile;commands:test_2" 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;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@a57a6c04cf7d4840e88432aad6281d1e125f0d46 + uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d with: - sdk: "2.19.0" + sdk: "3.0.0" - id: checkout name: Checkout repository - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c + 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_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: + - 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 @@ -191,27 +337,30 @@ 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_006 + - job_007 + job_010: + 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@627f0f41f6904a5b1efbaed9f96d9eb58e92e920 + uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 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.2.0;packages:pkgs/http;commands:test_3" 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.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@a57a6c04cf7d4840e88432aad6281d1e125f0d46 + uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d with: - sdk: "2.19.0" + sdk: "3.2.0" - id: checkout name: Checkout repository - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -226,27 +375,30 @@ 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_006 + - job_007 + job_011: + 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@627f0f41f6904a5b1efbaed9f96d9eb58e92e920 + uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 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.2.0;packages:pkgs/http;commands:test_2" 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.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@a57a6c04cf7d4840e88432aad6281d1e125f0d46 + uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d with: - sdk: "2.19.0" + sdk: "3.2.0" - id: checkout name: Checkout repository - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -261,27 +413,30 @@ jobs: - job_002 - job_003 - job_004 - 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`" + - job_005 + - job_006 + - job_007 + 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: - name: Cache Pub hosted dependencies - uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920 + 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 os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46 + uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d with: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -296,27 +451,30 @@ jobs: - job_002 - job_003 - job_004 - job_009: - name: "unit_test; Dart dev; PKG: pkgs/http; `dart test --platform chrome`" + - job_005 + - job_006 + - job_007 + job_013: + 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@627f0f41f6904a5b1efbaed9f96d9eb58e92e920 + 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 os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46 + uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d with: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -331,27 +489,30 @@ jobs: - job_002 - job_003 - job_004 - job_010: - name: "unit_test; Dart dev; PKG: pkgs/http; `dart test --platform vm`" + - job_005 + - job_006 + - job_007 + job_014: + 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@627f0f41f6904a5b1efbaed9f96d9eb58e92e920 + 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_2" 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 - name: Setup Dart SDK - uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46 + uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d with: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -361,8 +522,200 @@ 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 + - job_003 + - job_004 + - job_005 + - 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: + - 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_017: + 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_018: + 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_019: + 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/.github/workflows/java.yml b/.github/workflows/java.yml new file mode 100644 index 0000000000..ec1b9da029 --- /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@v4 + - 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@v4 + - 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/.github/workflows/pull_request_label.yml b/.github/workflows/pull_request_label.yml index 26758a596e..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@5c7539237e04b714afd8ad9b4aed733815b9fab4 + - uses: actions/labeler@ac9175f8a1f3625fd0d4fb234536d26811351594 with: repo-token: "${{ secrets.GITHUB_TOKEN }}" sync-labels: true 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/analysis_options.yaml b/analysis_options.yaml index 7d741bd4f1..f45f6c9689 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -8,21 +8,16 @@ analyzer: linter: rules: - - avoid_bool_literals_in_conditional_expressions - - avoid_classes_with_only_static_members - - avoid_private_typedef_functions - - 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 + - avoid_bool_literals_in_conditional_expressions + - avoid_classes_with_only_static_members + - avoid_private_typedef_functions + - avoid_returning_this + - avoid_unused_constructor_parameters + - cascade_invocations + - join_return_with_assignment + - missing_whitespace_between_adjacent_strings + - no_adjacent_strings_in_list + - no_runtimeType_toString + - prefer_const_declarations + - prefer_expression_function_bodies + - use_string_buffers 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 3be15bc399..cf1fcbc208 100644 --- a/pkgs/cronet_http/CHANGELOG.md +++ b/pkgs/cronet_http/CHANGELOG.md @@ -1,6 +1,40 @@ -## 0.2.1-dev +## 1.0.0 + +* No functional changes. + +## 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 + +* Require `package:jni >= 0.7.1` so that depending on `package:cronet_http` + does not break macOS builds. + +* Fix obsolete `CronetClient()` constructor usage. + +## 0.4.0 + +* Use more efficient operations when copying bytes between Java and Dart. + +## 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 +* Throw `ClientException` when the `'Content-Length'` header is invalid. + +## 0.2.1 * Require Dart 2.19 +* Support `package:http` 1.0.0 ## 0.2.0 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/android/build.gradle b/pkgs/cronet_http/android/build.gradle index 665c659da5..96bb197c73 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 { @@ -38,11 +43,24 @@ android { sourceSets { main.java.srcDirs += 'src/main/kotlin' - main.java.srcDirs += 'src/main/java' } defaultConfig { - minSdkVersion 16 + // 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 { + consumerProguardFiles 'consumer-rules.pro' + } + + buildTypes { + release { + minifyEnabled false + } } } 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/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/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/android/app/build.gradle b/pkgs/cronet_http/example/android/app/build.gradle index d42d02a0da..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 flutter.minSdkVersion + // 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 @@ -67,4 +71,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/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/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/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 fdbc6b999f..61f11a7b01 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); } @@ -46,6 +43,7 @@ class HomePage extends StatefulWidget { class _HomePageState extends State { List? _books; + String? _lastQuery; @override void initState() { @@ -68,6 +66,7 @@ class _HomePageState extends State { } void _runSearch(String query) async { + _lastQuery = query; if (query.isEmpty) { setState(() { _books = null; @@ -76,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; }); @@ -130,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..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: ">=2.19.0 <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/jnigen.yaml b/pkgs/cronet_http/jnigen.yaml new file mode 100644 index 0000000000..a16d38f48d --- /dev/null +++ b/pkgs/cronet_http/jnigen.yaml @@ -0,0 +1,27 @@ +# Regenerate bindings with `dart run jnigen --config jnigen.yaml`. + +summarizer: + backend: asm + +android_sdk_config: + add_gradle_deps: true + android_example: 'example/' + +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.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/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 8799d43166..272b602b3d 100644 --- a/pkgs/cronet_http/lib/src/cronet_client.dart +++ b/pkgs/cronet_http/lib/src/cronet_client.dart @@ -15,14 +15,13 @@ library; import 'dart:async'; -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 Finalizer _cronetEngineFinalizer = Finalizer(_api.freeEngine); +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 { @@ -34,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. /// @@ -69,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, @@ -77,37 +76,158 @@ 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); + } + + if (enableQuic != null) { + builder.enableQuic(enableQuic); + } + + if (userAgent != null) { + builder.setUserAgent(userAgent.toJString()); } - throw Exception(response.errorString); + + 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(','))); + +jb.UrlRequestCallbackProxy_UrlRequestCallbackInterface _urlRequestCallbacks( + BaseRequest request, Completer responseCompleter) { + StreamController>? responseStream; + JByteBuffer? jByteBuffer; + 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, + )); + + jByteBuffer = JByteBuffer.allocateDirect(_bufferSize); + urlRequest.read(jByteBuffer!); + }, + 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(); + responseStream! + .add(jByteBuffer!.asUint8List().sublist(0, byteBuffer.remaining)); + + byteBuffer.clear(); + urlRequest.read(byteBuffer); + }, + onSucceeded: (urlRequest, responseInfo) { + responseStream!.sink.close(); + jByteBuffer?.release(); + }, + 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(); + } + jByteBuffer?.release(); + }, + )); +} + /// A HTTP [Client] based on the /// [Cronet](https://developer.android.com/guide/topics/connectivity/cronet) /// network stack. @@ -115,7 +235,7 @@ class CronetEngine { /// 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) { @@ -132,9 +252,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 @@ -142,14 +263,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]. /// @@ -167,9 +290,6 @@ class CronetClient extends BaseClient { /// runWithClient(() => runApp(const BookSearchApp()), clientFactory); /// } /// ``` - factory CronetClient.fromCronetEngineFuture(Future engine) => - CronetClient._(engine, false); - @override void close() { if (!_isClosed && _ownedEngine) { @@ -185,26 +305,19 @@ 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; + + final builder = engine.newUrlRequestBuilder( + request.url.toString().toJString(), + jb.UrlRequestCallbackProxy.new1( + _urlRequestCallbacks(request, responseCompleter)), + _executor, + )..setHttpMethod(request.method.toJString()); var headers = request.headers; if (body.isNotEmpty && @@ -213,67 +326,13 @@ 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); - } - responseDataController.close(); + if (body.isNotEmpty) { + builder.setUploadDataProvider( + jb.UploadDataProviders.create2(body.toJByteBuffer()), _executor); } - - 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(','))); - - final contentLengthHeader = responseHeaders['content-length']; - return StreamedResponse(responseDataController.stream, result.statusCode, - contentLength: contentLengthHeader == null - ? null - : int.tryParse(contentLengthHeader), - reasonPhrase: result.statusText, - request: request, - isRedirect: result.isRedirect, - headers: responseHeaders); + 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 new file mode 100644 index 0000000000..c8df6936f2 --- /dev/null +++ b/pkgs/cronet_http/lib/src/jni/jni_bindings.dart @@ -0,0 +1,2635 @@ +// 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: 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 + +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 { + @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, + 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'); + + /// 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 jni.JByteBufferType(), 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, jni.JByteBuffer 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, + jni.JByteBuffer 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, jni.JByteBuffer 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, + jni.JByteBuffer 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, + jni.JByteBuffer 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); +} + +final 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, + 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'); + + /// 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(); +} + +final 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(); +} + +final 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.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); +} + +final 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(); +} + +final 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_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); +} + +final 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(); + 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); +} + +final 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); +} + +final 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( + jni.JByteBuffer 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); +} + +final 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_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); +} + +final 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, + 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'); + + /// 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(); +} + +final 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; +} + +final 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(); +} + +final 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( + jni.JByteBuffer 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(); +} + +final 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); +} + +final 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; +} + +final 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/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; - } - } -} 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 9745e61a9e..5f4229ebf8 100644 --- a/pkgs/cronet_http/pubspec.yaml +++ b/pkgs/cronet_http/pubspec.yaml @@ -1,21 +1,22 @@ name: cronet_http -description: > +version: 1.0.0 +description: >- An Android Flutter plugin that provides access to the Cronet HTTP client. -version: 0.2.1-dev 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: flutter: sdk: flutter - http: ^0.13.4 + http: '>=0.13.4 <2.0.0' + jni: ^0.7.2 dev_dependencies: - dart_flutter_team_lints: ^1.0.0 - pigeon: ^3.2.3 + dart_flutter_team_lints: ^2.0.0 + jnigen: ^0.7.0 xml: ^6.1.0 yaml_edit: ^2.0.3 @@ -23,5 +24,4 @@ flutter: plugin: platforms: android: - package: io.flutter.plugins.cronet_http - pluginClass: CronetHttpPlugin + ffiPlugin: true diff --git a/pkgs/cronet_http/tool/prepare_for_embedded.dart b/pkgs/cronet_http/tool/prepare_for_embedded.dart index 8791a2f500..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,7 +43,7 @@ final _cronetVersionUri = Uri.https( 'android/maven2/org/chromium/net/group-index.xml', ); -void main() async { +void main(List args) async { if (Directory.current.path.endsWith('tool')) { _packageDirectory = Directory.current.parent; } else { @@ -51,6 +54,8 @@ void main() async { updateCronetDependency(latestVersion); updatePubSpec(); updateReadme(); + updateLibraryName(); + updateImports(); } Future _getLatestCronetVersion() async { @@ -69,7 +74,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(); @@ -83,23 +88,53 @@ void updateCronetDependency(String latestVersion) { print('Patching $newImplementation'); final newGradleContent = gradleContent.replaceAll( implementationRegExp, - ' implementation $newImplementation', + ' implementation "$newImplementation"', ); 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 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', + ); +} diff --git a/pkgs/cronet_http/tool/run_pigeon.sh b/pkgs/cronet_http/tool/run_pigeon.sh deleted file mode 100644 index d147e02992..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" - -flutter format lib/src/messages.dart diff --git a/pkgs/cupertino_http/CHANGELOG.md b/pkgs/cupertino_http/CHANGELOG.md index cc290c28d7..d768f7a5c7 100644 --- a/pkgs/cupertino_http/CHANGELOG.md +++ b/pkgs/cupertino_http/CHANGELOG.md @@ -1,3 +1,31 @@ +## 1.2.0 + +* Add support for setting additional http headers in + `URLSessionConfiguration`. + +## 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`. +* 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 + +* Remove experimental status from "Readme" + +## 1.0.0 + +* Require Dart 3.0 +* Require Flutter 3.10.0 + ## 0.1.2 * Require Dart 2.19 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/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/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..1becd5c049 --- /dev/null +++ b/pkgs/cupertino_http/example/integration_test/client_test.dart @@ -0,0 +1,66 @@ +// 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: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); + unawaited(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 new file mode 100644 index 0000000000..12128b5b9a --- /dev/null +++ b/pkgs/cupertino_http/example/integration_test/main.dart @@ -0,0 +1,46 @@ +// 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 '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; +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(); + 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(); + 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(); +} 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_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/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/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 0c5c56b2ec..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,12 +5,153 @@ 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'; -void testURLSessionTask( - URLSessionTask Function(URLSession session, Uri url) f) { +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('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( + Uri.parse('ws://localhost:${server.port}/?noclose'))) + ..resume(); + await task + .sendMessage(URLSessionWebSocketMessage.fromString('Hello World!')); + await task.receiveMessage(); + task.cancelWithCloseCode(4998, Data.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.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 testURLSessionTaskCommon( + URLSessionTask Function(URLSession session, Uri url) f, + {bool suspendedAfterCancel = false}) { group('task states', () { late HttpServer server; late URLSessionTask task; @@ -44,7 +185,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. }); @@ -74,7 +219,7 @@ void testURLSessionTask( 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' @@ -223,12 +368,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(); } 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..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); } @@ -41,6 +44,7 @@ class HomePage extends StatefulWidget { class _HomePageState extends State { List? _books; + String? _lastQuery; @override void initState() { @@ -63,6 +67,7 @@ class _HomePageState extends State { } void _runSearch(String query) async { + _lastQuery = query; if (query.isEmpty) { setState(() { _books = null; @@ -71,6 +76,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/cupertino_http/example/pubspec.yaml b/pkgs/cupertino_http/example/pubspec.yaml index fd8938989b..bae184b71c 100644 --- a/pkgs/cupertino_http/example/pubspec.yaml +++ b/pkgs/cupertino_http/example/pubspec.yaml @@ -6,7 +6,8 @@ publish_to: 'none' version: 1.0.0+1 environment: - sdk: ">=2.19.0 <3.0.0" + sdk: ^3.0.0 + flutter: '>=3.10.0' dependencies: cached_network_image: ^3.2.3 @@ -15,10 +16,13 @@ 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 + convert: ^3.1.1 + crypto: ^3.0.3 + dart_flutter_team_lints: ^2.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 b4cd26c595..3e535933a9 100644 --- a/pkgs/cupertino_http/ffigen.yaml +++ b/pkgs/cupertino_http/ffigen.yaml @@ -8,24 +8,30 @@ 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/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/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' 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/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/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/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 diff --git a/pkgs/cupertino_http/lib/src/cupertino_api.dart b/pkgs/cupertino_http/lib/src/cupertino_api.dart index 2157dd9f1f..5cebd7ed42 100644 --- a/pkgs/cupertino_http/lib/src/cupertino_api.dart +++ b/pkgs/cupertino_http/lib/src/cupertino_api.dart @@ -26,11 +26,13 @@ /// ``` 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 'native_cupertino_bindings.dart' as ncb; @@ -111,12 +113,82 @@ 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, +} + +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 { +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 @@ -126,13 +198,16 @@ class Error extends _ObjectHolder { /// 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.' /// - /// 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); @@ -150,6 +225,7 @@ class Error extends _ObjectHolder { @override String toString() => '[Error ' + 'domain=$domain ' 'code=$code ' 'localizedDescription=$localizedDescription ' 'localizedFailureReason=$localizedFailureReason ' @@ -157,37 +233,78 @@ class Error extends _ObjectHolder { ']'; } +/// 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) 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 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() => - 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. /// @@ -212,12 +329,47 @@ 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) 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). @@ -226,10 +378,10 @@ 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. + /// 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) => @@ -266,9 +418,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) => @@ -315,6 +467,7 @@ class URLSessionConfiguration 'allowsConstrainedNetworkAccess=$allowsConstrainedNetworkAccess ' 'allowsExpensiveNetworkAccess=$allowsExpensiveNetworkAccess ' 'discretionary=$discretionary ' + 'httpAdditionalHeaders=$httpAdditionalHeaders ' 'httpCookieAcceptPolicy=$httpCookieAcceptPolicy ' 'httpShouldSetCookies=$httpShouldSetCookies ' 'httpMaximumConnectionsPerHost=$httpMaximumConnectionsPerHost ' @@ -334,14 +487,14 @@ 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)); /// 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); @@ -354,6 +507,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) @@ -400,7 +557,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); @@ -492,6 +649,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) @@ -512,7 +717,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() { @@ -608,18 +813,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 +834,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 +869,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) @@ -673,11 +981,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. /// @@ -691,9 +996,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]; @@ -773,6 +1078,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); } @@ -809,18 +1121,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; @@ -949,6 +1270,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( @@ -965,36 +1331,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. /// @@ -1032,19 +1417,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 @@ -1059,18 +1460,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 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._( - ncb.NSURLSessionConfiguration.castFrom(_nsObject.configuration!)); + ncb.NSURLSessionConfiguration.castFrom(_nsObject.configuration!), + isBackground: _isBackground); /// A description of the session that may be useful for debugging. /// @@ -1154,4 +1559,29 @@ 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) { + if (_isBackground) { + throw UnsupportedError( + 'WebSocket tasks are not supported in background sessions'); + } + 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); + return task; + } } diff --git a/pkgs/cupertino_http/lib/src/cupertino_client.dart b/pkgs/cupertino_http/lib/src/cupertino_client.dart index 45b6afdec2..a4c7715de5 100644 --- a/pkgs/cupertino_http/lib/src/cupertino_client.dart +++ b/pkgs/cupertino_http/lib/src/cupertino_client.dart @@ -10,10 +10,13 @@ import 'dart:async'; import 'dart:io'; import 'dart:typed_data'; +import 'package:async/async.dart'; import 'package:http/http.dart'; import 'cupertino_api.dart'; +final _digitRegex = RegExp(r'^\d+$'); + class _TaskTracker { final responseCompleter = Completer(); final BaseRequest request; @@ -211,9 +214,23 @@ 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 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 @@ -233,12 +250,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); @@ -257,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, @@ -266,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/cupertino_http/lib/src/native_cupertino_bindings.dart b/pkgs/cupertino_http/lib/src/native_cupertino_bindings.dart index 82724c8cc3..1d2383ef51 100644 --- a/pkgs/cupertino_http/lib/src/native_cupertino_bindings.dart +++ b/pkgs/cupertino_http/lib/src/native_cupertino_bindings.dart @@ -1,10 +1,14 @@ // 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. // // Generated by `package:ffigen`. +// ignore_for_file: type=lint import 'dart:ffi' as ffi; import 'package:ffi/ffi.dart' as pkg_ffi; @@ -27,33444 +31,33235 @@ 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< - 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 _callocPtr = _lookup< + ffi + .NativeFunction 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< - 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 _aligned_allocPtr = _lookup< + ffi + .NativeFunction 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< - 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 _mblenPtr = _lookup< + ffi + .NativeFunction, 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, - ) { - return __objc_msgSend_26( - obj, - sel, - searchString, - mask, - rangeOfReceiverToSearch, - ); + int rand() { + return _rand(); } - 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 _randPtr = _lookup>('rand'); + late final _rand = _randPtr.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, + void srand( + int arg0, ) { - return __objc_msgSend_27( - obj, - sel, - searchString, - mask, - rangeOfReceiverToSearch, - locale, + return _srand( + arg0, ); } - 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 _srandPtr = + _lookup>('srand'); + late final _srand = _srandPtr.asFunction(); - late final _class_NSCharacterSet1 = _getClass1("NSCharacterSet"); - late final _sel_controlCharacterSet1 = _registerName1("controlCharacterSet"); - ffi.Pointer _objc_msgSend_28( - ffi.Pointer obj, - ffi.Pointer sel, + double strtod( + ffi.Pointer arg0, + ffi.Pointer> arg1, ) { - return __objc_msgSend_28( - obj, - sel, + return _strtod( + arg0, + arg1, ); } - late final __objc_msgSend_28Ptr = _lookup< + late final _strtodPtr = _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.Double Function(ffi.Pointer, + ffi.Pointer>)>>('strtod'); + late final _strtod = _strtodPtr.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, + double strtof( + ffi.Pointer arg0, + ffi.Pointer> arg1, ) { - return __objc_msgSend_29( - obj, - sel, - aRange, + return _strtof( + arg0, + arg1, ); } - late final __objc_msgSend_29Ptr = _lookup< + late final _strtofPtr = _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.Float Function(ffi.Pointer, + ffi.Pointer>)>>('strtof'); + late final _strtof = _strtofPtr.asFunction< + double Function( + ffi.Pointer, ffi.Pointer>)>(); - late final _sel_characterSetWithCharactersInString_1 = - _registerName1("characterSetWithCharactersInString:"); - ffi.Pointer _objc_msgSend_30( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aString, + int strtol( + ffi.Pointer __str, + ffi.Pointer> __endptr, + int __base, ) { - return __objc_msgSend_30( - obj, - sel, - aString, + return _strtol( + __str, + __endptr, + __base, ); } - late final __objc_msgSend_30Ptr = _lookup< + late final _strtolPtr = _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.Long Function(ffi.Pointer, + ffi.Pointer>, ffi.Int)>>('strtol'); + late final _strtol = _strtolPtr.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 strtoll( + ffi.Pointer __str, + ffi.Pointer> __endptr, + int __base, ) { - return __objc_msgSend_31( - obj, - sel, + return _strtoll( + __str, + __endptr, + __base, ); } - late final __objc_msgSend_31Ptr = _lookup< + late final _strtollPtr = _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.LongLong Function(ffi.Pointer, + ffi.Pointer>, ffi.Int)>>('strtoll'); + late final _strtoll = _strtollPtr.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 strtoul( + ffi.Pointer __str, + ffi.Pointer> __endptr, + int __base, ) { - return __objc_msgSend_32( - obj, - sel, + return _strtoul( + __str, + __endptr, + __base, ); } - late final __objc_msgSend_32Ptr = _lookup< + late final _strtoulPtr = _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.UnsignedLong Function(ffi.Pointer, + ffi.Pointer>, ffi.Int)>>('strtoul'); + late final _strtoul = _strtoulPtr.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 strtoull( + ffi.Pointer __str, + ffi.Pointer> __endptr, + int __base, ) { - return __objc_msgSend_33( - obj, - sel, - buffer, - length, + return _strtoull( + __str, + __endptr, + __base, ); } - late final __objc_msgSend_33Ptr = _lookup< + late final _strtoullPtr = _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)>(); + 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_range_1 = _registerName1("getBytes:range:"); - void _objc_msgSend_34( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer buffer, - NSRange range, + int system( + ffi.Pointer arg0, ) { - return __objc_msgSend_34( - obj, - sel, - buffer, - range, + return _system( + arg0, ); } - 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 _systemPtr = + _lookup)>>( + 'system'); + late final _system = + _systemPtr.asFunction)>(); - late final _sel_isEqualToData_1 = _registerName1("isEqualToData:"); - bool _objc_msgSend_35( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer other, + int wcstombs( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, ) { - return __objc_msgSend_35( - obj, - sel, - other, + return _wcstombs( + arg0, + arg1, + arg2, ); } - late final __objc_msgSend_35Ptr = _lookup< + late final _wcstombsPtr = _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.Size Function(ffi.Pointer, ffi.Pointer, + ffi.Size)>>('wcstombs'); + late final _wcstombs = _wcstombsPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_subdataWithRange_1 = _registerName1("subdataWithRange:"); - ffi.Pointer _objc_msgSend_36( - ffi.Pointer obj, - ffi.Pointer sel, - NSRange range, + int wctomb( + ffi.Pointer arg0, + int arg1, ) { - return __objc_msgSend_36( - obj, - sel, - range, + return _wctomb( + arg0, + arg1, ); } - 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 _wctombPtr = _lookup< + ffi + .NativeFunction, ffi.WChar)>>( + 'wctomb'); + late final _wctomb = + _wctombPtr.asFunction, 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, + void _Exit( + int arg0, ) { - return __objc_msgSend_37( - obj, - sel, - path, - useAuxiliaryFile, + return __Exit( + 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 __ExitPtr = + _lookup>('_Exit'); + late final __Exit = __ExitPtr.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, + int a64l( + ffi.Pointer arg0, ) { - return __objc_msgSend_38( - obj, - sel, - scheme, - host, - path, + return _a64l( + arg0, ); } - 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 _a64lPtr = + _lookup)>>( + 'a64l'); + late final _a64l = _a64lPtr.asFunction)>(); - 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, - ); + double drand48() { + return _drand48(); } - late final __objc_msgSend_39Ptr = _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 _drand48Ptr = + _lookup>('drand48'); + late final _drand48 = _drand48Ptr.asFunction(); - 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.Pointer ecvt( + double arg0, + int arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, ) { - return __objc_msgSend_40( - obj, - sel, - path, - baseURL, + return _ecvt( + arg0, + arg1, + arg2, + arg3, ); } - late final __objc_msgSend_40Ptr = _lookup< + late final _ecvtPtr = _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)>>('ecvt'); + late final _ecvt = _ecvtPtr.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, + double erand48( + ffi.Pointer arg0, ) { - return __objc_msgSend_41( - obj, - sel, - path, - isDir, + return _erand48( + arg0, ); } - late final __objc_msgSend_41Ptr = _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)>(); + late final _erand48Ptr = _lookup< + ffi + .NativeFunction)>>( + 'erand48'); + late final _erand48 = + _erand48Ptr.asFunction)>(); - late final _sel_initFileURLWithPath_1 = - _registerName1("initFileURLWithPath:"); - instancetype _objc_msgSend_42( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, + ffi.Pointer fcvt( + double arg0, + int arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, ) { - return __objc_msgSend_42( - obj, - sel, - path, + return _fcvt( + arg0, + arg1, + arg2, + arg3, ); } - late final __objc_msgSend_42Ptr = _lookup< + late final _fcvtPtr = _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.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_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, + ffi.Pointer gcvt( + double arg0, + int arg1, + ffi.Pointer arg2, ) { - return __objc_msgSend_43( - obj, - sel, - path, - isDir, - baseURL, + return _gcvt( + arg0, + arg1, + arg2, ); } - late final __objc_msgSend_43Ptr = _lookup< + late final _gcvtPtr = _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.Double, ffi.Int, ffi.Pointer)>>('gcvt'); + late final _gcvt = _gcvtPtr.asFunction< + ffi.Pointer Function(double, int, 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, + int getsubopt( + ffi.Pointer> arg0, + ffi.Pointer> arg1, + ffi.Pointer> arg2, ) { - return __objc_msgSend_44( - obj, - sel, - path, - baseURL, + return _getsubopt( + arg0, + arg1, + arg2, ); } - late final __objc_msgSend_44Ptr = _lookup< + late final _getsuboptPtr = _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.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_1 = - _registerName1("fileURLWithPath:isDirectory:"); - ffi.Pointer _objc_msgSend_45( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - bool isDir, + int grantpt( + int arg0, ) { - return __objc_msgSend_45( - obj, - sel, - path, - isDir, + return _grantpt( + arg0, ); } - 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 _grantptPtr = + _lookup>('grantpt'); + late final _grantpt = _grantptPtr.asFunction(); - late final _sel_fileURLWithPath_1 = _registerName1("fileURLWithPath:"); - ffi.Pointer _objc_msgSend_46( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, + ffi.Pointer initstate( + int arg0, + ffi.Pointer arg1, + int arg2, ) { - return __objc_msgSend_46( - obj, - sel, - path, + return _initstate( + arg0, + arg1, + arg2, ); } - late final __objc_msgSend_46Ptr = _lookup< + late final _initstatePtr = _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)>(); + 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_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 jrand48( + ffi.Pointer arg0, ) { - return __objc_msgSend_47( - obj, - sel, - path, - isDir, - baseURL, + return _jrand48( + arg0, ); } - 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 _jrand48Ptr = _lookup< + ffi + .NativeFunction)>>( + 'jrand48'); + late final _jrand48 = + _jrand48Ptr.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, + ffi.Pointer l64a( + int arg0, ) { - return __objc_msgSend_48( - obj, - sel, - path, - isDir, - baseURL, + return _l64a( + arg0, ); } - 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 _l64aPtr = + _lookup Function(ffi.Long)>>( + 'l64a'); + late final _l64a = _l64aPtr.asFunction Function(int)>(); - 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, + void lcong48( + ffi.Pointer arg0, ) { - return __objc_msgSend_49( - obj, - sel, - data, - baseURL, + return _lcong48( + arg0, ); } - 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)>(); + late final _lcong48Ptr = _lookup< + ffi + .NativeFunction)>>( + 'lcong48'); + late final _lcong48 = + _lcong48Ptr.asFunction)>(); - 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 __objc_msgSend_50( - obj, - sel, - data, - baseURL, - ); + int lrand48() { + return _lrand48(); } - 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 _lrand48Ptr = + _lookup>('lrand48'); + late final _lrand48 = _lrand48Ptr.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, + ffi.Pointer mktemp( + ffi.Pointer arg0, ) { - return __objc_msgSend_51( - obj, - sel, + return _mktemp( + arg0, ); } - late final __objc_msgSend_51Ptr = _lookup< + late final _mktempPtr = _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.Pointer Function(ffi.Pointer)>>('mktemp'); + late final _mktemp = _mktempPtr + .asFunction Function(ffi.Pointer)>(); - 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 mkstemp( + ffi.Pointer arg0, ) { - return __objc_msgSend_52( - obj, - sel, + return _mkstemp( + 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 _mkstempPtr = + _lookup)>>( + 'mkstemp'); + late final _mkstemp = + _mkstempPtr.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, + int mrand48() { + return _mrand48(); + } + + late final _mrand48Ptr = + _lookup>('mrand48'); + late final _mrand48 = _mrand48Ptr.asFunction(); + + int nrand48( + ffi.Pointer arg0, ) { - return __objc_msgSend_53( - obj, - sel, + return _nrand48( + 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 _nrand48Ptr = _lookup< + ffi + .NativeFunction)>>( + 'nrand48'); + late final _nrand48 = + _nrand48Ptr.asFunction)>(); - 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 posix_openpt( + int arg0, ) { - return __objc_msgSend_54( - obj, - sel, - value, - type, + return _posix_openpt( + arg0, ); } - late final __objc_msgSend_54Ptr = _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)>(); + late final _posix_openptPtr = + _lookup>('posix_openpt'); + late final _posix_openpt = _posix_openptPtr.asFunction(); - 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, + ffi.Pointer ptsname( + int arg0, ) { - return __objc_msgSend_55( - obj, - sel, - value, - type, + return _ptsname( + 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 _ptsnamePtr = + _lookup Function(ffi.Int)>>( + 'ptsname'); + late final _ptsname = + _ptsnamePtr.asFunction Function(int)>(); - 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, + int ptsname_r( + int fildes, + ffi.Pointer buffer, + int buflen, ) { - return __objc_msgSend_56( - obj, - sel, - anObject, + return _ptsname_r( + fildes, + buffer, + buflen, ); } - late final __objc_msgSend_56Ptr = _lookup< + late final _ptsname_rPtr = _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.Int Function( + ffi.Int, ffi.Pointer, ffi.Size)>>('ptsname_r'); + late final _ptsname_r = + _ptsname_rPtr.asFunction, int)>(); - 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 putenv( + ffi.Pointer arg0, ) { - return __objc_msgSend_57( - obj, - sel, - pointer, + return _putenv( + 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 _putenvPtr = + _lookup)>>( + 'putenv'); + late final _putenv = + _putenvPtr.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, - ) { - return __objc_msgSend_58( - obj, - sel, - value, - ); + int random() { + return _random(); } - 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 _randomPtr = + _lookup>('random'); + late final _random = _randomPtr.asFunction(); - late final _sel_getValue_1 = _registerName1("getValue:"); - void _objc_msgSend_59( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, + int rand_r( + ffi.Pointer arg0, ) { - return __objc_msgSend_59( - obj, - sel, - value, + return _rand_r( + arg0, ); } - 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 _rand_rPtr = _lookup< + ffi.NativeFunction)>>( + 'rand_r'); + late final _rand_r = + _rand_rPtr.asFunction)>(); - late final _sel_valueWithRange_1 = _registerName1("valueWithRange:"); - ffi.Pointer _objc_msgSend_60( - ffi.Pointer obj, - ffi.Pointer sel, - NSRange range, + ffi.Pointer realpath( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return __objc_msgSend_60( - obj, - sel, - range, + return _realpath( + arg0, + arg1, ); } - late final __objc_msgSend_60Ptr = _lookup< + late final _realpathPtr = _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.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('realpath'); + late final _realpath = _realpathPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - late final _sel_rangeValue1 = _registerName1("rangeValue"); - NSRange _objc_msgSend_61( - ffi.Pointer obj, - ffi.Pointer sel, + ffi.Pointer seed48( + ffi.Pointer arg0, ) { - return __objc_msgSend_61( - obj, - sel, + return _seed48( + arg0, ); } - late final __objc_msgSend_61Ptr = _lookup< + late final _seed48Ptr = _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)>(); + ffi.Pointer Function( + ffi.Pointer)>>('seed48'); + late final _seed48 = _seed48Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer)>(); - late final _sel_initWithChar_1 = _registerName1("initWithChar:"); - ffi.Pointer _objc_msgSend_62( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + int setenv( + ffi.Pointer __name, + ffi.Pointer __value, + int __overwrite, ) { - return __objc_msgSend_62( - obj, - sel, - value, + return _setenv( + __name, + __value, + __overwrite, ); } - late final __objc_msgSend_62Ptr = _lookup< + late final _setenvPtr = _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.Int Function(ffi.Pointer, ffi.Pointer, + ffi.Int)>>('setenv'); + late final _setenv = _setenvPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_initWithUnsignedChar_1 = - _registerName1("initWithUnsignedChar:"); - ffi.Pointer _objc_msgSend_63( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + void setkey( + ffi.Pointer arg0, ) { - return __objc_msgSend_63( - obj, - sel, - value, + return _setkey( + 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 _setkeyPtr = + _lookup)>>( + 'setkey'); + late final _setkey = + _setkeyPtr.asFunction)>(); - late final _sel_initWithShort_1 = _registerName1("initWithShort:"); - ffi.Pointer _objc_msgSend_64( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + ffi.Pointer setstate( + ffi.Pointer arg0, ) { - return __objc_msgSend_64( - obj, - sel, - value, + return _setstate( + arg0, ); } - late final __objc_msgSend_64Ptr = _lookup< + late final _setstatePtr = _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)>(); + ffi.Pointer Function(ffi.Pointer)>>('setstate'); + late final _setstate = _setstatePtr + .asFunction Function(ffi.Pointer)>(); - late final _sel_initWithUnsignedShort_1 = - _registerName1("initWithUnsignedShort:"); - ffi.Pointer _objc_msgSend_65( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + void srand48( + int arg0, ) { - return __objc_msgSend_65( - obj, - sel, - value, + return _srand48( + 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 _srand48Ptr = + _lookup>('srand48'); + late final _srand48 = _srand48Ptr.asFunction(); - late final _sel_initWithInt_1 = _registerName1("initWithInt:"); - ffi.Pointer _objc_msgSend_66( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + void srandom( + int arg0, ) { - return __objc_msgSend_66( - obj, - sel, - value, + return _srandom( + 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 _srandomPtr = + _lookup>( + 'srandom'); + late final _srandom = _srandomPtr.asFunction(); - late final _sel_initWithUnsignedInt_1 = - _registerName1("initWithUnsignedInt:"); - ffi.Pointer _objc_msgSend_67( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + int unlockpt( + int arg0, ) { - return __objc_msgSend_67( - obj, - sel, - value, + return _unlockpt( + arg0, ); } - 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 _unlockptPtr = + _lookup>('unlockpt'); + late final _unlockpt = _unlockptPtr.asFunction(); - late final _sel_initWithLong_1 = _registerName1("initWithLong:"); - ffi.Pointer _objc_msgSend_68( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + int unsetenv( + ffi.Pointer arg0, ) { - return __objc_msgSend_68( - obj, - sel, - value, + return _unsetenv( + arg0, ); } - 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)>(); + late final _unsetenvPtr = + _lookup)>>( + 'unsetenv'); + late final _unsetenv = + _unsetenvPtr.asFunction)>(); - late final _sel_initWithUnsignedLong_1 = - _registerName1("initWithUnsignedLong:"); - ffi.Pointer _objc_msgSend_69( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_69( - obj, - sel, - value, - ); + int arc4random() { + return _arc4random(); } - late final __objc_msgSend_69Ptr = _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)>(); + late final _arc4randomPtr = + _lookup>('arc4random'); + late final _arc4random = _arc4randomPtr.asFunction(); - late final _sel_initWithLongLong_1 = _registerName1("initWithLongLong:"); - ffi.Pointer _objc_msgSend_70( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + void arc4random_addrandom( + ffi.Pointer arg0, + int arg1, ) { - return __objc_msgSend_70( - obj, - sel, - value, + return _arc4random_addrandom( + arg0, + arg1, ); } - late final __objc_msgSend_70Ptr = _lookup< + late final _arc4random_addrandomPtr = _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)>(); + ffi.Void Function( + ffi.Pointer, ffi.Int)>>('arc4random_addrandom'); + late final _arc4random_addrandom = _arc4random_addrandomPtr + .asFunction, int)>(); - late final _sel_initWithUnsignedLongLong_1 = - _registerName1("initWithUnsignedLongLong:"); - ffi.Pointer _objc_msgSend_71( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + void arc4random_buf( + ffi.Pointer __buf, + int __nbytes, ) { - return __objc_msgSend_71( - obj, - sel, - value, + return _arc4random_buf( + __buf, + __nbytes, ); } - 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_bufPtr = _lookup< + ffi + .NativeFunction, ffi.Size)>>( + 'arc4random_buf'); + late final _arc4random_buf = _arc4random_bufPtr + .asFunction, int)>(); - late final _sel_initWithFloat_1 = _registerName1("initWithFloat:"); - ffi.Pointer _objc_msgSend_72( - ffi.Pointer obj, - ffi.Pointer sel, - double value, + 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 __objc_msgSend_72( - obj, - sel, - value, + return _arc4random_uniform( + __upper_bound, ); } - 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 _arc4random_uniformPtr = + _lookup>( + 'arc4random_uniform'); + late final _arc4random_uniform = + _arc4random_uniformPtr.asFunction(); - late final _sel_initWithDouble_1 = _registerName1("initWithDouble:"); - ffi.Pointer _objc_msgSend_73( - ffi.Pointer obj, - ffi.Pointer sel, - double value, + int atexit_b( + ffi.Pointer<_ObjCBlock> arg0, ) { - return __objc_msgSend_73( - obj, - sel, - value, + return _atexit_b( + arg0, ); } - late final __objc_msgSend_73Ptr = _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)>(); + late final _atexit_bPtr = + _lookup)>>( + 'atexit_b'); + late final _atexit_b = + _atexit_bPtr.asFunction)>(); - late final _sel_initWithBool_1 = _registerName1("initWithBool:"); - ffi.Pointer _objc_msgSend_74( - ffi.Pointer obj, - ffi.Pointer sel, - bool 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_74( - obj, - sel, + return __Block_copy( value, ); } - late final __objc_msgSend_74Ptr = _lookup< + late final __Block_copyPtr = _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.Pointer Function( + ffi.Pointer)>>('_Block_copy'); + late final __Block_copy = __Block_copyPtr + .asFunction 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_75( - ffi.Pointer obj, - ffi.Pointer sel, + void _Block_release( + ffi.Pointer value, ) { - return __objc_msgSend_75( - obj, - sel, + return __Block_release( + value, ); } - late final __objc_msgSend_75Ptr = _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)>(); + late final __Block_releasePtr = + _lookup)>>( + '_Block_release'); + late final __Block_release = + __Block_releasePtr.asFunction)>(); - late final _sel_unsignedCharValue1 = _registerName1("unsignedCharValue"); - int _objc_msgSend_76( - 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_76( - obj, - sel, + return _bsearch_b( + __key, + __base, + __nel, + __width, + __compar, ); } - late final __objc_msgSend_76Ptr = _lookup< + late final _bsearch_bPtr = _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.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_shortValue1 = _registerName1("shortValue"); - int _objc_msgSend_77( - ffi.Pointer obj, - ffi.Pointer sel, + ffi.Pointer cgetcap( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, ) { - return __objc_msgSend_77( - obj, - sel, + return _cgetcap( + arg0, + arg1, + arg2, ); } - late final __objc_msgSend_77Ptr = _lookup< + late final _cgetcapPtr = _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.Int)>>('cgetcap'); + late final _cgetcap = _cgetcapPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_unsignedShortValue1 = _registerName1("unsignedShortValue"); - int _objc_msgSend_78( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_78( - obj, - sel, - ); + int cgetclose() { + return _cgetclose(); } - 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)>(); + late final _cgetclosePtr = + _lookup>('cgetclose'); + late final _cgetclose = _cgetclosePtr.asFunction(); - late final _sel_intValue1 = _registerName1("intValue"); - int _objc_msgSend_79( - ffi.Pointer obj, - ffi.Pointer sel, + int cgetent( + ffi.Pointer> arg0, + ffi.Pointer> arg1, + ffi.Pointer arg2, ) { - return __objc_msgSend_79( - obj, - sel, + return _cgetent( + arg0, + arg1, + arg2, ); } - late final __objc_msgSend_79Ptr = _lookup< + late final _cgetentPtr = _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>, + ffi.Pointer>, + ffi.Pointer)>>('cgetent'); + late final _cgetent = _cgetentPtr.asFunction< + int Function(ffi.Pointer>, + ffi.Pointer>, ffi.Pointer)>(); - late final _sel_unsignedIntValue1 = _registerName1("unsignedIntValue"); - int _objc_msgSend_80( - ffi.Pointer obj, - ffi.Pointer sel, + int cgetfirst( + ffi.Pointer> arg0, + ffi.Pointer> arg1, ) { - return __objc_msgSend_80( - obj, - sel, + return _cgetfirst( + arg0, + arg1, ); } - late final __objc_msgSend_80Ptr = _lookup< + late final _cgetfirstPtr = _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>)>>('cgetfirst'); + late final _cgetfirst = _cgetfirstPtr.asFunction< + int Function(ffi.Pointer>, + ffi.Pointer>)>(); - late final _sel_longValue1 = _registerName1("longValue"); - int _objc_msgSend_81( - ffi.Pointer obj, - ffi.Pointer sel, + int cgetmatch( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return __objc_msgSend_81( - obj, - sel, + return _cgetmatch( + arg0, + arg1, ); } - late final __objc_msgSend_81Ptr = _lookup< + late final _cgetmatchPtr = _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)>>('cgetmatch'); + late final _cgetmatch = _cgetmatchPtr + .asFunction, 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 cgetnext( + ffi.Pointer> arg0, + ffi.Pointer> arg1, ) { - return __objc_msgSend_82( - obj, - sel, + return _cgetnext( + arg0, + arg1, ); } - late final __objc_msgSend_82Ptr = _lookup< + late final _cgetnextPtr = _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>)>>('cgetnext'); + late final _cgetnext = _cgetnextPtr.asFunction< + int Function(ffi.Pointer>, + ffi.Pointer>)>(); - late final _sel_unsignedLongLongValue1 = - _registerName1("unsignedLongLongValue"); - int _objc_msgSend_83( - ffi.Pointer obj, - ffi.Pointer sel, + int cgetnum( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, ) { - return __objc_msgSend_83( - obj, - sel, + return _cgetnum( + arg0, + arg1, + arg2, ); } - late final __objc_msgSend_83Ptr = _lookup< + late final _cgetnumPtr = _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.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_floatValue1 = _registerName1("floatValue"); - double _objc_msgSend_84( - ffi.Pointer obj, - ffi.Pointer sel, + int cgetset( + ffi.Pointer arg0, ) { - return __objc_msgSend_84( - obj, - sel, + return _cgetset( + arg0, ); } - late final __objc_msgSend_84Ptr = _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)>(); + late final _cgetsetPtr = + _lookup)>>( + 'cgetset'); + late final _cgetset = + _cgetsetPtr.asFunction)>(); - late final _sel_doubleValue1 = _registerName1("doubleValue"); - double _objc_msgSend_85( - ffi.Pointer obj, - ffi.Pointer sel, + int cgetstr( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer> arg2, ) { - return __objc_msgSend_85( - obj, - sel, + return _cgetstr( + arg0, + arg1, + arg2, ); } - late final __objc_msgSend_85Ptr = _lookup< + late final _cgetstrPtr = _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>)>>('cgetstr'); + late final _cgetstr = _cgetstrPtr.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 cgetustr( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer> arg2, ) { - return __objc_msgSend_86( - obj, - sel, - otherNumber, + return _cgetustr( + arg0, + arg1, + arg2, ); } - late final __objc_msgSend_86Ptr = _lookup< + late final _cgetustrPtr = _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.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_isEqualToNumber_1 = _registerName1("isEqualToNumber:"); - bool _objc_msgSend_87( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer number, + int daemon( + int arg0, + int arg1, ) { - return __objc_msgSend_87( - obj, - sel, - number, + return _daemon( + 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 _daemonPtr = + _lookup>('daemon'); + late final _daemon = _daemonPtr.asFunction(); - late final _sel_descriptionWithLocale_1 = - _registerName1("descriptionWithLocale:"); - ffi.Pointer _objc_msgSend_88( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer locale, + ffi.Pointer devname( + int arg0, + int arg1, ) { - return __objc_msgSend_88( - obj, - sel, - locale, + return _devname( + arg0, + arg1, ); } - late final __objc_msgSend_88Ptr = _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)>(); + late final _devnamePtr = _lookup< + ffi.NativeFunction Function(dev_t, mode_t)>>( + 'devname'); + late final _devname = + _devnamePtr.asFunction Function(int, 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 devname_r( + int arg0, + int arg1, + ffi.Pointer buf, + int len, ) { - return __objc_msgSend_89( - obj, - sel, + return _devname_r( + arg0, + arg1, + buf, + len, ); } - late final __objc_msgSend_89Ptr = _lookup< + late final _devname_rPtr = _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( + 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_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, + ffi.Pointer getbsize( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return __objc_msgSend_90( - obj, - sel, - buffer, - maxBufferLength, + return _getbsize( + arg0, + arg1, ); } - late final __objc_msgSend_90Ptr = _lookup< + late final _getbsizePtr = _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)>>('getbsize'); + late final _getbsize = _getbsizePtr.asFunction< + ffi.Pointer Function( + 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( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aKey, + int getloadavg( + ffi.Pointer arg0, + int arg1, ) { - return __objc_msgSend_91( - obj, - sel, - aKey, + return _getloadavg( + arg0, + arg1, ); } - 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 _getloadavgPtr = _lookup< + ffi + .NativeFunction, ffi.Int)>>( + 'getloadavg'); + late final _getloadavg = + _getloadavgPtr.asFunction, int)>(); - 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_92( - obj, - sel, - ); + ffi.Pointer getprogname() { + return _getprogname(); } - 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 _getprognamePtr = + _lookup Function()>>( + 'getprogname'); + late final _getprogname = + _getprognamePtr.asFunction Function()>(); - 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, + void setprogname( + ffi.Pointer arg0, ) { - return __objc_msgSend_93( - obj, - sel, - objects, - keys, - cnt, + return _setprogname( + arg0, ); } - late final __objc_msgSend_93Ptr = _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)>(); + late final _setprognamePtr = + _lookup)>>( + 'setprogname'); + late final _setprogname = + _setprognamePtr.asFunction)>(); - 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( + ffi.Pointer __base, + int __nel, + int __width, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer)>> + __compar, ) { - return __objc_msgSend_94( - obj, - sel, - index, + return _heapsort( + __base, + __nel, + __width, + __compar, ); } - late final __objc_msgSend_94Ptr = _lookup< + late final _heapsortPtr = _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< + 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 _sel_initWithObjects_count_1 = - _registerName1("initWithObjects:count:"); - instancetype _objc_msgSend_95( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer> objects, - int cnt, + int heapsort_b( + ffi.Pointer __base, + int __nel, + int __width, + ffi.Pointer<_ObjCBlock> __compar, ) { - return __objc_msgSend_95( - obj, - sel, - objects, - cnt, + return _heapsort_b( + __base, + __nel, + __width, + __compar, ); } - late final __objc_msgSend_95Ptr = _lookup< + late final _heapsort_bPtr = _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<_ObjCBlock>)>>('heapsort_b'); + late final _heapsort_b = _heapsort_bPtr.asFunction< + int Function(ffi.Pointer, int, int, ffi.Pointer<_ObjCBlock>)>(); - late final _sel_arrayByAddingObject_1 = - _registerName1("arrayByAddingObject:"); - ffi.Pointer _objc_msgSend_96( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anObject, + int mergesort( + ffi.Pointer __base, + int __nel, + int __width, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer)>> + __compar, ) { - return __objc_msgSend_96( - obj, - sel, - anObject, + return _mergesort( + __base, + __nel, + __width, + __compar, ); } - late final __objc_msgSend_96Ptr = _lookup< + late final _mergesortPtr = _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< + 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_arrayByAddingObjectsFromArray_1 = - _registerName1("arrayByAddingObjectsFromArray:"); - ffi.Pointer _objc_msgSend_97( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer otherArray, + int mergesort_b( + ffi.Pointer __base, + int __nel, + int __width, + ffi.Pointer<_ObjCBlock> __compar, ) { - return __objc_msgSend_97( - obj, - sel, - otherArray, + return _mergesort_b( + __base, + __nel, + __width, + __compar, ); } - late final __objc_msgSend_97Ptr = _lookup< + late final _mergesort_bPtr = _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.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_componentsJoinedByString_1 = - _registerName1("componentsJoinedByString:"); - ffi.Pointer _objc_msgSend_98( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer separator, + void psort( + ffi.Pointer __base, + int __nel, + int __width, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer)>> + __compar, ) { - return __objc_msgSend_98( - obj, - sel, - separator, + return _psort( + __base, + __nel, + __width, + __compar, ); } - late final __objc_msgSend_98Ptr = _lookup< + late final _psortPtr = _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< + 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_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_b( + ffi.Pointer __base, + int __nel, + int __width, + ffi.Pointer<_ObjCBlock> __compar, ) { - return __objc_msgSend_99( - obj, - sel, - locale, - level, + return _psort_b( + __base, + __nel, + __width, + __compar, ); } - late final __objc_msgSend_99Ptr = _lookup< + late final _psort_bPtr = _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<_ObjCBlock>)>>('psort_b'); + late final _psort_b = _psort_bPtr.asFunction< + void Function( + ffi.Pointer, int, int, ffi.Pointer<_ObjCBlock>)>(); - late final _sel_firstObjectCommonWithArray_1 = - _registerName1("firstObjectCommonWithArray:"); - ffi.Pointer _objc_msgSend_100( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer otherArray, + 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_100( - obj, - sel, - otherArray, + return _psort_r( + __base, + __nel, + __width, + arg3, + __compar, ); } - late final __objc_msgSend_100Ptr = _lookup< + late final _psort_rPtr = _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, + 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_getObjects_range_1 = _registerName1("getObjects:range:"); - void _objc_msgSend_101( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer> objects, - NSRange range, + void qsort_b( + ffi.Pointer __base, + int __nel, + int __width, + ffi.Pointer<_ObjCBlock> __compar, ) { - return __objc_msgSend_101( - obj, - sel, - objects, - range, + return _qsort_b( + __base, + __nel, + __width, + __compar, ); } - late final __objc_msgSend_101Ptr = _lookup< + late final _qsort_bPtr = _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<_ObjCBlock>)>>('qsort_b'); + late final _qsort_b = _qsort_bPtr.asFunction< + void Function( + ffi.Pointer, int, int, ffi.Pointer<_ObjCBlock>)>(); - late final _sel_indexOfObject_1 = _registerName1("indexOfObject:"); - int _objc_msgSend_102( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anObject, + 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_102( - obj, - sel, - anObject, + return _qsort_r( + __base, + __nel, + __width, + arg3, + __compar, ); } - late final __objc_msgSend_102Ptr = _lookup< + late final _qsort_rPtr = _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.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_inRange_1 = - _registerName1("indexOfObject:inRange:"); - int _objc_msgSend_103( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anObject, - NSRange range, + int radixsort( + ffi.Pointer> __base, + int __nel, + ffi.Pointer __table, + int __endbyte, ) { - return __objc_msgSend_103( - obj, - sel, - anObject, - range, + return _radixsort( + __base, + __nel, + __table, + __endbyte, ); } - late final __objc_msgSend_103Ptr = _lookup< + late final _radixsortPtr = _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)>(); + 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_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 rpmatch( + ffi.Pointer arg0, ) { - return __objc_msgSend_104( - obj, - sel, - otherArray, + return _rpmatch( + arg0, ); } - late final __objc_msgSend_104Ptr = _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)>(); + late final _rpmatchPtr = + _lookup)>>( + 'rpmatch'); + late final _rpmatch = + _rpmatchPtr.asFunction)>(); - 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, + int sradixsort( + ffi.Pointer> __base, + int __nel, + ffi.Pointer __table, + int __endbyte, ) { - return __objc_msgSend_105( - obj, - sel, - comparator, - context, + return _sradixsort( + __base, + __nel, + __table, + __endbyte, ); } - late final __objc_msgSend_105Ptr = _lookup< + late final _sradixsortPtr = _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.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_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, + 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 __objc_msgSend_106( - obj, - sel, - comparator, - context, - hint, + return _reallocf( + __ptr, + __size, ); } - late final __objc_msgSend_106Ptr = _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, - 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 Function( + ffi.Pointer, ffi.Size)>>('reallocf'); + late final _reallocf = _reallocfPtr + .asFunction Function(ffi.Pointer, int)>(); - late final _sel_sortedArrayUsingSelector_1 = - _registerName1("sortedArrayUsingSelector:"); - ffi.Pointer _objc_msgSend_107( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer comparator, + int strtonum( + ffi.Pointer __numstr, + int __minval, + int __maxval, + ffi.Pointer> __errstrp, ) { - return __objc_msgSend_107( - obj, - sel, - comparator, + return _strtonum( + __numstr, + __minval, + __maxval, + __errstrp, ); } - late final __objc_msgSend_107Ptr = _lookup< + late final _strtonumPtr = _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.LongLong, + ffi.LongLong, ffi.Pointer>)>>('strtonum'); + late final _strtonum = _strtonumPtr.asFunction< + int Function(ffi.Pointer, int, int, + ffi.Pointer>)>(); - late final _sel_subarrayWithRange_1 = _registerName1("subarrayWithRange:"); - ffi.Pointer _objc_msgSend_108( - ffi.Pointer obj, - ffi.Pointer sel, - NSRange range, + int strtoq( + ffi.Pointer __str, + ffi.Pointer> __endptr, + int __base, ) { - return __objc_msgSend_108( - obj, - sel, - range, + return _strtoq( + __str, + __endptr, + __base, ); } - late final __objc_msgSend_108Ptr = _lookup< + late final _strtoqPtr = _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.LongLong Function(ffi.Pointer, + ffi.Pointer>, ffi.Int)>>('strtoq'); + late final _strtoq = _strtoqPtr.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, + int strtouq( + ffi.Pointer __str, + ffi.Pointer> __endptr, + int __base, ) { - return __objc_msgSend_109( - obj, - sel, - url, - error, + return _strtouq( + __str, + __endptr, + __base, ); } - late final __objc_msgSend_109Ptr = _lookup< + late final _strtouqPtr = _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.UnsignedLongLong Function(ffi.Pointer, + ffi.Pointer>, ffi.Int)>>('strtouq'); + late final _strtouq = _strtouqPtr.asFunction< + int Function( + ffi.Pointer, ffi.Pointer>, 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, - ffi.Pointer aSelector, - ffi.Pointer argument, + 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_110( - obj, - sel, - aSelector, - argument, + return ___darwin_check_fd_set_overflow( + arg0, + arg1, + arg2, ); } - late final __objc_msgSend_110Ptr = _lookup< + late final ___darwin_check_fd_set_overflowPtr = _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.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 _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_getName( ffi.Pointer sel, - NSRange range, ) { - return __objc_msgSend_111( - obj, + return _sel_getName( sel, - range, ); } - late final __objc_msgSend_111Ptr = _lookup< + late final _sel_getNamePtr = _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_getName'); + late final _sel_getName = _sel_getNamePtr + .asFunction Function(ffi.Pointer)>(); - 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, + ffi.Pointer sel_registerName( + ffi.Pointer str, ) { - return __objc_msgSend_112( - obj, - sel, - indexSet, + return _sel_registerName1( + str, ); } - late final __objc_msgSend_112Ptr = _lookup< + late final _sel_registerNamePtr = _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)>>('sel_registerName'); + late final _sel_registerName1 = _sel_registerNamePtr + .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_getClassName( ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer indexSet, ) { - return __objc_msgSend_113( + return _object_getClassName( obj, - sel, - indexSet, ); } - late final __objc_msgSend_113Ptr = _lookup< + late final _object_getClassNamePtr = _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_getClassName'); + late final _object_getClassName = _object_getClassNamePtr + .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 object_getIndexedIvars( ffi.Pointer obj, - ffi.Pointer sel, - int value, ) { - return __objc_msgSend_114( + return _object_getIndexedIvars( obj, - sel, - value, ); } - late final __objc_msgSend_114Ptr = _lookup< + late final _object_getIndexedIvarsPtr = _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)>>('object_getIndexedIvars'); + late final _object_getIndexedIvars = _object_getIndexedIvarsPtr + .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, + bool sel_isMapped( ffi.Pointer sel, - ffi.Pointer indexBuffer, - int bufferSize, - NSRangePointer range, ) { - return __objc_msgSend_115( - obj, + return _sel_isMapped( sel, - indexBuffer, - bufferSize, - range, ); } - late final __objc_msgSend_115Ptr = _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)>(); + late final _sel_isMappedPtr = + _lookup)>>( + 'sel_isMapped'); + late final _sel_isMapped = + _sel_isMappedPtr.asFunction)>(); - late final _sel_countOfIndexesInRange_1 = - _registerName1("countOfIndexesInRange:"); - int _objc_msgSend_116( - ffi.Pointer obj, - ffi.Pointer sel, - NSRange range, + ffi.Pointer sel_getUid( + ffi.Pointer str, ) { - return __objc_msgSend_116( - obj, - sel, - range, + return _sel_getUid( + str, ); } - late final __objc_msgSend_116Ptr = _lookup< + late final _sel_getUidPtr = _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(ffi.Pointer)>>('sel_getUid'); + late final _sel_getUid = _sel_getUidPtr + .asFunction Function(ffi.Pointer)>(); - late final _sel_containsIndex_1 = _registerName1("containsIndex:"); - bool _objc_msgSend_117( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + ffi.Pointer objc_retainedObject( + objc_objectptr_t obj, ) { - return __objc_msgSend_117( + return _objc_retainedObject( obj, - sel, - value, ); } - late final __objc_msgSend_117Ptr = _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)>(); + late final _objc_retainedObjectPtr = _lookup< + ffi + .NativeFunction Function(objc_objectptr_t)>>( + 'objc_retainedObject'); + late final _objc_retainedObject = _objc_retainedObjectPtr + .asFunction Function(objc_objectptr_t)>(); - late final _sel_containsIndexesInRange_1 = - _registerName1("containsIndexesInRange:"); - bool _objc_msgSend_118( - ffi.Pointer obj, - ffi.Pointer sel, - NSRange range, + ffi.Pointer objc_unretainedObject( + objc_objectptr_t obj, ) { - return __objc_msgSend_118( + return _objc_unretainedObject( obj, - sel, - range, ); } - late final __objc_msgSend_118Ptr = _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)>(); + late final _objc_unretainedObjectPtr = _lookup< + ffi + .NativeFunction Function(objc_objectptr_t)>>( + 'objc_unretainedObject'); + late final _objc_unretainedObject = _objc_unretainedObjectPtr + .asFunction Function(objc_objectptr_t)>(); - 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; + objc_objectptr_t objc_unretainedPointer( + ffi.Pointer obj, + ) { + return _objc_unretainedPointer( + obj, + ); } - 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_unretainedPointerPtr = _lookup< + ffi + .NativeFunction)>>( + '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; } - ffi.Pointer _Block_copy( - ffi.Pointer value, + ffi.Pointer _sel_registerName( + ffi.Pointer str, ) { - return __Block_copy( - value, + return __sel_registerName( + str, ); } - late final __Block_copyPtr = _lookup< + late final __sel_registerNamePtr = _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)>>('sel_registerName'); + late final __sel_registerName = __sel_registerNamePtr + .asFunction Function(ffi.Pointer)>(); - void _Block_release( - ffi.Pointer 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; + } + + ffi.Pointer _objc_getClass( + ffi.Pointer str, ) { - return __Block_release( - value, + return __objc_getClass( + str, ); } - late final __Block_releasePtr = - _lookup)>>( - '_Block_release'); - late final __Block_release = - __Block_releasePtr.asFunction)>(); + late final __objc_getClassPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer)>>('objc_getClass'); + late final __objc_getClass = __objc_getClassPtr + .asFunction Function(ffi.Pointer)>(); - 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<_ObjCBlock> block, + ffi.Pointer _objc_retain( + ffi.Pointer value, ) { - return __objc_msgSend_119( - obj, - sel, - block, + return __objc_retain( + value, ); } - late final __objc_msgSend_119Ptr = _lookup< + late final __objc_retainPtr = _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.Pointer Function( + ffi.Pointer)>>('objc_retain'); + late final __objc_retain = __objc_retainPtr + .asFunction Function(ffi.Pointer)>(); - late final _sel_enumerateIndexesWithOptions_usingBlock_1 = - _registerName1("enumerateIndexesWithOptions:usingBlock:"); - void _objc_msgSend_120( - ffi.Pointer obj, - ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> block, + void _objc_release( + ffi.Pointer value, ) { - return __objc_msgSend_120( - obj, - sel, - opts, - block, + return __objc_release( + value, ); } - late final __objc_msgSend_120Ptr = _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>)>(); + late final __objc_releasePtr = + _lookup)>>( + 'objc_release'); + late final __objc_release = + __objc_releasePtr.asFunction)>(); - late final _sel_enumerateIndexesInRange_options_usingBlock_1 = - _registerName1("enumerateIndexesInRange:options:usingBlock:"); - void _objc_msgSend_121( + 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, - NSRange range, - int opts, - ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_121( + return __objc_msgSend_1( obj, sel, - range, - opts, - block, ); } - late final __objc_msgSend_121Ptr = _lookup< + late final __objc_msgSend_1Ptr = _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>)>(); + 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_indexPassingTest_1 = _registerName1("indexPassingTest:"); - int _objc_msgSend_122( + late final _sel_initialize1 = _registerName1("initialize"); + late final _sel_init1 = _registerName1("init"); + instancetype _objc_msgSend_2( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> predicate, ) { - return __objc_msgSend_122( + return __objc_msgSend_2( obj, sel, - predicate, ); } - late final __objc_msgSend_122Ptr = _lookup< + late final __objc_msgSend_2Ptr = _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>)>(); + 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_indexWithOptions_passingTest_1 = - _registerName1("indexWithOptions:passingTest:"); - int _objc_msgSend_123( + late final _sel_new1 = _registerName1("new"); + late final _sel_allocWithZone_1 = _registerName1("allocWithZone:"); + instancetype _objc_msgSend_3( ffi.Pointer obj, ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> predicate, + ffi.Pointer<_NSZone> zone, ) { - return __objc_msgSend_123( + return __objc_msgSend_3( obj, sel, - opts, - predicate, + zone, ); } - late final __objc_msgSend_123Ptr = _lookup< + late final __objc_msgSend_3Ptr = _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>)>(); + 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_indexInRange_options_passingTest_1 = - _registerName1("indexInRange:options:passingTest:"); - int _objc_msgSend_124( + 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, - NSRange range, - int opts, - ffi.Pointer<_ObjCBlock> predicate, + ffi.Pointer aSelector, ) { - return __objc_msgSend_124( + return __objc_msgSend_4( obj, sel, - range, - opts, - predicate, + aSelector, ); } - late final __objc_msgSend_124Ptr = _lookup< + late final __objc_msgSend_4Ptr = _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_4 = __objc_msgSend_4Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_indexesPassingTest_1 = _registerName1("indexesPassingTest:"); - ffi.Pointer _objc_msgSend_125( + bool _objc_msgSend_0( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> predicate, + ffi.Pointer clazz, ) { - return __objc_msgSend_125( + return __objc_msgSend_0( obj, sel, - predicate, + clazz, ); } - late final __objc_msgSend_125Ptr = _lookup< + late final __objc_msgSend_0Ptr = _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.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_indexesWithOptions_passingTest_1 = - _registerName1("indexesWithOptions:passingTest:"); - ffi.Pointer _objc_msgSend_126( + 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, - int opts, - ffi.Pointer<_ObjCBlock> predicate, + ffi.Pointer protocol, ) { - return __objc_msgSend_126( + return __objc_msgSend_5( obj, sel, - opts, - predicate, + protocol, ); } - late final __objc_msgSend_126Ptr = _lookup< + late final __objc_msgSend_5Ptr = _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.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_indexesInRange_options_passingTest_1 = - _registerName1("indexesInRange:options:passingTest:"); - ffi.Pointer _objc_msgSend_127( + late final _sel_methodForSelector_1 = _registerName1("methodForSelector:"); + IMP _objc_msgSend_6( ffi.Pointer obj, ffi.Pointer sel, - NSRange range, - int opts, - ffi.Pointer<_ObjCBlock> predicate, + ffi.Pointer aSelector, ) { - return __objc_msgSend_127( + return __objc_msgSend_6( obj, sel, - range, - opts, - predicate, + aSelector, ); } - late final __objc_msgSend_127Ptr = _lookup< + late final __objc_msgSend_6Ptr = _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, NSRange, int, 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_enumerateRangesUsingBlock_1 = - _registerName1("enumerateRangesUsingBlock:"); - void _objc_msgSend_128( + 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<_ObjCBlock> block, + ffi.Pointer aSelector, ) { - return __objc_msgSend_128( + return __objc_msgSend_7( obj, sel, - block, + aSelector, ); } - late final __objc_msgSend_128Ptr = _lookup< + late final __objc_msgSend_7Ptr = _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_7 = __objc_msgSend_7Ptr.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 _sel_forwardingTargetForSelector_1 = + _registerName1("forwardingTargetForSelector:"); + ffi.Pointer _objc_msgSend_8( ffi.Pointer obj, ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> block, + ffi.Pointer aSelector, ) { - return __objc_msgSend_129( + return __objc_msgSend_8( obj, sel, - opts, - block, + aSelector, ); } - late final __objc_msgSend_129Ptr = _lookup< + late final __objc_msgSend_8Ptr = _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_8 = __objc_msgSend_8Ptr.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 _class_NSInvocation1 = _getClass1("NSInvocation"); + late final _sel_forwardInvocation_1 = _registerName1("forwardInvocation:"); + void _objc_msgSend_9( ffi.Pointer obj, ffi.Pointer sel, - NSRange range, - int opts, - ffi.Pointer<_ObjCBlock> block, + ffi.Pointer anInvocation, ) { - return __objc_msgSend_130( + return __objc_msgSend_9( obj, sel, - range, - opts, - block, + anInvocation, ); } - late final __objc_msgSend_130Ptr = _lookup< + late final __objc_msgSend_9Ptr = _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)>>('objc_msgSend'); + late final __objc_msgSend_9 = __objc_msgSend_9Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_objectsAtIndexes_1 = _registerName1("objectsAtIndexes:"); - ffi.Pointer _objc_msgSend_131( + 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 indexes, + ffi.Pointer aSelector, ) { - return __objc_msgSend_131( + return __objc_msgSend_10( obj, sel, - indexes, + aSelector, ); } - late final __objc_msgSend_131Ptr = _lookup< + late final __objc_msgSend_10Ptr = _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, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_10 = __objc_msgSend_10Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + 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_instanceMethodSignatureForSelector_1 = + _registerName1("instanceMethodSignatureForSelector:"); + late final _sel_allowsWeakReference1 = _registerName1("allowsWeakReference"); + bool _objc_msgSend_11( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_132( + return __objc_msgSend_11( obj, sel, - block, ); } - late final __objc_msgSend_132Ptr = _lookup< + late final __objc_msgSend_11Ptr = _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.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_enumerateObjectsWithOptions_usingBlock_1 = - _registerName1("enumerateObjectsWithOptions:usingBlock:"); - void _objc_msgSend_133( + 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 opts, - ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_133( + return __objc_msgSend_12( obj, sel, - opts, - block, ); } - late final __objc_msgSend_133Ptr = _lookup< + late final __objc_msgSend_12Ptr = _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>)>(); + 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_enumerateObjectsAtIndexes_options_usingBlock_1 = - _registerName1("enumerateObjectsAtIndexes:options:usingBlock:"); - void _objc_msgSend_134( + 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 s, - int opts, - ffi.Pointer<_ObjCBlock> block, + int index, ) { - return __objc_msgSend_134( + return __objc_msgSend_13( obj, sel, - s, - opts, - block, + index, ); } - late final __objc_msgSend_134Ptr = _lookup< + late final __objc_msgSend_13Ptr = _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>)>(); + 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_indexOfObjectPassingTest_1 = - _registerName1("indexOfObjectPassingTest:"); - int _objc_msgSend_135( + 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<_ObjCBlock> predicate, + ffi.Pointer coder, ) { - return __objc_msgSend_135( + return __objc_msgSend_14( obj, sel, - predicate, + coder, ); } - late final __objc_msgSend_135Ptr = _lookup< + late final __objc_msgSend_14Ptr = _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>)>(); + 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_indexOfObjectWithOptions_passingTest_1 = - _registerName1("indexOfObjectWithOptions:passingTest:"); - int _objc_msgSend_136( + late final _sel_substringFromIndex_1 = _registerName1("substringFromIndex:"); + ffi.Pointer _objc_msgSend_15( ffi.Pointer obj, ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> predicate, + int from, ) { - return __objc_msgSend_136( + return __objc_msgSend_15( obj, sel, - opts, - predicate, + from, ); } - late final __objc_msgSend_136Ptr = _lookup< + late final __objc_msgSend_15Ptr = _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 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_indexOfObjectAtIndexes_options_passingTest_1 = - _registerName1("indexOfObjectAtIndexes:options:passingTest:"); - int _objc_msgSend_137( + 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 s, - int opts, - ffi.Pointer<_ObjCBlock> predicate, + NSRange range, ) { - return __objc_msgSend_137( + return __objc_msgSend_16( obj, sel, - s, - opts, - predicate, + range, ); } - late final __objc_msgSend_137Ptr = _lookup< + late final __objc_msgSend_16Ptr = _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< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, 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_indexesOfObjectsPassingTest_1 = - _registerName1("indexesOfObjectsPassingTest:"); - ffi.Pointer _objc_msgSend_138( + late final _sel_getCharacters_range_1 = + _registerName1("getCharacters:range:"); + void _objc_msgSend_17( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> predicate, + ffi.Pointer buffer, + NSRange range, ) { - return __objc_msgSend_138( + return __objc_msgSend_17( obj, sel, - predicate, + buffer, + range, ); } - late final __objc_msgSend_138Ptr = _lookup< + late final __objc_msgSend_17Ptr = _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>)>(); - - late final _sel_indexesOfObjectsWithOptions_passingTest_1 = - _registerName1("indexesOfObjectsWithOptions:passingTest:"); - ffi.Pointer _objc_msgSend_139( - ffi.Pointer obj, - ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> predicate, - ) { - return __objc_msgSend_139( - obj, - sel, - opts, - predicate, - ); - } - - late final __objc_msgSend_139Ptr = _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.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_indexesOfObjectsAtIndexes_options_passingTest_1 = - _registerName1("indexesOfObjectsAtIndexes:options:passingTest:"); - ffi.Pointer _objc_msgSend_140( + 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_140( + return __objc_msgSend_18( obj, sel, - s, - opts, - predicate, + string, ); } - late final __objc_msgSend_140Ptr = _lookup< + late final __objc_msgSend_18Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer 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>)>(); + 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_sortedArrayUsingComparator_1 = - _registerName1("sortedArrayUsingComparator:"); - ffi.Pointer _objc_msgSend_141( + late final _sel_compare_options_1 = _registerName1("compare:options:"); + int _objc_msgSend_19( ffi.Pointer obj, ffi.Pointer sel, - NSComparator cmptr, + ffi.Pointer string, + int mask, ) { - return __objc_msgSend_141( + return __objc_msgSend_19( obj, sel, - cmptr, + string, + mask, ); } - late final __objc_msgSend_141Ptr = _lookup< + late final __objc_msgSend_19Ptr = _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.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_sortedArrayWithOptions_usingComparator_1 = - _registerName1("sortedArrayWithOptions:usingComparator:"); - ffi.Pointer _objc_msgSend_142( + late final _sel_compare_options_range_1 = + _registerName1("compare:options:range:"); + int _objc_msgSend_20( ffi.Pointer obj, ffi.Pointer sel, - int opts, - NSComparator cmptr, + ffi.Pointer string, + int mask, + NSRange rangeOfReceiverToCompare, ) { - return __objc_msgSend_142( + return __objc_msgSend_20( obj, sel, - opts, - cmptr, + string, + mask, + rangeOfReceiverToCompare, ); } - late final __objc_msgSend_142Ptr = _lookup< + late final __objc_msgSend_20Ptr = _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.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_indexOfObject_inSortedRange_options_usingComparator_1 = - _registerName1("indexOfObject:inSortedRange:options:usingComparator:"); - int _objc_msgSend_143( + 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 obj1, - NSRange r, - int opts, - NSComparator cmp, + ffi.Pointer string, + int mask, + NSRange rangeOfReceiverToCompare, + ffi.Pointer locale, ) { - return __objc_msgSend_143( + return __objc_msgSend_21( obj, sel, - obj1, - r, - opts, - cmp, + string, + mask, + rangeOfReceiverToCompare, + locale, ); } - late final __objc_msgSend_143Ptr = _lookup< + late final __objc_msgSend_21Ptr = _lookup< ffi.NativeFunction< - NSUInteger Function( + ffi.Int32 Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - NSRange, ffi.Int32, - NSComparator)>>('objc_msgSend'); - late final __objc_msgSend_143 = __objc_msgSend_143Ptr.asFunction< + NSRange, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_21 = __objc_msgSend_21Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSRange, int, NSComparator)>(); + ffi.Pointer, int, NSRange, 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_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 array, - bool flag, + ffi.Pointer aString, ) { - return __objc_msgSend_144( + return __objc_msgSend_22( obj, sel, - array, - flag, + aString, ); } - late final __objc_msgSend_144Ptr = _lookup< + late final __objc_msgSend_22Ptr = _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)>(); + 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_initWithContentsOfURL_error_1 = - _registerName1("initWithContentsOfURL:error:"); - ffi.Pointer _objc_msgSend_145( + 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 url, - ffi.Pointer> error, + ffi.Pointer str, + int mask, ) { - return __objc_msgSend_145( + return __objc_msgSend_23( obj, sel, - url, - error, + str, + mask, ); } - late final __objc_msgSend_145Ptr = _lookup< + late final __objc_msgSend_23Ptr = _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>)>(); + 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_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_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 inserts, - ffi.Pointer insertedObjects, - ffi.Pointer removes, - ffi.Pointer removedObjects, - ffi.Pointer changes, + ffi.Pointer str, ) { - return __objc_msgSend_146( + return __objc_msgSend_24( obj, sel, - inserts, - insertedObjects, - removes, - removedObjects, - changes, + str, ); } - late final __objc_msgSend_146Ptr = _lookup< + late final __objc_msgSend_24Ptr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, + NSRange Function(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, + late final __objc_msgSend_24 = __objc_msgSend_24Ptr.asFunction< + NSRange Function(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_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 inserts, - ffi.Pointer insertedObjects, - ffi.Pointer removes, - ffi.Pointer removedObjects, + ffi.Pointer searchString, + int mask, ) { - return __objc_msgSend_147( + return __objc_msgSend_25( obj, sel, - inserts, - insertedObjects, - removes, - removedObjects, + searchString, + mask, ); } - late final __objc_msgSend_147Ptr = _lookup< + late final __objc_msgSend_25Ptr = _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)>(); + 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_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_rangeOfString_options_range_1 = + _registerName1("rangeOfString:options:range:"); + NSRange _objc_msgSend_26( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer anObject, - int type, - int index, + ffi.Pointer searchString, + int mask, + NSRange rangeOfReceiverToSearch, ) { - return __objc_msgSend_148( + return __objc_msgSend_26( obj, sel, - anObject, - type, - index, + searchString, + mask, + rangeOfReceiverToSearch, ); } - late final __objc_msgSend_148Ptr = _lookup< + late final __objc_msgSend_26Ptr = _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)>(); + 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_changeWithObject_type_index_associatedIndex_1 = - _registerName1("changeWithObject:type:index:associatedIndex:"); - ffi.Pointer _objc_msgSend_149( + 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 anObject, - int type, - int index, - int associatedIndex, + ffi.Pointer searchString, + int mask, + NSRange rangeOfReceiverToSearch, + ffi.Pointer locale, ) { - return __objc_msgSend_149( + return __objc_msgSend_27( obj, sel, - anObject, - type, - index, - associatedIndex, + searchString, + mask, + rangeOfReceiverToSearch, + locale, ); } - late final __objc_msgSend_149Ptr = _lookup< + late final __objc_msgSend_27Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( + NSRange 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)>(); + 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 _sel_object1 = _registerName1("object"); - late final _sel_changeType1 = _registerName1("changeType"); - int _objc_msgSend_150( + 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_150( + return __objc_msgSend_28( obj, sel, ); } - late final __objc_msgSend_150Ptr = _lookup< + late final __objc_msgSend_28Ptr = _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_28 = __objc_msgSend_28Ptr.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_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_151( + return __objc_msgSend_29( obj, sel, - anObject, - type, - index, + aRange, ); } - late final __objc_msgSend_151Ptr = _lookup< + late final __objc_msgSend_29Ptr = _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, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_29 = __objc_msgSend_29Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, NSRange)>(); - late final _sel_initWithObject_type_index_associatedIndex_1 = - _registerName1("initWithObject:type:index:associatedIndex:"); - instancetype _objc_msgSend_152( + 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_152( + return __objc_msgSend_30( obj, sel, - anObject, - type, - index, - associatedIndex, + aString, ); } - late final __objc_msgSend_152Ptr = _lookup< + late final __objc_msgSend_30Ptr = _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)>(); + 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 _sel_differenceByTransformingChangesWithBlock_1 = - _registerName1("differenceByTransformingChangesWithBlock:"); - ffi.Pointer _objc_msgSend_153( + late final _class_NSData1 = _getClass1("NSData"); + late final _sel_bytes1 = _registerName1("bytes"); + ffi.Pointer _objc_msgSend_31( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_153( + return __objc_msgSend_31( obj, sel, - block, ); } - late final __objc_msgSend_153Ptr = _lookup< + late final __objc_msgSend_31Ptr = _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.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 _sel_inverseDifference1 = _registerName1("inverseDifference"); - late final _sel_differenceFromArray_withOptions_usingEquivalenceTest_1 = - _registerName1("differenceFromArray:withOptions:usingEquivalenceTest:"); - ffi.Pointer _objc_msgSend_154( + late final _sel_description1 = _registerName1("description"); + ffi.Pointer _objc_msgSend_32( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer other, - int options, - ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_154( + return __objc_msgSend_32( obj, sel, - other, - options, - block, ); } - late final __objc_msgSend_154Ptr = _lookup< + late final __objc_msgSend_32Ptr = _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, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_32 = __objc_msgSend_32Ptr.asFunction< ffi.Pointer 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_getBytes_length_1 = _registerName1("getBytes:length:"); + void _objc_msgSend_33( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer other, - int options, + ffi.Pointer buffer, + int length, ) { - return __objc_msgSend_155( + return __objc_msgSend_33( obj, sel, - other, - options, + buffer, + length, ); } - late final __objc_msgSend_155Ptr = _lookup< + late final __objc_msgSend_33Ptr = _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.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_differenceFromArray_1 = - _registerName1("differenceFromArray:"); - ffi.Pointer _objc_msgSend_156( + 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 __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 _sel_isEqualToData_1 = _registerName1("isEqualToData:"); + bool _objc_msgSend_35( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer other, ) { - return __objc_msgSend_156( + return __objc_msgSend_35( obj, sel, other, ); } - late final __objc_msgSend_156Ptr = _lookup< + late final __objc_msgSend_35Ptr = _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.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_arrayByApplyingDifference_1 = - _registerName1("arrayByApplyingDifference:"); - ffi.Pointer _objc_msgSend_157( + late final _sel_subdataWithRange_1 = _registerName1("subdataWithRange:"); + ffi.Pointer _objc_msgSend_36( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer difference, + NSRange range, ) { - return __objc_msgSend_157( + return __objc_msgSend_36( obj, sel, - difference, + range, ); } - late final __objc_msgSend_157Ptr = _lookup< + late final __objc_msgSend_36Ptr = _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.Pointer, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_36 = __objc_msgSend_36Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, NSRange)>(); - late final _sel_getObjects_1 = _registerName1("getObjects:"); - void _objc_msgSend_158( + late final _sel_writeToFile_atomically_1 = + _registerName1("writeToFile:atomically:"); + bool _objc_msgSend_37( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer> objects, + ffi.Pointer path, + bool useAuxiliaryFile, ) { - return __objc_msgSend_158( + return __objc_msgSend_37( obj, sel, - objects, + path, + useAuxiliaryFile, ); } - late final __objc_msgSend_158Ptr = _lookup< + late final __objc_msgSend_37Ptr = _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>)>(); + 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_arrayWithContentsOfFile_1 = - _registerName1("arrayWithContentsOfFile:"); - ffi.Pointer _objc_msgSend_159( + 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 __objc_msgSend_159( + return __objc_msgSend_38( obj, sel, + scheme, + host, path, ); } - late final __objc_msgSend_159Ptr = _lookup< + late final __objc_msgSend_38Ptr = _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.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_arrayWithContentsOfURL_1 = - _registerName1("arrayWithContentsOfURL:"); - ffi.Pointer _objc_msgSend_160( + late final _sel_initFileURLWithPath_isDirectory_relativeToURL_1 = + _registerName1("initFileURLWithPath:isDirectory:relativeToURL:"); + instancetype _objc_msgSend_39( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer url, + ffi.Pointer path, + bool isDir, + ffi.Pointer baseURL, ) { - return __objc_msgSend_160( + return __objc_msgSend_39( obj, sel, - url, + path, + isDir, + baseURL, ); } - late final __objc_msgSend_160Ptr = _lookup< + late final __objc_msgSend_39Ptr = _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.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_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_relativeToURL_1 = + _registerName1("initFileURLWithPath:relativeToURL:"); + instancetype _objc_msgSend_40( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer url, - bool atomically, + ffi.Pointer path, + ffi.Pointer baseURL, ) { - return __objc_msgSend_161( + return __objc_msgSend_40( obj, sel, - url, - atomically, + path, + baseURL, ); } - late final __objc_msgSend_161Ptr = _lookup< + late final __objc_msgSend_40Ptr = _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)>(); + 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_allKeys1 = _registerName1("allKeys"); - ffi.Pointer _objc_msgSend_162( + 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 __objc_msgSend_162( + return __objc_msgSend_41( obj, sel, + path, + isDir, ); } - late final __objc_msgSend_162Ptr = _lookup< + late final __objc_msgSend_41Ptr = _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)>(); + 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)>(); - 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)>(); - - 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_166( - obj, - sel, - block, - ); - } - - late final __objc_msgSend_166Ptr = _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, + ffi.Pointer)>(); - late final _sel_enumerateKeysAndObjectsWithOptions_usingBlock_1 = - _registerName1("enumerateKeysAndObjectsWithOptions:usingBlock:"); - void _objc_msgSend_167( + late final _sel_fileURLWithPath_isDirectory_1 = + _registerName1("fileURLWithPath:isDirectory:"); + ffi.Pointer _objc_msgSend_45( ffi.Pointer obj, ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> block, + ffi.Pointer path, + bool isDir, ) { - return __objc_msgSend_167( + return __objc_msgSend_45( obj, sel, - opts, - block, + path, + isDir, ); } - late final __objc_msgSend_167Ptr = _lookup< + late final __objc_msgSend_45Ptr = _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, + 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_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_fileURLWithPath_1 = _registerName1("fileURLWithPath:"); + ffi.Pointer _objc_msgSend_46( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> predicate, + ffi.Pointer path, ) { - return __objc_msgSend_168( + return __objc_msgSend_46( obj, sel, - predicate, + path, ); } - late final __objc_msgSend_168Ptr = _lookup< + late final __objc_msgSend_46Ptr = _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, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_46 = __objc_msgSend_46Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer, ffi.Pointer)>(); - late final _sel_keysOfEntriesWithOptions_passingTest_1 = - _registerName1("keysOfEntriesWithOptions:passingTest:"); - ffi.Pointer _objc_msgSend_169( + late final _sel_initFileURLWithFileSystemRepresentation_isDirectory_relativeToURL_1 = + _registerName1( + "initFileURLWithFileSystemRepresentation:isDirectory:relativeToURL:"); + instancetype _objc_msgSend_47( 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_47( obj, sel, - opts, - predicate, + path, + isDir, + baseURL, ); } - late final __objc_msgSend_169Ptr = _lookup< + late final __objc_msgSend_47Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( + instancetype 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, + 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_getObjects_andKeys_1 = _registerName1("getObjects:andKeys:"); - void _objc_msgSend_170( + late final _sel_fileURLWithFileSystemRepresentation_isDirectory_relativeToURL_1 = + _registerName1( + "fileURLWithFileSystemRepresentation:isDirectory:relativeToURL:"); + ffi.Pointer _objc_msgSend_48( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer> objects, - ffi.Pointer> keys, + ffi.Pointer path, + bool isDir, + ffi.Pointer baseURL, ) { - return __objc_msgSend_170( + return __objc_msgSend_48( obj, sel, - objects, - keys, + path, + isDir, + baseURL, ); } - late final __objc_msgSend_170Ptr = _lookup< + late final __objc_msgSend_48Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( + ffi.Pointer 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.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( + late final _sel_componentsJoinedByString_1 = + _registerName1("componentsJoinedByString:"); + ffi.Pointer _objc_msgSend_98( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer base64Data, - int options, + ffi.Pointer separator, ) { - return __objc_msgSend_220( + return __objc_msgSend_98( obj, sel, - base64Data, - options, + separator, ); } - late final __objc_msgSend_220Ptr = _lookup< + late final __objc_msgSend_98Ptr = _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)>(); + 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_base64EncodedDataWithOptions_1 = - _registerName1("base64EncodedDataWithOptions:"); - ffi.Pointer _objc_msgSend_221( + 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 options, + ffi.Pointer locale, + int level, ) { - return __objc_msgSend_221( + return __objc_msgSend_99( obj, sel, - options, + locale, + level, ); } - late final __objc_msgSend_221Ptr = _lookup< + late final __objc_msgSend_99Ptr = _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 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)>(); - late final _sel_decompressedDataUsingAlgorithm_error_1 = - _registerName1("decompressedDataUsingAlgorithm:error:"); - instancetype _objc_msgSend_222( + late final _sel_firstObjectCommonWithArray_1 = + _registerName1("firstObjectCommonWithArray:"); + ffi.Pointer _objc_msgSend_100( ffi.Pointer obj, ffi.Pointer sel, - int algorithm, - ffi.Pointer> error, + ffi.Pointer otherArray, ) { - return __objc_msgSend_222( + return __objc_msgSend_100( obj, sel, - algorithm, - error, + otherArray, ); } - late final __objc_msgSend_222Ptr = _lookup< + late final __objc_msgSend_100Ptr = _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.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_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_getObjects_range_1 = _registerName1("getObjects:range:"); + void _objc_msgSend_101( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer data, + ffi.Pointer> objects, + NSRange range, ) { - return __objc_msgSend_223( + return __objc_msgSend_101( obj, sel, - data, + objects, + range, ); } - late final __objc_msgSend_223Ptr = _lookup< + late final __objc_msgSend_101Ptr = _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)>(); + 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_characterSetWithContentsOfFile_1 = - _registerName1("characterSetWithContentsOfFile:"); - late final _sel_characterIsMember_1 = _registerName1("characterIsMember:"); - bool _objc_msgSend_224( + late final _sel_indexOfObject_1 = _registerName1("indexOfObject:"); + int _objc_msgSend_102( ffi.Pointer obj, ffi.Pointer sel, - int aCharacter, + ffi.Pointer anObject, ) { - return __objc_msgSend_224( + return __objc_msgSend_102( obj, sel, - aCharacter, + anObject, ); } - late final __objc_msgSend_224Ptr = _lookup< + late final __objc_msgSend_102Ptr = _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)>(); + 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_bitmapRepresentation1 = - _registerName1("bitmapRepresentation"); - late final _sel_invertedSet1 = _registerName1("invertedSet"); - late final _sel_longCharacterIsMember_1 = - _registerName1("longCharacterIsMember:"); - bool _objc_msgSend_225( + late final _sel_indexOfObject_inRange_1 = + _registerName1("indexOfObject:inRange:"); + int _objc_msgSend_103( ffi.Pointer obj, ffi.Pointer sel, - int theLongChar, + ffi.Pointer anObject, + NSRange range, ) { - return __objc_msgSend_225( + return __objc_msgSend_103( obj, sel, - theLongChar, + anObject, + range, ); } - late final __objc_msgSend_225Ptr = _lookup< + late final __objc_msgSend_103Ptr = _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, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_103 = __objc_msgSend_103Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSRange)>(); - late final _sel_isSupersetOfSet_1 = _registerName1("isSupersetOfSet:"); - bool _objc_msgSend_226( + 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 theOtherSet, + ffi.Pointer otherArray, ) { - return __objc_msgSend_226( + return __objc_msgSend_104( obj, sel, - theOtherSet, + otherArray, ); } - late final __objc_msgSend_226Ptr = _lookup< + late final __objc_msgSend_104Ptr = _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_104 = __objc_msgSend_104Ptr.asFunction< bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - late final _sel_hasMemberInPlane_1 = _registerName1("hasMemberInPlane:"); - bool _objc_msgSend_227( + 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, - int thePlane, + ffi.Pointer< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>> + comparator, + ffi.Pointer context, ) { - return __objc_msgSend_227( + return __objc_msgSend_105( obj, sel, - thePlane, + comparator, + context, ); } - late final __objc_msgSend_227Ptr = _lookup< + late final __objc_msgSend_105Ptr = _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 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_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_sortedArrayUsingFunction_context_hint_1 = + _registerName1("sortedArrayUsingFunction:context:hint:"); + ffi.Pointer _objc_msgSend_106( 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, + ffi.Pointer hint, ) { - return __objc_msgSend_228( + return __objc_msgSend_106( obj, sel, - searchSet, + comparator, + context, + hint, ); } - late final __objc_msgSend_228Ptr = _lookup< + late final __objc_msgSend_106Ptr = _lookup< ffi.NativeFunction< - NSRange Function(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, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_228 = __objc_msgSend_228Ptr.asFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, + 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_1 = - _registerName1("rangeOfCharacterFromSet:options:"); - NSRange _objc_msgSend_229( + late final _sel_sortedArrayUsingSelector_1 = + _registerName1("sortedArrayUsingSelector:"); + ffi.Pointer _objc_msgSend_107( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer searchSet, - int mask, + ffi.Pointer comparator, ) { - return __objc_msgSend_229( + return __objc_msgSend_107( obj, sel, - searchSet, - mask, + comparator, ); } - late final __objc_msgSend_229Ptr = _lookup< + late final __objc_msgSend_107Ptr = _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)>>('objc_msgSend'); + late final __objc_msgSend_107 = __objc_msgSend_107Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_rangeOfCharacterFromSet_options_range_1 = - _registerName1("rangeOfCharacterFromSet:options:range:"); - NSRange _objc_msgSend_230( + late final _sel_subarrayWithRange_1 = _registerName1("subarrayWithRange:"); + ffi.Pointer _objc_msgSend_108( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer searchSet, - int mask, - NSRange rangeOfReceiverToSearch, + NSRange range, ) { - return __objc_msgSend_230( + return __objc_msgSend_108( obj, sel, - searchSet, - mask, - rangeOfReceiverToSearch, + range, ); } - late final __objc_msgSend_230Ptr = _lookup< + late final __objc_msgSend_108Ptr = _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, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_108 = __objc_msgSend_108Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, NSRange)>(); - late final _sel_rangeOfComposedCharacterSequenceAtIndex_1 = - _registerName1("rangeOfComposedCharacterSequenceAtIndex:"); - NSRange _objc_msgSend_231( + late final _sel_writeToURL_error_1 = _registerName1("writeToURL:error:"); + bool _objc_msgSend_109( ffi.Pointer obj, ffi.Pointer sel, - int index, + ffi.Pointer url, + ffi.Pointer> error, ) { - return __objc_msgSend_231( + return __objc_msgSend_109( obj, sel, - index, + url, + error, ); } - late final __objc_msgSend_231Ptr = _lookup< + late final __objc_msgSend_109Ptr = _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.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_rangeOfComposedCharacterSequencesForRange_1 = - _registerName1("rangeOfComposedCharacterSequencesForRange:"); - NSRange _objc_msgSend_232( + 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, - NSRange range, + ffi.Pointer aSelector, + ffi.Pointer argument, ) { - return __objc_msgSend_232( + return __objc_msgSend_110( obj, sel, - range, + aSelector, + argument, ); } - late final __objc_msgSend_232Ptr = _lookup< + late final __objc_msgSend_110Ptr = _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, 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_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 _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 locale, + NSRange range, ) { - return __objc_msgSend_233( + return __objc_msgSend_111( obj, sel, - locale, + range, ); } - late final __objc_msgSend_233Ptr = _lookup< + late final __objc_msgSend_111Ptr = _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)>(); + 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_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 _sel_initWithIndexesInRange_1 = + _registerName1("initWithIndexesInRange:"); + late final _sel_initWithIndexSet_1 = _registerName1("initWithIndexSet:"); + instancetype _objc_msgSend_112( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer startPtr, - ffi.Pointer lineEndPtr, - ffi.Pointer contentsEndPtr, - NSRange range, + ffi.Pointer indexSet, ) { - return __objc_msgSend_234( + return __objc_msgSend_112( obj, sel, - startPtr, - lineEndPtr, - contentsEndPtr, - range, + indexSet, ); } - late final __objc_msgSend_234Ptr = _lookup< + late final __objc_msgSend_112Ptr = _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)>(); + 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_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_initWithIndex_1 = _registerName1("initWithIndex:"); + late final _sel_isEqualToIndexSet_1 = _registerName1("isEqualToIndexSet:"); + bool _objc_msgSend_113( ffi.Pointer obj, ffi.Pointer sel, - NSRange range, - int opts, - ffi.Pointer<_ObjCBlock> block, + ffi.Pointer indexSet, ) { - return __objc_msgSend_235( + return __objc_msgSend_113( obj, sel, - range, - opts, - block, + indexSet, ); } - late final __objc_msgSend_235Ptr = _lookup< + late final __objc_msgSend_113Ptr = _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.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_enumerateLinesUsingBlock_1 = - _registerName1("enumerateLinesUsingBlock:"); - void _objc_msgSend_236( + 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<_ObjCBlock> block, + int value, ) { - return __objc_msgSend_236( + return __objc_msgSend_114( obj, sel, - block, + value, ); } - late final __objc_msgSend_236Ptr = _lookup< + late final __objc_msgSend_114Ptr = _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>)>(); + 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_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_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, - bool lossy, + ffi.Pointer indexBuffer, + int bufferSize, + NSRangePointer range, ) { - return __objc_msgSend_237( + return __objc_msgSend_115( obj, sel, - encoding, - lossy, + indexBuffer, + bufferSize, + range, ); } - late final __objc_msgSend_237Ptr = _lookup< + late final __objc_msgSend_115Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( + NSUInteger 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.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_dataUsingEncoding_1 = _registerName1("dataUsingEncoding:"); - ffi.Pointer _objc_msgSend_238( + late final _sel_countOfIndexesInRange_1 = + _registerName1("countOfIndexesInRange:"); + int _objc_msgSend_116( ffi.Pointer obj, ffi.Pointer sel, - int encoding, + NSRange range, ) { - return __objc_msgSend_238( + return __objc_msgSend_116( obj, sel, - encoding, + range, ); } - late final __objc_msgSend_238Ptr = _lookup< + late final __objc_msgSend_116Ptr = _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, + NSRange)>>('objc_msgSend'); + late final __objc_msgSend_116 = __objc_msgSend_116Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, NSRange)>(); - late final _sel_canBeConvertedToEncoding_1 = - _registerName1("canBeConvertedToEncoding:"); - late final _sel_cStringUsingEncoding_1 = - _registerName1("cStringUsingEncoding:"); - ffi.Pointer _objc_msgSend_239( + late final _sel_containsIndex_1 = _registerName1("containsIndex:"); + bool _objc_msgSend_117( ffi.Pointer obj, ffi.Pointer sel, - int encoding, + int value, ) { - return __objc_msgSend_239( + return __objc_msgSend_117( obj, sel, - encoding, + value, ); } - late final __objc_msgSend_239Ptr = _lookup< + late final __objc_msgSend_117Ptr = _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.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_getCString_maxLength_encoding_1 = - _registerName1("getCString:maxLength:encoding:"); - bool _objc_msgSend_240( + late final _sel_containsIndexesInRange_1 = + _registerName1("containsIndexesInRange:"); + bool _objc_msgSend_118( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer buffer, - int maxBufferCount, - int encoding, + NSRange range, ) { - return __objc_msgSend_240( + return __objc_msgSend_118( obj, sel, - buffer, - maxBufferCount, - encoding, + range, ); } - late final __objc_msgSend_240Ptr = _lookup< + late final __objc_msgSend_118Ptr = _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, + NSRange)>>('objc_msgSend'); + late final __objc_msgSend_118 = __objc_msgSend_118Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, NSRange)>(); - 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_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 buffer, - int maxBufferCount, - ffi.Pointer usedBufferCount, - int encoding, - int options, - NSRange range, - NSRangePointer leftover, + ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_241( + return __objc_msgSend_119( obj, sel, - buffer, - maxBufferCount, - usedBufferCount, - encoding, - options, - range, - leftover, + block, ); } - late final __objc_msgSend_241Ptr = _lookup< + late final __objc_msgSend_119Ptr = _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.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_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_enumerateIndexesWithOptions_usingBlock_1 = + _registerName1("enumerateIndexesWithOptions:usingBlock:"); + void _objc_msgSend_120( ffi.Pointer obj, ffi.Pointer sel, + int opts, + ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_242( + return __objc_msgSend_120( obj, sel, + opts, + block, ); } - late final __objc_msgSend_242Ptr = _lookup< + late final __objc_msgSend_120Ptr = _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.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_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_enumerateIndexesInRange_options_usingBlock_1 = + _registerName1("enumerateIndexesInRange:options:usingBlock:"); + void _objc_msgSend_121( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer separator, + NSRange range, + int opts, + ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_243( + return __objc_msgSend_121( obj, sel, - separator, + range, + opts, + block, ); } - late final __objc_msgSend_243Ptr = _lookup< + late final __objc_msgSend_121Ptr = _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, + 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_stringByTrimmingCharactersInSet_1 = - _registerName1("stringByTrimmingCharactersInSet:"); - ffi.Pointer _objc_msgSend_244( + late final _sel_indexPassingTest_1 = _registerName1("indexPassingTest:"); + int _objc_msgSend_122( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer set1, + ffi.Pointer<_ObjCBlock> predicate, ) { - return __objc_msgSend_244( + return __objc_msgSend_122( obj, sel, - set1, + predicate, ); } - late final __objc_msgSend_244Ptr = _lookup< + late final __objc_msgSend_122Ptr = _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)>(); + 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_stringByPaddingToLength_withString_startingAtIndex_1 = - _registerName1("stringByPaddingToLength:withString:startingAtIndex:"); - ffi.Pointer _objc_msgSend_245( + late final _sel_indexWithOptions_passingTest_1 = + _registerName1("indexWithOptions:passingTest:"); + int _objc_msgSend_123( ffi.Pointer obj, ffi.Pointer sel, - int newLength, - ffi.Pointer padString, - int padIndex, + int opts, + ffi.Pointer<_ObjCBlock> predicate, ) { - return __objc_msgSend_245( + return __objc_msgSend_123( obj, sel, - newLength, - padString, - padIndex, + opts, + predicate, ); } - late final __objc_msgSend_245Ptr = _lookup< + late final __objc_msgSend_123Ptr = _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.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_stringByFoldingWithOptions_locale_1 = - _registerName1("stringByFoldingWithOptions:locale:"); - ffi.Pointer _objc_msgSend_246( + late final _sel_indexInRange_options_passingTest_1 = + _registerName1("indexInRange:options:passingTest:"); + int _objc_msgSend_124( ffi.Pointer obj, ffi.Pointer sel, - int options, - ffi.Pointer locale, + NSRange range, + int opts, + ffi.Pointer<_ObjCBlock> predicate, ) { - return __objc_msgSend_246( + return __objc_msgSend_124( obj, sel, - options, - locale, + range, + opts, + predicate, ); } - late final __objc_msgSend_246Ptr = _lookup< + late final __objc_msgSend_124Ptr = _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, + 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_options_range_1 = - _registerName1( - "stringByReplacingOccurrencesOfString:withString:options:range:"); - ffi.Pointer _objc_msgSend_247( + late final _sel_indexesPassingTest_1 = _registerName1("indexesPassingTest:"); + ffi.Pointer _objc_msgSend_125( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer target, - ffi.Pointer replacement, - int options, - NSRange searchRange, + ffi.Pointer<_ObjCBlock> predicate, ) { - return __objc_msgSend_247( + return __objc_msgSend_125( obj, sel, - target, - replacement, - options, - searchRange, + predicate, ); } - late final __objc_msgSend_247Ptr = _lookup< + late final __objc_msgSend_125Ptr = _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.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_stringByReplacingOccurrencesOfString_withString_1 = - _registerName1("stringByReplacingOccurrencesOfString:withString:"); - ffi.Pointer _objc_msgSend_248( + late final _sel_indexesWithOptions_passingTest_1 = + _registerName1("indexesWithOptions:passingTest:"); + ffi.Pointer _objc_msgSend_126( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer target, - ffi.Pointer replacement, + int opts, + ffi.Pointer<_ObjCBlock> predicate, ) { - return __objc_msgSend_248( + return __objc_msgSend_126( obj, sel, - target, - replacement, + opts, + predicate, ); } - late final __objc_msgSend_248Ptr = _lookup< + 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( - ffi.Pointer obj, + 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 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_sortedArrayWithOptions_usingComparator_1 = + _registerName1("sortedArrayWithOptions:usingComparator:"); + ffi.Pointer _objc_msgSend_142( + ffi.Pointer obj, + ffi.Pointer sel, + int opts, + NSComparator cmptr, + ) { + return __objc_msgSend_142( + obj, + sel, + opts, + cmptr, + ); + } + + late final __objc_msgSend_142Ptr = _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)>(); + + 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 obj1, + NSRange r, + int opts, + NSComparator cmp, + ) { + return __objc_msgSend_143( + obj, + sel, + obj1, + r, + opts, + cmp, + ); + } + + late final __objc_msgSend_143Ptr = _lookup< + ffi.NativeFunction< + NSUInteger 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, + 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_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_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 nullTerminatedCString, - int encoding, + ffi.Pointer array, + bool flag, ) { - return __objc_msgSend_264( + return __objc_msgSend_144( obj, sel, - nullTerminatedCString, - encoding, + array, + flag, ); } - late final __objc_msgSend_264Ptr = _lookup< + late final __objc_msgSend_144Ptr = _lookup< ffi.NativeFunction< instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSStringEncoding)>>('objc_msgSend'); - late final __objc_msgSend_264 = __objc_msgSend_264Ptr.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)>(); + ffi.Pointer, bool)>(); - 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_initWithContentsOfURL_error_1 = + _registerName1("initWithContentsOfURL:error:"); + ffi.Pointer _objc_msgSend_145( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer url, - int enc, ffi.Pointer> error, ) { - return __objc_msgSend_265( + return __objc_msgSend_145( obj, sel, url, - enc, error, ); } - late final __objc_msgSend_265Ptr = _lookup< + late final __objc_msgSend_145Ptr = _lookup< ffi.NativeFunction< - instancetype Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - NSStringEncoding, ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_265 = __objc_msgSend_265Ptr.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_initWithContentsOfFile_encoding_error_1 = - _registerName1("initWithContentsOfFile:encoding:error:"); - instancetype _objc_msgSend_266( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - int enc, - ffi.Pointer> error, + 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 inserts, + ffi.Pointer insertedObjects, + ffi.Pointer removes, + ffi.Pointer removedObjects, + ffi.Pointer changes, ) { - return __objc_msgSend_266( + return __objc_msgSend_146( obj, sel, - path, - enc, - error, + inserts, + insertedObjects, + removes, + removedObjects, + changes, ); } - late final __objc_msgSend_266Ptr = _lookup< + late final __objc_msgSend_146Ptr = _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< + 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_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_initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects_1 = + _registerName1( + "initWithInsertIndexes:insertedObjects:removeIndexes:removedObjects:"); + instancetype _objc_msgSend_147( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer url, - ffi.Pointer enc, - ffi.Pointer> error, + ffi.Pointer inserts, + ffi.Pointer insertedObjects, + ffi.Pointer removes, + ffi.Pointer removedObjects, ) { - return __objc_msgSend_267( + return __objc_msgSend_147( obj, sel, - url, - enc, - error, + inserts, + insertedObjects, + removes, + removedObjects, ); } - late final __objc_msgSend_267Ptr = _lookup< + late final __objc_msgSend_147Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_267 = __objc_msgSend_267Ptr.asFunction< + 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, + ffi.Pointer)>(); - late final _sel_initWithContentsOfFile_usedEncoding_error_1 = - _registerName1("initWithContentsOfFile:usedEncoding:error:"); - instancetype _objc_msgSend_268( + 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 path, - ffi.Pointer enc, - ffi.Pointer> error, + ffi.Pointer anObject, + int type, + int index, ) { - return __objc_msgSend_268( + return __objc_msgSend_148( obj, sel, - path, - enc, - error, + anObject, + type, + index, ); } - late final __objc_msgSend_268Ptr = _lookup< + late final __objc_msgSend_148Ptr = _lookup< ffi.NativeFunction< - instancetype Function( + ffi.Pointer 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>)>(); + 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_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( + 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 data, - ffi.Pointer opts, - ffi.Pointer> string, - ffi.Pointer usedLossyConversion, + ffi.Pointer anObject, + int type, + int index, + int associatedIndex, ) { - return __objc_msgSend_269( + return __objc_msgSend_149( obj, sel, - data, - opts, - string, - usedLossyConversion, + anObject, + type, + index, + associatedIndex, ); } - late final __objc_msgSend_269Ptr = _lookup< + late final __objc_msgSend_149Ptr = _lookup< ffi.NativeFunction< - NSStringEncoding Function( + ffi.Pointer 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)>(); + 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_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( + late final _sel_object1 = _registerName1("object"); + late final _sel_changeType1 = _registerName1("changeType"); + int _objc_msgSend_150( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer bytes, ) { - return __objc_msgSend_270( + return __objc_msgSend_150( obj, sel, - bytes, ); } - late final __objc_msgSend_270Ptr = _lookup< + late final __objc_msgSend_150Ptr = _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)>(); + 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_getCString_maxLength_1 = - _registerName1("getCString:maxLength:"); - void _objc_msgSend_271( + 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 bytes, - int maxLength, + ffi.Pointer anObject, + int type, + int index, ) { - return __objc_msgSend_271( + return __objc_msgSend_151( obj, sel, - bytes, - maxLength, + anObject, + type, + index, ); } - late final __objc_msgSend_271Ptr = _lookup< + late final __objc_msgSend_151Ptr = _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)>(); + 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_getCString_maxLength_range_remainingRange_1 = - _registerName1("getCString:maxLength:range:remainingRange:"); - void _objc_msgSend_272( + 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 bytes, - int maxLength, - NSRange aRange, - NSRangePointer leftoverRange, + ffi.Pointer anObject, + int type, + int index, + int associatedIndex, ) { - return __objc_msgSend_272( + return __objc_msgSend_152( obj, sel, - bytes, - maxLength, - aRange, - leftoverRange, + anObject, + type, + index, + associatedIndex, ); } - late final __objc_msgSend_272Ptr = _lookup< + late final __objc_msgSend_152Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( + instancetype Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, + ffi.Pointer, + ffi.Int32, 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)>(); + 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_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_differenceByTransformingChangesWithBlock_1 = + _registerName1("differenceByTransformingChangesWithBlock:"); + ffi.Pointer _objc_msgSend_153( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer bytes, - int length, - bool freeBuffer, + ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_273( + return __objc_msgSend_153( obj, sel, - bytes, - length, - freeBuffer, + block, ); } - late final __objc_msgSend_273Ptr = _lookup< + late final __objc_msgSend_153Ptr = _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>)>(); + + 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, - 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)>(); + 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_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_differenceFromArray_withOptions_1 = + _registerName1("differenceFromArray:withOptions:"); + ffi.Pointer _objc_msgSend_155( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer buffer, + ffi.Pointer other, + int options, ) { - return __objc_msgSend_274( + return __objc_msgSend_155( obj, sel, - buffer, + other, + options, ); } - late final __objc_msgSend_274Ptr = _lookup< + late final __objc_msgSend_155Ptr = _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.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_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_differenceFromArray_1 = + _registerName1("differenceFromArray:"); + ffi.Pointer _objc_msgSend_156( ffi.Pointer obj, ffi.Pointer sel, - int aVersion, + ffi.Pointer other, ) { - return __objc_msgSend_275( + return __objc_msgSend_156( obj, sel, - aVersion, + other, ); } - late final __objc_msgSend_275Ptr = _lookup< + late final __objc_msgSend_156Ptr = _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)>(); + 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_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_arrayByApplyingDifference_1 = + _registerName1("arrayByApplyingDifference:"); + ffi.Pointer _objc_msgSend_157( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer sender, - ffi.Pointer newBytes, + ffi.Pointer difference, ) { - return __objc_msgSend_276( + return __objc_msgSend_157( obj, sel, - sender, - newBytes, + difference, ); } - late final __objc_msgSend_276Ptr = _lookup< + late final __objc_msgSend_157Ptr = _lookup< ffi.NativeFunction< - 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)>(); + 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_URLResourceDidFinishLoading_1 = - _registerName1("URLResourceDidFinishLoading:"); - void _objc_msgSend_277( + late final _sel_getObjects_1 = _registerName1("getObjects:"); + void _objc_msgSend_158( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer sender, + ffi.Pointer> objects, ) { - return __objc_msgSend_277( + return __objc_msgSend_158( obj, sel, - sender, + objects, ); } - late final __objc_msgSend_277Ptr = _lookup< + late final __objc_msgSend_158Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_277 = __objc_msgSend_277Ptr.asFunction< + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_158 = __objc_msgSend_158Ptr.asFunction< void Function(ffi.Pointer, 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_278( + late final _sel_arrayWithContentsOfFile_1 = + _registerName1("arrayWithContentsOfFile:"); + ffi.Pointer _objc_msgSend_159( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer sender, - ffi.Pointer reason, + ffi.Pointer path, ) { - return __objc_msgSend_278( + return __objc_msgSend_159( obj, sel, - sender, - reason, + path, ); } - late final __objc_msgSend_278Ptr = _lookup< + late final __objc_msgSend_159Ptr = _lookup< ffi.NativeFunction< - ffi.Void 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.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)>(); - late final _sel_attemptRecoveryFromError_optionIndex_delegate_didRecoverSelector_contextInfo_1 = - _registerName1( - "attemptRecoveryFromError:optionIndex:delegate:didRecoverSelector:contextInfo:"); - void _objc_msgSend_279( + late final _sel_arrayWithContentsOfURL_1 = + _registerName1("arrayWithContentsOfURL:"); + ffi.Pointer _objc_msgSend_160( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer error, - int recoveryOptionIndex, - ffi.Pointer delegate, - ffi.Pointer didRecoverSelector, - ffi.Pointer contextInfo, + ffi.Pointer url, ) { - return __objc_msgSend_279( + return __objc_msgSend_160( obj, sel, - error, - recoveryOptionIndex, - delegate, - didRecoverSelector, - contextInfo, + url, ); } - late final __objc_msgSend_279Ptr = _lookup< + late final __objc_msgSend_160Ptr = _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_279 = __objc_msgSend_279Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer, - 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)>(); - late final _sel_attemptRecoveryFromError_optionIndex_1 = - _registerName1("attemptRecoveryFromError:optionIndex:"); - bool _objc_msgSend_280( + 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 error, - int recoveryOptionIndex, + ffi.Pointer url, + bool atomically, ) { - return __objc_msgSend_280( + return __objc_msgSend_161( obj, sel, - error, - recoveryOptionIndex, + url, + atomically, ); } - late final __objc_msgSend_280Ptr = _lookup< + late final __objc_msgSend_161Ptr = _lookup< ffi.NativeFunction< ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_280 = __objc_msgSend_280Ptr.asFunction< + ffi.Pointer, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_161 = __objc_msgSend_161Ptr.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, bool)>(); - ffi.Pointer NSStringFromSelector( - ffi.Pointer aSelector, + late final _sel_allKeys1 = _registerName1("allKeys"); + ffi.Pointer _objc_msgSend_162( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _NSStringFromSelector( - aSelector, + return __objc_msgSend_162( + obj, + sel, ); } - late final _NSStringFromSelectorPtr = _lookup< + late final __objc_msgSend_162Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( - ffi.Pointer)>>('NSStringFromSelector'); - late final _NSStringFromSelector = _NSStringFromSelectorPtr.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 NSSelectorFromString( - ffi.Pointer aSelectorName, + 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 _NSSelectorFromString( - aSelectorName, + return __objc_msgSend_163( + obj, + sel, + otherDictionary, ); } - late final _NSSelectorFromStringPtr = _lookup< + late final __objc_msgSend_163Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('NSSelectorFromString'); - late final _NSSelectorFromString = _NSSelectorFromStringPtr.asFunction< - ffi.Pointer Function(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)>(); - ffi.Pointer NSStringFromClass( - ffi.Pointer aClass, + 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 _NSStringFromClass( - aClass, + return __objc_msgSend_164( + obj, + sel, + keys, + marker, ); } - late final _NSStringFromClassPtr = _lookup< + late final __objc_msgSend_164Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( - ffi.Pointer)>>('NSStringFromClass'); - late final _NSStringFromClass = _NSStringFromClassPtr.asFunction< - ffi.Pointer Function(ffi.Pointer)>(); + 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)>(); - ffi.Pointer NSClassFromString( - ffi.Pointer aClassName, + 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 _NSClassFromString( - aClassName, + return __objc_msgSend_165( + obj, + sel, + objects, + keys, + count, ); } - late final _NSClassFromStringPtr = _lookup< + late final __objc_msgSend_165Ptr = _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>, + 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 NSStringFromProtocol( - ffi.Pointer proto, + 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 _NSStringFromProtocol( - proto, + return __objc_msgSend_166( + obj, + sel, + block, ); } - late final _NSStringFromProtocolPtr = _lookup< + late final __objc_msgSend_166Ptr = _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, + 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 NSProtocolFromString( - ffi.Pointer namestr, + 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 _NSProtocolFromString( - namestr, + return __objc_msgSend_167( + obj, + sel, + opts, + block, ); } - late final _NSProtocolFromStringPtr = _lookup< + late final __objc_msgSend_167Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('NSProtocolFromString'); - late final _NSProtocolFromString = _NSProtocolFromStringPtr.asFunction< - ffi.Pointer Function(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>)>(); - ffi.Pointer NSGetSizeAndAlignment( - ffi.Pointer typePtr, - ffi.Pointer sizep, - ffi.Pointer alignp, + 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 _NSGetSizeAndAlignment( - typePtr, - sizep, - alignp, + return __objc_msgSend_168( + obj, + sel, + predicate, ); } - late final _NSGetSizeAndAlignmentPtr = _lookup< + late final __objc_msgSend_168Ptr = _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.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 NSLog( - ffi.Pointer format, + 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 _NSLog( - format, + return __objc_msgSend_169( + obj, + sel, + opts, + predicate, ); } - late final _NSLogPtr = - _lookup)>>( - 'NSLog'); - late final _NSLog = - _NSLogPtr.asFunction)>(); + late final __objc_msgSend_169Ptr = _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>)>(); - void NSLogv( - ffi.Pointer format, - va_list args, + 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 _NSLogv( - format, - args, + return __objc_msgSend_170( + obj, + sel, + objects, + keys, ); } - late final _NSLogvPtr = _lookup< + late final __objc_msgSend_170Ptr = _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>)>>('objc_msgSend'); + late final __objc_msgSend_170 = __objc_msgSend_170Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>)>(); - ffi.Pointer _Block_copy1( - ffi.Pointer aBlock, + late final _sel_dictionaryWithContentsOfFile_1 = + _registerName1("dictionaryWithContentsOfFile:"); + ffi.Pointer _objc_msgSend_171( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, ) { - return __Block_copy1( - aBlock, + return __objc_msgSend_171( + obj, + sel, + path, ); } - late final __Block_copy1Ptr = _lookup< + late final __objc_msgSend_171Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('_Block_copy'); - late final __Block_copy1 = __Block_copy1Ptr - .asFunction Function(ffi.Pointer)>(); + 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 _Block_release1( - ffi.Pointer aBlock, + late final _sel_dictionaryWithContentsOfURL_1 = + _registerName1("dictionaryWithContentsOfURL:"); + ffi.Pointer _objc_msgSend_172( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, ) { - return __Block_release1( - aBlock, + return __objc_msgSend_172( + obj, + sel, + url, ); } - late final __Block_release1Ptr = - _lookup)>>( - '_Block_release'); - late final __Block_release1 = - __Block_release1Ptr.asFunction)>(); + 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)>(); - void _Block_object_assign( - ffi.Pointer arg0, - ffi.Pointer arg1, - int arg2, + 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 __Block_object_assign( - arg0, - arg1, - arg2, + return __objc_msgSend_173( + obj, + sel, + object, + key, ); } - late final __Block_object_assignPtr = _lookup< + late final __objc_msgSend_173Ptr = _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)>(); + 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 _Block_object_dispose( - ffi.Pointer arg0, - int arg1, + 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 __Block_object_dispose( - arg0, - arg1, + return __objc_msgSend_174( + obj, + sel, + dict, ); } - late final __Block_object_disposePtr = _lookup< + late final __objc_msgSend_174Ptr = _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(); + 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)>(); - void DebugStr( - ConstStr255Param debuggerMsg, + 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 _DebugStr( - debuggerMsg, + return __objc_msgSend_175( + obj, + sel, + objects, + keys, ); } - late final _DebugStrPtr = - _lookup>( - 'DebugStr'); - late final _DebugStr = - _DebugStrPtr.asFunction(); + late final __objc_msgSend_175Ptr = _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)>(); - void SysBreak() { - return _SysBreak(); - } - - late final _SysBreakPtr = - _lookup>('SysBreak'); - late final _SysBreak = _SysBreakPtr.asFunction(); - - void SysBreakStr( - ConstStr255Param debuggerMsg, + 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 _SysBreakStr( - debuggerMsg, + return __objc_msgSend_176( + obj, + sel, + otherDictionary, + flag, ); } - late final _SysBreakStrPtr = - _lookup>( - 'SysBreakStr'); - late final _SysBreakStr = - _SysBreakStrPtr.asFunction(); + late final __objc_msgSend_176Ptr = _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)>(); - void SysBreakFunc( - ConstStr255Param debuggerMsg, + 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 _SysBreakFunc( - debuggerMsg, + return __objc_msgSend_177( + obj, + sel, + url, + error, ); } - 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_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>)>(); - CFRange __CFRangeMake( - int loc, + 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 ___CFRangeMake( - loc, + return __objc_msgSend_178( + obj, + sel, + state, + buffer, len, ); } - 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_178Ptr = _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)>(); - void CFAllocatorSetDefault( - CFAllocatorRef allocator, + 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 _CFAllocatorSetDefault( - allocator, + return __objc_msgSend_179( + obj, + sel, + domain, + code, + dict, ); } - late final _CFAllocatorSetDefaultPtr = - _lookup>( - 'CFAllocatorSetDefault'); - late final _CFAllocatorSetDefault = - _CFAllocatorSetDefaultPtr.asFunction(); + late final __objc_msgSend_179Ptr = _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)>(); - CFAllocatorRef CFAllocatorGetDefault() { - return _CFAllocatorGetDefault(); + 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 _CFAllocatorGetDefaultPtr = - _lookup>( - 'CFAllocatorGetDefault'); - late final _CFAllocatorGetDefault = - _CFAllocatorGetDefaultPtr.asFunction(); + 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)>(); - CFAllocatorRef CFAllocatorCreate( - CFAllocatorRef allocator, - ffi.Pointer context, + 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 _CFAllocatorCreate( - allocator, - context, + return __objc_msgSend_181( + obj, + sel, + errorDomain, + provider, ); } - late final _CFAllocatorCreatePtr = _lookup< + late final __objc_msgSend_181Ptr = _lookup< ffi.NativeFunction< - CFAllocatorRef Function(CFAllocatorRef, - ffi.Pointer)>>('CFAllocatorCreate'); - late final _CFAllocatorCreate = _CFAllocatorCreatePtr.asFunction< - CFAllocatorRef Function( - CFAllocatorRef, ffi.Pointer)>(); + 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>)>(); - ffi.Pointer CFAllocatorAllocate( - CFAllocatorRef allocator, - int size, - int hint, + 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 _CFAllocatorAllocate( - allocator, - size, - hint, + return __objc_msgSend_182( + obj, + sel, + err, + userInfoKey, + errorDomain, ); } - late final _CFAllocatorAllocatePtr = _lookup< + late final __objc_msgSend_182Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - CFAllocatorRef, CFIndex, CFOptionFlags)>>('CFAllocatorAllocate'); - late final _CFAllocatorAllocate = _CFAllocatorAllocatePtr.asFunction< - ffi.Pointer Function(CFAllocatorRef, int, 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)>(); - ffi.Pointer CFAllocatorReallocate( - CFAllocatorRef allocator, - ffi.Pointer ptr, - int newsize, - int hint, + late final _sel_checkResourceIsReachableAndReturnError_1 = + _registerName1("checkResourceIsReachableAndReturnError:"); + bool _objc_msgSend_183( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer> error, ) { - return _CFAllocatorReallocate( - allocator, - ptr, - newsize, - hint, + return __objc_msgSend_183( + obj, + sel, + error, ); } - late final _CFAllocatorReallocatePtr = _lookup< + late final __objc_msgSend_183Ptr = _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.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 CFAllocatorDeallocate( - CFAllocatorRef allocator, - ffi.Pointer ptr, + 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 _CFAllocatorDeallocate( - allocator, - ptr, + return __objc_msgSend_184( + obj, + sel, + value, + key, + error, ); } - late final _CFAllocatorDeallocatePtr = _lookup< + late final __objc_msgSend_184Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( - CFAllocatorRef, ffi.Pointer)>>('CFAllocatorDeallocate'); - late final _CFAllocatorDeallocate = _CFAllocatorDeallocatePtr.asFunction< - void Function(CFAllocatorRef, 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>)>(); - int CFAllocatorGetPreferredSizeForSize( - CFAllocatorRef allocator, - int size, - int hint, + 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 _CFAllocatorGetPreferredSizeForSize( - allocator, - size, - hint, + return __objc_msgSend_185( + obj, + sel, + keys, + error, ); } - late final _CFAllocatorGetPreferredSizeForSizePtr = _lookup< + late final __objc_msgSend_185Ptr = _lookup< ffi.NativeFunction< - CFIndex Function(CFAllocatorRef, CFIndex, - CFOptionFlags)>>('CFAllocatorGetPreferredSizeForSize'); - late final _CFAllocatorGetPreferredSizeForSize = - _CFAllocatorGetPreferredSizeForSizePtr.asFunction< - int Function(CFAllocatorRef, int, int)>(); + 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>)>(); - void CFAllocatorGetContext( - CFAllocatorRef allocator, - ffi.Pointer context, + 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 _CFAllocatorGetContext( - allocator, - context, + return __objc_msgSend_186( + obj, + sel, + value, + key, + error, ); } - late final _CFAllocatorGetContextPtr = _lookup< + late final __objc_msgSend_186Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFAllocatorRef, - ffi.Pointer)>>('CFAllocatorGetContext'); - late final _CFAllocatorGetContext = _CFAllocatorGetContextPtr.asFunction< - void Function(CFAllocatorRef, ffi.Pointer)>(); + 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 CFGetTypeID( - CFTypeRef cf, + 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 _CFGetTypeID( - cf, + return __objc_msgSend_187( + obj, + sel, + keyedValues, + error, ); } - late final _CFGetTypeIDPtr = - _lookup>('CFGetTypeID'); - late final _CFGetTypeID = - _CFGetTypeIDPtr.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>)>(); - CFStringRef CFCopyTypeIDDescription( - int type_id, + late final _sel_removeCachedResourceValueForKey_1 = + _registerName1("removeCachedResourceValueForKey:"); + void _objc_msgSend_188( + ffi.Pointer obj, + ffi.Pointer sel, + NSURLResourceKey key, ) { - return _CFCopyTypeIDDescription( - type_id, + return __objc_msgSend_188( + obj, + sel, + key, ); } - late final _CFCopyTypeIDDescriptionPtr = - _lookup>( - 'CFCopyTypeIDDescription'); - late final _CFCopyTypeIDDescription = - _CFCopyTypeIDDescriptionPtr.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)>(); - CFTypeRef CFRetain( - 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 _CFRetain( - cf, + return __objc_msgSend_189( + obj, + sel, + value, + key, ); } - late final _CFRetainPtr = - _lookup>('CFRetain'); - late final _CFRetain = - _CFRetainPtr.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)>(); - void CFRelease( - 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 _CFRelease( - cf, + return __objc_msgSend_190( + obj, + sel, + options, + keys, + relativeURL, + error, ); } - late final _CFReleasePtr = - _lookup>('CFRelease'); - late final _CFRelease = _CFReleasePtr.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 CFAutorelease( - CFTypeRef arg, + 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 _CFAutorelease( - arg, + return __objc_msgSend_191( + obj, + sel, + bookmarkData, + options, + relativeURL, + isStale, + error, ); } - late final _CFAutoreleasePtr = - _lookup>( - 'CFAutorelease'); - late final _CFAutorelease = - _CFAutoreleasePtr.asFunction(); + 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>)>(); - int CFGetRetainCount( - CFTypeRef cf, + 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 _CFGetRetainCount( - cf, + return __objc_msgSend_192( + obj, + sel, + keys, + bookmarkData, ); } - late final _CFGetRetainCountPtr = - _lookup>( - 'CFGetRetainCount'); - late final _CFGetRetainCount = - _CFGetRetainCountPtr.asFunction(); + 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)>(); - int CFEqual( - CFTypeRef cf1, - CFTypeRef cf2, + 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 _CFEqual( - cf1, - cf2, + return __objc_msgSend_193( + obj, + sel, + bookmarkData, + bookmarkFileURL, + options, + error, ); } - late final _CFEqualPtr = - _lookup>( - 'CFEqual'); - late final _CFEqual = - _CFEqualPtr.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>)>(); - int CFHash( - CFTypeRef cf, + 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 _CFHash( - cf, + return __objc_msgSend_194( + obj, + sel, + bookmarkFileURL, + error, ); } - late final _CFHashPtr = - _lookup>('CFHash'); - late final _CFHash = _CFHashPtr.asFunction(); + 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>)>(); - CFStringRef CFCopyDescription( - CFTypeRef cf, + 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 _CFCopyDescription( - cf, + return __objc_msgSend_195( + obj, + sel, + url, + options, + error, ); } - late final _CFCopyDescriptionPtr = - _lookup>( - 'CFCopyDescription'); - late final _CFCopyDescription = - _CFCopyDescriptionPtr.asFunction(); + 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>)>(); - CFAllocatorRef CFGetAllocator( - CFTypeRef cf, + 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 _CFGetAllocator( - cf, + return __objc_msgSend_196( + obj, + sel, + components, ); } - late final _CFGetAllocatorPtr = - _lookup>( - 'CFGetAllocator'); - late final _CFGetAllocator = - _CFGetAllocatorPtr.asFunction(); + 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)>(); - CFTypeRef CFMakeCollectable( - CFTypeRef cf, + 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 _CFMakeCollectable( - cf, + return __objc_msgSend_197( + obj, + sel, + shouldUseCache, ); } - late final _CFMakeCollectablePtr = - _lookup>( - 'CFMakeCollectable'); - late final _CFMakeCollectable = - _CFMakeCollectablePtr.asFunction(); + 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)>(); - ffi.Pointer NSDefaultMallocZone() { - return _NSDefaultMallocZone(); + 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_198( + obj, + sel, + client, + shouldUseCache, + ); } - late final _NSDefaultMallocZonePtr = - _lookup Function()>>( - 'NSDefaultMallocZone'); - late final _NSDefaultMallocZone = - _NSDefaultMallocZonePtr.asFunction Function()>(); + 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)>(); - ffi.Pointer NSCreateZone( - int startSize, - int granularity, - bool canFree, + 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 _NSCreateZone( - startSize, - granularity, - canFree, + return __objc_msgSend_199( + obj, + sel, + property, + propertyKey, ); } - late final _NSCreateZonePtr = _lookup< + late final __objc_msgSend_199Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - NSUInteger, NSUInteger, ffi.Bool)>>('NSCreateZone'); - late final _NSCreateZone = _NSCreateZonePtr.asFunction< - ffi.Pointer Function(int, int, bool)>(); + 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 NSRecycleZone( - ffi.Pointer zone, + 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 _NSRecycleZone( - zone, + return __objc_msgSend_200( + obj, + sel, + anURLHandleSubclass, ); } - late final _NSRecycleZonePtr = - _lookup)>>( - 'NSRecycleZone'); - late final _NSRecycleZone = - _NSRecycleZonePtr.asFunction)>(); + 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)>(); - void NSSetZoneName( - ffi.Pointer zone, - ffi.Pointer name, + late final _sel_URLHandleClassForURL_1 = + _registerName1("URLHandleClassForURL:"); + ffi.Pointer _objc_msgSend_201( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer anURL, ) { - return _NSSetZoneName( - zone, - name, + return __objc_msgSend_201( + obj, + sel, + anURL, ); } - late final _NSSetZoneNamePtr = _lookup< + late final __objc_msgSend_201Ptr = _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)>>('objc_msgSend'); + late final __objc_msgSend_201 = __objc_msgSend_201Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer NSZoneName( - ffi.Pointer zone, + late final _sel_status1 = _registerName1("status"); + int _objc_msgSend_202( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _NSZoneName( - zone, + return __objc_msgSend_202( + obj, + sel, ); } - late final _NSZoneNamePtr = _lookup< + late final __objc_msgSend_202Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('NSZoneName'); - late final _NSZoneName = _NSZoneNamePtr.asFunction< - ffi.Pointer Function(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)>(); - ffi.Pointer NSZoneFromPointer( - ffi.Pointer ptr, + 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 _NSZoneFromPointer( - ptr, + return __objc_msgSend_203( + obj, + sel, + newBytes, + yorn, ); } - late final _NSZoneFromPointerPtr = _lookup< + late final __objc_msgSend_203Ptr = _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, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_203 = __objc_msgSend_203Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, bool)>(); - ffi.Pointer NSZoneMalloc( - ffi.Pointer zone, - int size, + late final _sel_canInitWithURL_1 = _registerName1("canInitWithURL:"); + bool _objc_msgSend_204( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer anURL, ) { - return _NSZoneMalloc( - zone, - size, + return __objc_msgSend_204( + obj, + sel, + anURL, ); } - late final _NSZoneMallocPtr = _lookup< + late final __objc_msgSend_204Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, NSUInteger)>>('NSZoneMalloc'); - late final _NSZoneMalloc = _NSZoneMallocPtr.asFunction< - ffi.Pointer Function(ffi.Pointer, int)>(); + 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 NSZoneCalloc( - ffi.Pointer zone, - int numElems, - int byteSize, + late final _sel_cachedHandleForURL_1 = _registerName1("cachedHandleForURL:"); + ffi.Pointer _objc_msgSend_205( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer anURL, ) { - return _NSZoneCalloc( - zone, - numElems, - byteSize, + return __objc_msgSend_205( + obj, + sel, + anURL, ); } - late final _NSZoneCallocPtr = _lookup< + late final __objc_msgSend_205Ptr = _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, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_205 = __objc_msgSend_205Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer NSZoneRealloc( - ffi.Pointer zone, - ffi.Pointer ptr, - int size, + 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 _NSZoneRealloc( - zone, - ptr, - size, + return __objc_msgSend_206( + obj, + sel, + anURL, + willCache, ); } - late final _NSZoneReallocPtr = _lookup< + late final __objc_msgSend_206Ptr = _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.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 NSZoneFree( - ffi.Pointer zone, - ffi.Pointer ptr, + 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 _NSZoneFree( - zone, - ptr, + return __objc_msgSend_207( + obj, + sel, + shouldUseCache, ); } - late final _NSZoneFreePtr = _lookup< + late final __objc_msgSend_207Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, ffi.Pointer)>>('NSZoneFree'); - late final _NSZoneFree = _NSZoneFreePtr.asFunction< - void Function(ffi.Pointer, ffi.Pointer)>(); + 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 NSAllocateCollectable( - int size, - int options, + 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 _NSAllocateCollectable( - size, - options, + return __objc_msgSend_208( + obj, + sel, + path, + writeOptionsMask, + errorPtr, ); } - late final _NSAllocateCollectablePtr = _lookup< + late final __objc_msgSend_208Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - NSUInteger, NSUInteger)>>('NSAllocateCollectable'); - late final _NSAllocateCollectable = _NSAllocateCollectablePtr.asFunction< - ffi.Pointer Function(int, int)>(); + 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 NSReallocateCollectable( - ffi.Pointer ptr, - int size, - int options, + 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 _NSReallocateCollectable( - ptr, - size, - options, + return __objc_msgSend_209( + obj, + sel, + url, + writeOptionsMask, + errorPtr, ); } - late final _NSReallocateCollectablePtr = _lookup< + late final __objc_msgSend_209Ptr = _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.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>)>(); - int NSRoundUpToMultipleOfPageSize( - int bytes, + 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 _NSRoundUpToMultipleOfPageSize( - bytes, + return __objc_msgSend_210( + obj, + sel, + dataToFind, + mask, + searchRange, ); } - late final _NSRoundUpToMultipleOfPageSizePtr = - _lookup>( - 'NSRoundUpToMultipleOfPageSize'); - late final _NSRoundUpToMultipleOfPageSize = - _NSRoundUpToMultipleOfPageSizePtr.asFunction(); + late final __objc_msgSend_210Ptr = _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)>(); - int NSRoundDownToMultipleOfPageSize( - int bytes, + late final _sel_enumerateByteRangesUsingBlock_1 = + _registerName1("enumerateByteRangesUsingBlock:"); + void _objc_msgSend_211( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> block, ) { - return _NSRoundDownToMultipleOfPageSize( - bytes, + return __objc_msgSend_211( + obj, + sel, + block, ); } - late final _NSRoundDownToMultipleOfPageSizePtr = - _lookup>( - 'NSRoundDownToMultipleOfPageSize'); - late final _NSRoundDownToMultipleOfPageSize = - _NSRoundDownToMultipleOfPageSizePtr.asFunction(); + late final __objc_msgSend_211Ptr = _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 NSAllocateMemoryPages( - int bytes, + 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 _NSAllocateMemoryPages( + return __objc_msgSend_212( + obj, + sel, bytes, + length, ); } - late final _NSAllocateMemoryPagesPtr = - _lookup Function(NSUInteger)>>( - 'NSAllocateMemoryPages'); - late final _NSAllocateMemoryPages = _NSAllocateMemoryPagesPtr.asFunction< - ffi.Pointer Function(int)>(); + 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)>(); - void NSDeallocateMemoryPages( - ffi.Pointer ptr, - int bytes, + 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 _NSDeallocateMemoryPages( - ptr, + return __objc_msgSend_213( + obj, + sel, bytes, + length, + b, ); } - late final _NSDeallocateMemoryPagesPtr = _lookup< + late final __objc_msgSend_213Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, NSUInteger)>>('NSDeallocateMemoryPages'); - late final _NSDeallocateMemoryPages = _NSDeallocateMemoryPagesPtr.asFunction< - void Function(ffi.Pointer, int)>(); + 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)>(); - void NSCopyMemoryPages( - ffi.Pointer source, - ffi.Pointer dest, - int bytes, + 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 _NSCopyMemoryPages( - source, - dest, - bytes, + return __objc_msgSend_214( + obj, + sel, + path, + readOptionsMask, + errorPtr, ); } - late final _NSCopyMemoryPagesPtr = _lookup< + late final __objc_msgSend_214Ptr = _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(); + 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 NSAllocateObject( - ffi.Pointer aClass, - int extraBytes, - ffi.Pointer zone, + 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 _NSAllocateObject( - aClass, - extraBytes, - zone, + return __objc_msgSend_215( + obj, + sel, + url, + readOptionsMask, + errorPtr, ); } - late final _NSAllocateObjectPtr = _lookup< + late final __objc_msgSend_215Ptr = _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)>(); + 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>)>(); - void NSDeallocateObject( - ffi.Pointer object, + 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 _NSDeallocateObject( - object, + return __objc_msgSend_216( + obj, + sel, + bytes, + length, + deallocator, ); } - 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< + late final __objc_msgSend_216Ptr = _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)>(); + 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>)>(); - bool NSShouldRetainWithZone( - ffi.Pointer anObject, - ffi.Pointer requestedZone, + 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, ) { - return _NSShouldRetainWithZone( - anObject, - requestedZone, + return __objc_msgSend_217( + obj, + sel, + data, ); } - late final _NSShouldRetainWithZonePtr = _lookup< + late final __objc_msgSend_217Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, - ffi.Pointer)>>('NSShouldRetainWithZone'); - late final _NSShouldRetainWithZone = _NSShouldRetainWithZonePtr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer)>(); - - void NSIncrementExtraRefCount( - ffi.Pointer object, - ) { - return _NSIncrementExtraRefCount( - object, - ); - } - - late final _NSIncrementExtraRefCountPtr = - _lookup)>>( - 'NSIncrementExtraRefCount'); - late final _NSIncrementExtraRefCount = _NSIncrementExtraRefCountPtr - .asFunction)>(); - - bool NSDecrementExtraRefCountWasZero( - ffi.Pointer object, - ) { - return _NSDecrementExtraRefCountWasZero( - object, - ); - } - - 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)>(); + 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)>(); - NSRange NSUnionRange( - NSRange range1, - NSRange range2, + 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, ) { - return _NSUnionRange( - range1, - range2, + return __objc_msgSend_218( + obj, + sel, + base64String, + options, ); } - late final _NSUnionRangePtr = - _lookup>( - 'NSUnionRange'); - late final _NSUnionRange = - _NSUnionRangePtr.asFunction(); + late final __objc_msgSend_218Ptr = _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)>(); - NSRange NSIntersectionRange( - NSRange range1, - NSRange range2, + late final _sel_base64EncodedStringWithOptions_1 = + _registerName1("base64EncodedStringWithOptions:"); + ffi.Pointer _objc_msgSend_219( + ffi.Pointer obj, + ffi.Pointer sel, + int options, ) { - return _NSIntersectionRange( - range1, - range2, + return __objc_msgSend_219( + obj, + sel, + options, ); } - late final _NSIntersectionRangePtr = - _lookup>( - 'NSIntersectionRange'); - late final _NSIntersectionRange = - _NSIntersectionRangePtr.asFunction(); + late final __objc_msgSend_219Ptr = _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 NSStringFromRange( - NSRange range, + 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 _NSStringFromRange( - range, + return __objc_msgSend_220( + obj, + sel, + base64Data, + options, ); } - late final _NSStringFromRangePtr = - _lookup Function(NSRange)>>( - 'NSStringFromRange'); - late final _NSStringFromRange = _NSStringFromRangePtr.asFunction< - ffi.Pointer Function(NSRange)>(); + 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)>(); - NSRange NSRangeFromString( - ffi.Pointer aString, + late final _sel_base64EncodedDataWithOptions_1 = + _registerName1("base64EncodedDataWithOptions:"); + ffi.Pointer _objc_msgSend_221( + ffi.Pointer obj, + ffi.Pointer sel, + int options, ) { - return _NSRangeFromString( - aString, + return __objc_msgSend_221( + obj, + sel, + options, ); } - late final _NSRangeFromStringPtr = - _lookup)>>( - 'NSRangeFromString'); - late final _NSRangeFromString = _NSRangeFromStringPtr.asFunction< - NSRange Function(ffi.Pointer)>(); + late final __objc_msgSend_221Ptr = _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)>(); - late final _class_NSMutableIndexSet1 = _getClass1("NSMutableIndexSet"); - late final _sel_addIndexes_1 = _registerName1("addIndexes:"); - void _objc_msgSend_281( + late final _sel_decompressedDataUsingAlgorithm_error_1 = + _registerName1("decompressedDataUsingAlgorithm:error:"); + instancetype _objc_msgSend_222( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer indexSet, + int algorithm, + ffi.Pointer> error, ) { - return __objc_msgSend_281( + return __objc_msgSend_222( obj, sel, - indexSet, + algorithm, + error, ); } - late final __objc_msgSend_281Ptr = _lookup< + late final __objc_msgSend_222Ptr = _lookup< ffi.NativeFunction< - 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)>(); + 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_removeIndexes_1 = _registerName1("removeIndexes:"); - late final _sel_removeAllIndexes1 = _registerName1("removeAllIndexes"); - late final _sel_addIndex_1 = _registerName1("addIndex:"); - void _objc_msgSend_282( + 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, - int value, + ffi.Pointer data, ) { - return __objc_msgSend_282( + return __objc_msgSend_223( obj, sel, - value, + data, ); } - late final __objc_msgSend_282Ptr = _lookup< + late final __objc_msgSend_223Ptr = _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)>(); + 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_removeIndex_1 = _registerName1("removeIndex:"); - late final _sel_addIndexesInRange_1 = _registerName1("addIndexesInRange:"); - void _objc_msgSend_283( + 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_283( + return __objc_msgSend_224( obj, sel, - range, + aCharacter, ); } - late final __objc_msgSend_283Ptr = _lookup< + late final __objc_msgSend_224Ptr = _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.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_removeIndexesInRange_1 = - _registerName1("removeIndexesInRange:"); - late final _sel_shiftIndexesStartingAtIndex_by_1 = - _registerName1("shiftIndexesStartingAtIndex:by:"); - void _objc_msgSend_284( + 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 index, - int delta, + int theLongChar, ) { - return __objc_msgSend_284( + return __objc_msgSend_225( obj, sel, - index, - delta, + theLongChar, ); } - late final __objc_msgSend_284Ptr = _lookup< + late final __objc_msgSend_225Ptr = _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)>(); + 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 _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_isSupersetOfSet_1 = _registerName1("isSupersetOfSet:"); + bool _objc_msgSend_226( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer anObject, - int index, + ffi.Pointer theOtherSet, ) { - return __objc_msgSend_285( + return __objc_msgSend_226( obj, sel, - anObject, - index, + theOtherSet, ); } - late final __objc_msgSend_285Ptr = _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_285 = __objc_msgSend_285Ptr.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_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_hasMemberInPlane_1 = _registerName1("hasMemberInPlane:"); + bool _objc_msgSend_227( ffi.Pointer obj, ffi.Pointer sel, - int index, - ffi.Pointer anObject, + int thePlane, ) { - return __objc_msgSend_286( + return __objc_msgSend_227( obj, sel, - index, - anObject, + thePlane, ); } - late final __objc_msgSend_286Ptr = _lookup< + late final __objc_msgSend_227Ptr = _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)>(); + 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_initWithCapacity_1 = _registerName1("initWithCapacity:"); - late final _sel_addObjectsFromArray_1 = - _registerName1("addObjectsFromArray:"); - void _objc_msgSend_287( + 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 otherArray, + ffi.Pointer searchSet, ) { - return __objc_msgSend_287( + return __objc_msgSend_228( obj, sel, - otherArray, + searchSet, ); } - late final __objc_msgSend_287Ptr = _lookup< + late final __objc_msgSend_228Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSRange Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_287 = __objc_msgSend_287Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, + late final __objc_msgSend_228 = __objc_msgSend_228Ptr.asFunction< + NSRange Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - late final _sel_exchangeObjectAtIndex_withObjectAtIndex_1 = - _registerName1("exchangeObjectAtIndex:withObjectAtIndex:"); - void _objc_msgSend_288( + late final _sel_rangeOfCharacterFromSet_options_1 = + _registerName1("rangeOfCharacterFromSet:options:"); + NSRange _objc_msgSend_229( ffi.Pointer obj, ffi.Pointer sel, - int idx1, - int idx2, + ffi.Pointer searchSet, + int mask, ) { - return __objc_msgSend_288( + return __objc_msgSend_229( obj, sel, - idx1, - idx2, + searchSet, + mask, ); } - late final __objc_msgSend_288Ptr = _lookup< + late final __objc_msgSend_229Ptr = _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)>(); + 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_removeAllObjects1 = _registerName1("removeAllObjects"); - late final _sel_removeObject_inRange_1 = - _registerName1("removeObject:inRange:"); - void _objc_msgSend_289( + late final _sel_rangeOfCharacterFromSet_options_range_1 = + _registerName1("rangeOfCharacterFromSet:options:range:"); + NSRange _objc_msgSend_230( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer anObject, - NSRange range, + ffi.Pointer searchSet, + int mask, + NSRange rangeOfReceiverToSearch, ) { - return __objc_msgSend_289( + return __objc_msgSend_230( obj, sel, - anObject, - range, + searchSet, + mask, + rangeOfReceiverToSearch, ); } - late final __objc_msgSend_289Ptr = _lookup< + late final __objc_msgSend_230Ptr = _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)>(); + 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_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_rangeOfComposedCharacterSequenceAtIndex_1 = + _registerName1("rangeOfComposedCharacterSequenceAtIndex:"); + NSRange _objc_msgSend_231( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer indices, - int cnt, + int index, ) { - return __objc_msgSend_290( + return __objc_msgSend_231( obj, sel, - indices, - cnt, + index, ); } - late final __objc_msgSend_290Ptr = _lookup< + late final __objc_msgSend_231Ptr = _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)>(); + 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_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_rangeOfComposedCharacterSequencesForRange_1 = + _registerName1("rangeOfComposedCharacterSequencesForRange:"); + NSRange _objc_msgSend_232( ffi.Pointer obj, ffi.Pointer sel, NSRange range, - ffi.Pointer otherArray, - NSRange otherRange, ) { - return __objc_msgSend_291( + return __objc_msgSend_232( obj, sel, range, - otherArray, - otherRange, ); } - late final __objc_msgSend_291Ptr = _lookup< + late final __objc_msgSend_232Ptr = _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)>(); + 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_replaceObjectsInRange_withObjectsFromArray_1 = - _registerName1("replaceObjectsInRange:withObjectsFromArray:"); - void _objc_msgSend_292( + 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, - NSRange range, - ffi.Pointer otherArray, + ffi.Pointer locale, ) { - return __objc_msgSend_292( + return __objc_msgSend_233( obj, sel, - range, - otherArray, + locale, ); } - late final __objc_msgSend_292Ptr = _lookup< + late final __objc_msgSend_233Ptr = _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)>(); + 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_setArray_1 = _registerName1("setArray:"); - late final _sel_sortUsingFunction_context_1 = - _registerName1("sortUsingFunction:context:"); - void _objc_msgSend_293( + 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< - ffi.NativeFunction< - NSInteger Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>> - compare, - ffi.Pointer context, + ffi.Pointer startPtr, + ffi.Pointer lineEndPtr, + ffi.Pointer contentsEndPtr, + NSRange range, ) { - return __objc_msgSend_293( + return __objc_msgSend_234( obj, sel, - compare, - context, + startPtr, + lineEndPtr, + contentsEndPtr, + range, ); } - late final __objc_msgSend_293Ptr = _lookup< + late final __objc_msgSend_234Ptr = _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< + 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.NativeFunction< - NSInteger Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>, - ffi.Pointer)>(); + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSRange)>(); - late final _sel_sortUsingSelector_1 = _registerName1("sortUsingSelector:"); - late final _sel_insertObjects_atIndexes_1 = - _registerName1("insertObjects:atIndexes:"); - void _objc_msgSend_294( + 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 objects, - ffi.Pointer indexes, + NSRange range, + int opts, + ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_294( + return __objc_msgSend_235( obj, sel, - objects, - indexes, + range, + opts, + block, ); } - late final __objc_msgSend_294Ptr = _lookup< + late final __objc_msgSend_235Ptr = _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)>(); + 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>)>(); - late final _sel_removeObjectsAtIndexes_1 = - _registerName1("removeObjectsAtIndexes:"); - late final _sel_replaceObjectsAtIndexes_withObjects_1 = - _registerName1("replaceObjectsAtIndexes:withObjects:"); - void _objc_msgSend_295( + late final _sel_enumerateLinesUsingBlock_1 = + _registerName1("enumerateLinesUsingBlock:"); + void _objc_msgSend_236( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer indexes, - ffi.Pointer objects, + ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_295( + return __objc_msgSend_236( obj, sel, - indexes, - objects, + block, ); } - late final __objc_msgSend_295Ptr = _lookup< + late final __objc_msgSend_236Ptr = _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< + 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, ffi.Pointer)>(); + ffi.Pointer<_ObjCBlock>)>(); - late final _sel_setObject_atIndexedSubscript_1 = - _registerName1("setObject:atIndexedSubscript:"); - late final _sel_sortUsingComparator_1 = - _registerName1("sortUsingComparator:"); - void _objc_msgSend_296( + 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, - NSComparator cmptr, + int encoding, + bool lossy, ) { - return __objc_msgSend_296( + return __objc_msgSend_237( obj, sel, - cmptr, + encoding, + lossy, ); } - late final __objc_msgSend_296Ptr = _lookup< + late final __objc_msgSend_237Ptr = _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)>(); + 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_sortWithOptions_usingComparator_1 = - _registerName1("sortWithOptions:usingComparator:"); - void _objc_msgSend_297( + late final _sel_dataUsingEncoding_1 = _registerName1("dataUsingEncoding:"); + ffi.Pointer _objc_msgSend_238( ffi.Pointer obj, ffi.Pointer sel, - int opts, - NSComparator cmptr, + int encoding, ) { - return __objc_msgSend_297( + return __objc_msgSend_238( obj, sel, - opts, - cmptr, + encoding, ); } - late final __objc_msgSend_297Ptr = _lookup< + late final __objc_msgSend_238Ptr = _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)>(); + 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_arrayWithCapacity_1 = _registerName1("arrayWithCapacity:"); - ffi.Pointer _objc_msgSend_298( + 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 path, + int encoding, ) { - return __objc_msgSend_298( + return __objc_msgSend_239( obj, sel, - path, + encoding, ); } - late final __objc_msgSend_298Ptr = _lookup< + late final __objc_msgSend_239Ptr = _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 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.Pointer _objc_msgSend_299( + late final _sel_getCString_maxLength_encoding_1 = + _registerName1("getCString:maxLength:encoding:"); + bool _objc_msgSend_240( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer url, + ffi.Pointer buffer, + int maxBufferCount, + int encoding, ) { - return __objc_msgSend_299( + return __objc_msgSend_240( obj, sel, - url, + buffer, + maxBufferCount, + encoding, ); } - late final __objc_msgSend_299Ptr = _lookup< + late final __objc_msgSend_240Ptr = _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.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_applyDifference_1 = _registerName1("applyDifference:"); - void _objc_msgSend_300( + 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 difference, + ffi.Pointer buffer, + int maxBufferCount, + ffi.Pointer usedBufferCount, + int encoding, + int options, + NSRange range, + NSRangePointer leftover, ) { - return __objc_msgSend_300( + return __objc_msgSend_241( obj, sel, - difference, + buffer, + maxBufferCount, + usedBufferCount, + encoding, + options, + range, + leftover, ); } - late final __objc_msgSend_300Ptr = _lookup< + late final __objc_msgSend_241Ptr = _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)>(); + 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 _class_NSMutableData1 = _getClass1("NSMutableData"); - late final _sel_mutableBytes1 = _registerName1("mutableBytes"); - late final _sel_setLength_1 = _registerName1("setLength:"); - void _objc_msgSend_301( + 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, - int value, ) { - return __objc_msgSend_301( + return __objc_msgSend_242( obj, sel, - value, ); } - late final __objc_msgSend_301Ptr = _lookup< + late final __objc_msgSend_242Ptr = _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 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_appendBytes_length_1 = _registerName1("appendBytes:length:"); - late final _sel_appendData_1 = _registerName1("appendData:"); - void _objc_msgSend_302( + 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 other, + ffi.Pointer separator, ) { - return __objc_msgSend_302( + return __objc_msgSend_243( obj, sel, - other, + separator, ); } - late final __objc_msgSend_302Ptr = _lookup< + late final __objc_msgSend_243Ptr = _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, 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_increaseLengthBy_1 = _registerName1("increaseLengthBy:"); - late final _sel_replaceBytesInRange_withBytes_1 = - _registerName1("replaceBytesInRange:withBytes:"); - void _objc_msgSend_303( + late final _sel_stringByTrimmingCharactersInSet_1 = + _registerName1("stringByTrimmingCharactersInSet:"); + ffi.Pointer _objc_msgSend_244( ffi.Pointer obj, ffi.Pointer sel, - NSRange range, - ffi.Pointer bytes, + ffi.Pointer set1, ) { - return __objc_msgSend_303( + return __objc_msgSend_244( obj, sel, - range, - bytes, + set1, ); } - late final __objc_msgSend_303Ptr = _lookup< + late final __objc_msgSend_244Ptr = _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, 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_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_stringByPaddingToLength_withString_startingAtIndex_1 = + _registerName1("stringByPaddingToLength:withString:startingAtIndex:"); + ffi.Pointer _objc_msgSend_245( ffi.Pointer obj, ffi.Pointer sel, - NSRange range, - ffi.Pointer replacementBytes, - int replacementLength, + int newLength, + ffi.Pointer padString, + int padIndex, ) { - return __objc_msgSend_304( + return __objc_msgSend_245( obj, sel, - range, - replacementBytes, - replacementLength, + newLength, + padString, + padIndex, ); } - late final __objc_msgSend_304Ptr = _lookup< + late final __objc_msgSend_245Ptr = _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, + 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_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_stringByFoldingWithOptions_locale_1 = + _registerName1("stringByFoldingWithOptions:locale:"); + ffi.Pointer _objc_msgSend_246( ffi.Pointer obj, ffi.Pointer sel, - int algorithm, - ffi.Pointer> error, + int options, + ffi.Pointer locale, ) { - return __objc_msgSend_305( + return __objc_msgSend_246( obj, sel, - algorithm, - error, + options, + locale, ); } - late final __objc_msgSend_305Ptr = _lookup< + late final __objc_msgSend_246Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function( + ffi.Pointer 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)>>('objc_msgSend'); + late final __objc_msgSend_246 = __objc_msgSend_246Ptr.asFunction< + ffi.Pointer 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( + 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 anObject, - ffi.Pointer aKey, + ffi.Pointer target, + ffi.Pointer replacement, + int options, + NSRange searchRange, ) { - return __objc_msgSend_306( + return __objc_msgSend_247( obj, sel, - anObject, - aKey, + target, + replacement, + options, + searchRange, ); } - late final __objc_msgSend_306Ptr = _lookup< + late final __objc_msgSend_247Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( + ffi.Pointer 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, + 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_addEntriesFromDictionary_1 = - _registerName1("addEntriesFromDictionary:"); - void _objc_msgSend_307( + late final _sel_stringByReplacingOccurrencesOfString_withString_1 = + _registerName1("stringByReplacingOccurrencesOfString:withString:"); + ffi.Pointer _objc_msgSend_248( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer otherDictionary, + ffi.Pointer target, + ffi.Pointer replacement, ) { - return __objc_msgSend_307( + return __objc_msgSend_248( obj, sel, - otherDictionary, + target, + replacement, ); } - late final __objc_msgSend_307Ptr = _lookup< + late final __objc_msgSend_248Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_307 = __objc_msgSend_307Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, + late final __objc_msgSend_248 = __objc_msgSend_248Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + 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( + late final _sel_stringByReplacingCharactersInRange_withString_1 = + _registerName1("stringByReplacingCharactersInRange:withString:"); + ffi.Pointer _objc_msgSend_249( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer path, + NSRange range, + ffi.Pointer replacement, ) { - return __objc_msgSend_308( + return __objc_msgSend_249( obj, sel, - path, + range, + replacement, ); } - late final __objc_msgSend_308Ptr = _lookup< + late final __objc_msgSend_249Ptr = _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, + NSRange, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_249 = __objc_msgSend_249Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer, NSRange, ffi.Pointer)>(); - ffi.Pointer _objc_msgSend_309( + late final _sel_stringByApplyingTransform_reverse_1 = + _registerName1("stringByApplyingTransform:reverse:"); + ffi.Pointer _objc_msgSend_250( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer url, + NSStringTransform transform, + bool reverse, ) { - return __objc_msgSend_309( + return __objc_msgSend_250( obj, sel, - url, + transform, + reverse, ); } - late final __objc_msgSend_309Ptr = _lookup< + late final __objc_msgSend_250Ptr = _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, + NSStringTransform, + ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_250 = __objc_msgSend_250Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer, NSStringTransform, bool)>(); - late final _sel_dictionaryWithSharedKeySet_1 = - _registerName1("dictionaryWithSharedKeySet:"); - ffi.Pointer _objc_msgSend_310( + late final _sel_writeToURL_atomically_encoding_error_1 = + _registerName1("writeToURL:atomically:encoding:error:"); + bool _objc_msgSend_251( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer keyset, + ffi.Pointer url, + bool useAuxiliaryFile, + int enc, + ffi.Pointer> error, ) { - return __objc_msgSend_310( + return __objc_msgSend_251( obj, sel, - keyset, + url, + useAuxiliaryFile, + enc, + error, ); } - late final __objc_msgSend_310Ptr = _lookup< + late final __objc_msgSend_251Ptr = _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)>(); + 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_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_writeToFile_atomically_encoding_error_1 = + _registerName1("writeToFile:atomically:encoding:error:"); + bool _objc_msgSend_252( ffi.Pointer obj, ffi.Pointer sel, - NSNotificationName name, - ffi.Pointer object, - ffi.Pointer userInfo, + ffi.Pointer path, + bool useAuxiliaryFile, + int enc, + ffi.Pointer> error, ) { - return __objc_msgSend_311( + return __objc_msgSend_252( obj, sel, - name, - object, - userInfo, + path, + useAuxiliaryFile, + enc, + error, ); } - late final __objc_msgSend_311Ptr = _lookup< + late final __objc_msgSend_252Ptr = _lookup< ffi.NativeFunction< - instancetype Function( + ffi.Bool Function( ffi.Pointer, ffi.Pointer, - NSNotificationName, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_311 = __objc_msgSend_311Ptr.asFunction< - instancetype Function( + ffi.Bool, + NSStringEncoding, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_252 = __objc_msgSend_252Ptr.asFunction< + bool Function( ffi.Pointer, ffi.Pointer, - NSNotificationName, ffi.Pointer, - ffi.Pointer)>(); + bool, + 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_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_312( + return __objc_msgSend_253( obj, sel, + characters, + length, + freeBuffer, ); } - late final __objc_msgSend_312Ptr = _lookup< + late final __objc_msgSend_253Ptr = _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)>(); + 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_addObserver_selector_name_object_1 = - _registerName1("addObserver:selector:name:object:"); - void _objc_msgSend_313( + late final _sel_initWithCharactersNoCopy_length_deallocator_1 = + _registerName1("initWithCharactersNoCopy:length:deallocator:"); + instancetype _objc_msgSend_254( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer observer, - ffi.Pointer aSelector, - NSNotificationName aName, - ffi.Pointer anObject, + ffi.Pointer chars, + int len, + ffi.Pointer<_ObjCBlock> deallocator, ) { - return __objc_msgSend_313( + return __objc_msgSend_254( obj, sel, - observer, - aSelector, - aName, - anObject, + chars, + len, + deallocator, ); } - late final __objc_msgSend_313Ptr = _lookup< + late final __objc_msgSend_254Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, + instancetype Function( 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)>(); + 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_postNotification_1 = _registerName1("postNotification:"); - void _objc_msgSend_314( + late final _sel_initWithCharacters_length_1 = + _registerName1("initWithCharacters:length:"); + instancetype _objc_msgSend_255( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer notification, + ffi.Pointer characters, + int length, ) { - return __objc_msgSend_314( + return __objc_msgSend_255( obj, sel, - notification, + characters, + length, ); } - late final __objc_msgSend_314Ptr = _lookup< + late final __objc_msgSend_255Ptr = _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)>(); + 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_postNotificationName_object_1 = - _registerName1("postNotificationName:object:"); - void _objc_msgSend_315( + late final _sel_initWithUTF8String_1 = _registerName1("initWithUTF8String:"); + instancetype _objc_msgSend_256( ffi.Pointer obj, ffi.Pointer sel, - NSNotificationName aName, - ffi.Pointer anObject, + ffi.Pointer nullTerminatedCString, ) { - return __objc_msgSend_315( + return __objc_msgSend_256( obj, sel, - aName, - anObject, + nullTerminatedCString, ); } - late final __objc_msgSend_315Ptr = _lookup< + late final __objc_msgSend_256Ptr = _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)>(); + 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_postNotificationName_object_userInfo_1 = - _registerName1("postNotificationName:object:userInfo:"); - void _objc_msgSend_316( + 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, - NSNotificationName aName, - ffi.Pointer anObject, - ffi.Pointer aUserInfo, + ffi.Pointer format, + va_list argList, ) { - return __objc_msgSend_316( + return __objc_msgSend_257( obj, sel, - aName, - anObject, - aUserInfo, + format, + argList, ); } - late final __objc_msgSend_316Ptr = _lookup< + late final __objc_msgSend_257Ptr = _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)>(); + 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_removeObserver_1 = _registerName1("removeObserver:"); - late final _sel_removeObserver_name_object_1 = - _registerName1("removeObserver:name:object:"); - void _objc_msgSend_317( + late final _sel_initWithFormat_locale_1 = + _registerName1("initWithFormat:locale:"); + instancetype _objc_msgSend_258( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer observer, - NSNotificationName aName, - ffi.Pointer anObject, + ffi.Pointer format, + ffi.Pointer locale, ) { - return __objc_msgSend_317( + return __objc_msgSend_258( obj, sel, - observer, - aName, - anObject, + format, + locale, ); } - late final __objc_msgSend_317Ptr = _lookup< + late final __objc_msgSend_258Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( + instancetype 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 __objc_msgSend_258 = __objc_msgSend_258Ptr.asFunction< + instancetype Function(ffi.Pointer, 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_318( + 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_318( + return __objc_msgSend_259( obj, sel, + format, + locale, + argList, ); } - late final __objc_msgSend_318Ptr = _lookup< + late final __objc_msgSend_259Ptr = _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, + 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_progressWithTotalUnitCount_1 = - _registerName1("progressWithTotalUnitCount:"); - ffi.Pointer _objc_msgSend_319( + late final _sel_initWithValidatedFormat_validFormatSpecifiers_error_1 = + _registerName1("initWithValidatedFormat:validFormatSpecifiers:error:"); + instancetype _objc_msgSend_260( ffi.Pointer obj, ffi.Pointer sel, - int unitCount, + ffi.Pointer format, + ffi.Pointer validFormatSpecifiers, + ffi.Pointer> error, ) { - return __objc_msgSend_319( + return __objc_msgSend_260( obj, sel, - unitCount, + format, + validFormatSpecifiers, + error, ); } - late final __objc_msgSend_319Ptr = _lookup< + late final __objc_msgSend_260Ptr = _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, + 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_discreteProgressWithTotalUnitCount_1 = - _registerName1("discreteProgressWithTotalUnitCount:"); - late final _sel_progressWithTotalUnitCount_parent_pendingUnitCount_1 = - _registerName1("progressWithTotalUnitCount:parent:pendingUnitCount:"); - ffi.Pointer _objc_msgSend_320( + late final _sel_initWithValidatedFormat_validFormatSpecifiers_locale_error_1 = + _registerName1( + "initWithValidatedFormat:validFormatSpecifiers:locale:error:"); + instancetype _objc_msgSend_261( ffi.Pointer obj, ffi.Pointer sel, - int unitCount, - ffi.Pointer parent, - int portionOfParentTotalUnitCount, + ffi.Pointer format, + ffi.Pointer validFormatSpecifiers, + ffi.Pointer locale, + ffi.Pointer> error, ) { - return __objc_msgSend_320( + return __objc_msgSend_261( obj, sel, - unitCount, - parent, - portionOfParentTotalUnitCount, + format, + validFormatSpecifiers, + locale, + error, ); } - late final __objc_msgSend_320Ptr = _lookup< + late final __objc_msgSend_261Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( + instancetype 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)>(); + 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_initWithParent_userInfo_1 = - _registerName1("initWithParent:userInfo:"); - instancetype _objc_msgSend_321( + late final _sel_initWithValidatedFormat_validFormatSpecifiers_arguments_error_1 = + _registerName1( + "initWithValidatedFormat:validFormatSpecifiers:arguments:error:"); + instancetype _objc_msgSend_262( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer parentProgressOrNil, - ffi.Pointer userInfoOrNil, + ffi.Pointer format, + ffi.Pointer validFormatSpecifiers, + va_list argList, + ffi.Pointer> error, ) { - return __objc_msgSend_321( + return __objc_msgSend_262( obj, sel, - parentProgressOrNil, - userInfoOrNil, + format, + validFormatSpecifiers, + argList, + error, ); } - late final __objc_msgSend_321Ptr = _lookup< + late final __objc_msgSend_262Ptr = _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)>(); + 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_performAsCurrentWithPendingUnitCount_usingBlock_1 = - _registerName1("performAsCurrentWithPendingUnitCount:usingBlock:"); - void _objc_msgSend_323( + 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, - int unitCount, - ffi.Pointer<_ObjCBlock> work, + ffi.Pointer format, + ffi.Pointer validFormatSpecifiers, + ffi.Pointer locale, + va_list argList, + ffi.Pointer> error, ) { - return __objc_msgSend_323( + return __objc_msgSend_263( obj, sel, - unitCount, - work, + format, + validFormatSpecifiers, + locale, + argList, + error, ); } - late final __objc_msgSend_323Ptr = _lookup< + late final __objc_msgSend_263Ptr = _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, + 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_resignCurrent1 = _registerName1("resignCurrent"); - late final _sel_addChild_withPendingUnitCount_1 = - _registerName1("addChild:withPendingUnitCount:"); - void _objc_msgSend_324( + late final _sel_initWithData_encoding_1 = + _registerName1("initWithData:encoding:"); + instancetype _objc_msgSend_264( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer child, - int inUnitCount, + ffi.Pointer data, + int encoding, ) { - return __objc_msgSend_324( + return __objc_msgSend_264( obj, sel, - child, - inUnitCount, + data, + encoding, ); } - late final __objc_msgSend_324Ptr = _lookup< + late final __objc_msgSend_264Ptr = _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, + 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_totalUnitCount1 = _registerName1("totalUnitCount"); - int _objc_msgSend_325( + late final _sel_initWithBytes_length_encoding_1 = + _registerName1("initWithBytes:length:encoding:"); + instancetype _objc_msgSend_265( ffi.Pointer obj, ffi.Pointer sel, + ffi.Pointer bytes, + int len, + int encoding, ) { - return __objc_msgSend_325( + return __objc_msgSend_265( obj, sel, + bytes, + len, + encoding, ); } - late final __objc_msgSend_325Ptr = _lookup< + late final __objc_msgSend_265Ptr = _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)>(); + 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_setTotalUnitCount_1 = _registerName1("setTotalUnitCount:"); - void _objc_msgSend_326( + late final _sel_initWithBytesNoCopy_length_encoding_freeWhenDone_1 = + _registerName1("initWithBytesNoCopy:length:encoding:freeWhenDone:"); + instancetype _objc_msgSend_266( ffi.Pointer obj, ffi.Pointer sel, - int value, + ffi.Pointer bytes, + int len, + int encoding, + bool freeBuffer, ) { - return __objc_msgSend_326( + return __objc_msgSend_266( obj, sel, - value, + bytes, + len, + encoding, + freeBuffer, ); } - late final __objc_msgSend_326Ptr = _lookup< + late final __objc_msgSend_266Ptr = _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, + 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_completedUnitCount1 = _registerName1("completedUnitCount"); - late final _sel_setCompletedUnitCount_1 = - _registerName1("setCompletedUnitCount:"); - late final _sel_setLocalizedDescription_1 = - _registerName1("setLocalizedDescription:"); - void _objc_msgSend_327( + 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 value, + ffi.Pointer bytes, + int len, + int encoding, + ffi.Pointer<_ObjCBlock> deallocator, ) { - return __objc_msgSend_327( + return __objc_msgSend_267( obj, sel, - value, + bytes, + len, + encoding, + deallocator, ); } - late final __objc_msgSend_327Ptr = _lookup< + late final __objc_msgSend_267Ptr = _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, + 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_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_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, - bool value, + ffi.Pointer nullTerminatedCString, + int encoding, ) { - return __objc_msgSend_328( + return __objc_msgSend_268( obj, sel, - value, + nullTerminatedCString, + encoding, ); } - late final __objc_msgSend_328Ptr = _lookup< + late final __objc_msgSend_268Ptr = _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, NSStringEncoding)>>('objc_msgSend'); + late final __objc_msgSend_268 = __objc_msgSend_268Ptr.asFunction< + instancetype 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_329( + 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_329( + return __objc_msgSend_269( obj, sel, + url, + enc, + error, ); } - late final __objc_msgSend_329Ptr = _lookup< + late final __objc_msgSend_269Ptr = _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, + 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_setCancellationHandler_1 = - _registerName1("setCancellationHandler:"); - void _objc_msgSend_330( + late final _sel_initWithContentsOfFile_encoding_error_1 = + _registerName1("initWithContentsOfFile:encoding:error:"); + instancetype _objc_msgSend_270( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> value, + ffi.Pointer path, + int enc, + ffi.Pointer> error, ) { - return __objc_msgSend_330( + return __objc_msgSend_270( obj, sel, - value, + path, + enc, + error, ); } - late final __objc_msgSend_330Ptr = _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_330 = __objc_msgSend_330Ptr.asFunction< - void 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_270 = __objc_msgSend_270Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + 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_331( + 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, - ffi.Pointer value, + ffi.Pointer url, + ffi.Pointer enc, + ffi.Pointer> error, ) { - return __objc_msgSend_331( + return __objc_msgSend_271( obj, sel, - value, + url, + enc, + error, ); } - late final __objc_msgSend_331Ptr = _lookup< + late final __objc_msgSend_271Ptr = _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, + 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_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_initWithContentsOfFile_usedEncoding_error_1 = + _registerName1("initWithContentsOfFile:usedEncoding:error:"); + instancetype _objc_msgSend_272( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer value, + ffi.Pointer path, + ffi.Pointer enc, + ffi.Pointer> error, ) { - return __objc_msgSend_332( + return __objc_msgSend_272( obj, sel, - value, + path, + enc, + error, ); } - late final __objc_msgSend_332Ptr = _lookup< + late final __objc_msgSend_272Ptr = _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, + 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_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_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, - ffi.Pointer url, - NSProgressPublishingHandler publishingHandler, + ffi.Pointer data, + ffi.Pointer opts, + ffi.Pointer> string, + ffi.Pointer usedLossyConversion, ) { - return __objc_msgSend_333( + return __objc_msgSend_273( obj, sel, - url, - publishingHandler, + data, + opts, + string, + usedLossyConversion, ); } - late final __objc_msgSend_333Ptr = _lookup< + late final __objc_msgSend_273Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( + NSStringEncoding 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)>>('objc_msgSend'); + late final __objc_msgSend_273 = __objc_msgSend_273Ptr.asFunction< + int Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - NSProgressPublishingHandler)>(); + 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_334( + 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 op, + ffi.Pointer bytes, ) { - return __objc_msgSend_334( + return __objc_msgSend_274( obj, sel, - op, + bytes, ); } - late final __objc_msgSend_334Ptr = _lookup< + late final __objc_msgSend_274Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_334 = __objc_msgSend_334Ptr.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_removeDependency_1 = _registerName1("removeDependency:"); - late final _sel_dependencies1 = _registerName1("dependencies"); - late final _sel_queuePriority1 = _registerName1("queuePriority"); - int _objc_msgSend_335( + late final _sel_getCString_maxLength_1 = + _registerName1("getCString:maxLength:"); + void _objc_msgSend_275( ffi.Pointer obj, ffi.Pointer sel, + ffi.Pointer bytes, + int maxLength, ) { - return __objc_msgSend_335( + return __objc_msgSend_275( obj, sel, + bytes, + maxLength, ); } - late final __objc_msgSend_335Ptr = _lookup< + late final __objc_msgSend_275Ptr = _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)>(); + 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)>(); - late final _sel_setQueuePriority_1 = _registerName1("setQueuePriority:"); - void _objc_msgSend_336( + 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_336( + return __objc_msgSend_276( obj, sel, - value, + bytes, + maxLength, + aRange, + leftoverRange, ); } - late final __objc_msgSend_336Ptr = _lookup< + late final __objc_msgSend_276Ptr = _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)>(); + 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_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_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, - double value, + ffi.Pointer bytes, + int length, + bool freeBuffer, ) { - return __objc_msgSend_337( + return __objc_msgSend_277( obj, sel, - value, + bytes, + length, + freeBuffer, ); } - late final __objc_msgSend_337Ptr = _lookup< + late final __objc_msgSend_277Ptr = _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)>(); + 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_qualityOfService1 = _registerName1("qualityOfService"); - int _objc_msgSend_338( + 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, + ffi.Pointer buffer, ) { - return __objc_msgSend_338( + return __objc_msgSend_278( obj, sel, + buffer, ); } - late final __objc_msgSend_338Ptr = _lookup< + late final __objc_msgSend_278Ptr = _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.Void Function(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)>(); - late final _sel_setQualityOfService_1 = - _registerName1("setQualityOfService:"); - void _objc_msgSend_339( + 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 value, + int aVersion, ) { - return __objc_msgSend_339( + return __objc_msgSend_279( obj, sel, - value, + aVersion, ); } - late final __objc_msgSend_339Ptr = _lookup< + late final __objc_msgSend_279Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_339 = __objc_msgSend_339Ptr.asFunction< + NSInteger)>>('objc_msgSend'); + late final __objc_msgSend_279 = __objc_msgSend_279Ptr.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( + 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, - ffi.Pointer ops, - bool wait, + ffi.Pointer sender, + ffi.Pointer newBytes, ) { - return __objc_msgSend_340( + return __objc_msgSend_280( obj, sel, - ops, - wait, + sender, + newBytes, ); } - late final __objc_msgSend_340Ptr = _lookup< + late final __objc_msgSend_280Ptr = _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.Void 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, bool)>(); + ffi.Pointer, ffi.Pointer)>(); - late final _sel_addOperationWithBlock_1 = - _registerName1("addOperationWithBlock:"); - void _objc_msgSend_341( + late final _sel_URLResourceDidFinishLoading_1 = + _registerName1("URLResourceDidFinishLoading:"); + void _objc_msgSend_281( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> block, + ffi.Pointer sender, ) { - return __objc_msgSend_341( + return __objc_msgSend_281( obj, sel, - block, + sender, ); } - late final __objc_msgSend_341Ptr = _lookup< + late final __objc_msgSend_281Ptr = _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)>>('objc_msgSend'); + late final __objc_msgSend_281 = __objc_msgSend_281Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + 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_342( + 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, - int value, + ffi.Pointer sender, + ffi.Pointer reason, ) { - return __objc_msgSend_342( + return __objc_msgSend_282( obj, sel, - value, + sender, + reason, ); } - late final __objc_msgSend_342Ptr = _lookup< + late final __objc_msgSend_282Ptr = _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, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_282 = __objc_msgSend_282Ptr.asFunction< + void Function(ffi.Pointer, 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_343( + 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 error, + int recoveryOptionIndex, + ffi.Pointer delegate, + ffi.Pointer didRecoverSelector, + ffi.Pointer contextInfo, ) { - return __objc_msgSend_343( + return __objc_msgSend_283( obj, sel, + error, + recoveryOptionIndex, + delegate, + didRecoverSelector, + contextInfo, ); } - late final __objc_msgSend_343Ptr = _lookup< + late final __objc_msgSend_283Ptr = _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.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_setUnderlyingQueue_1 = _registerName1("setUnderlyingQueue:"); - void _objc_msgSend_344( + late final _sel_attemptRecoveryFromError_optionIndex_1 = + _registerName1("attemptRecoveryFromError:optionIndex:"); + bool _objc_msgSend_284( ffi.Pointer obj, ffi.Pointer sel, - dispatch_queue_t value, + ffi.Pointer error, + int recoveryOptionIndex, ) { - return __objc_msgSend_344( + return __objc_msgSend_284( obj, sel, - value, + error, + recoveryOptionIndex, ); } - late final __objc_msgSend_344Ptr = _lookup< + late final __objc_msgSend_284Ptr = _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.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_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 ffi.Pointer _NSFoundationVersionNumber = + _lookup('NSFoundationVersionNumber'); - 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)>(); + double get NSFoundationVersionNumber => _NSFoundationVersionNumber.value; - 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, + set NSFoundationVersionNumber(double value) => + _NSFoundationVersionNumber.value = value; + + ffi.Pointer NSStringFromSelector( + ffi.Pointer aSelector, ) { - return __objc_msgSend_346( - obj, - sel, - name, - obj1, - queue, - block, + return _NSStringFromSelector( + aSelector, ); } - late final __objc_msgSend_346Ptr = _lookup< + late final _NSStringFromSelectorPtr = _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; + ffi.Pointer)>>('NSStringFromSelector'); + late final _NSStringFromSelector = _NSStringFromSelectorPtr.asFunction< + ffi.Pointer Function(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( - ffi.Pointer obj, - ffi.Pointer sel, - double ti, + ffi.Pointer NSSelectorFromString( + ffi.Pointer aSelectorName, ) { - return __objc_msgSend_347( - obj, - sel, - ti, + return _NSSelectorFromString( + aSelectorName, ); } - late final __objc_msgSend_347Ptr = _lookup< + late final _NSSelectorFromStringPtr = _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.Pointer Function( + ffi.Pointer)>>('NSSelectorFromString'); + late final _NSSelectorFromString = _NSSelectorFromStringPtr.asFunction< + ffi.Pointer Function(ffi.Pointer)>(); - late final _sel_timeIntervalSinceDate_1 = - _registerName1("timeIntervalSinceDate:"); - double _objc_msgSend_348( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anotherDate, + ffi.Pointer NSStringFromClass( + ffi.Pointer aClass, ) { - return __objc_msgSend_348( - obj, - sel, - anotherDate, + return _NSStringFromClass( + aClass, ); } - late final __objc_msgSend_348Ptr = _lookup< + late final _NSStringFromClassPtr = _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)>(); + ffi.Pointer Function( + ffi.Pointer)>>('NSStringFromClass'); + late final _NSStringFromClass = _NSStringFromClassPtr.asFunction< + ffi.Pointer Function(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, + ffi.Pointer NSClassFromString( + ffi.Pointer aClassName, ) { - return __objc_msgSend_349( - obj, - sel, - anotherDate, + return _NSClassFromString( + aClassName, ); } - late final __objc_msgSend_349Ptr = _lookup< + late final _NSClassFromStringPtr = _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.Pointer Function( + ffi.Pointer)>>('NSClassFromString'); + late final _NSClassFromString = _NSClassFromStringPtr.asFunction< + ffi.Pointer Function(ffi.Pointer)>(); - late final _sel_laterDate_1 = _registerName1("laterDate:"); - int _objc_msgSend_350( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer other, + ffi.Pointer NSStringFromProtocol( + ffi.Pointer proto, ) { - return __objc_msgSend_350( - obj, - sel, - other, + return _NSStringFromProtocol( + proto, ); } - late final __objc_msgSend_350Ptr = _lookup< + late final _NSStringFromProtocolPtr = _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.Pointer Function( + ffi.Pointer)>>('NSStringFromProtocol'); + late final _NSStringFromProtocol = _NSStringFromProtocolPtr.asFunction< + ffi.Pointer Function(ffi.Pointer)>(); - late final _sel_isEqualToDate_1 = _registerName1("isEqualToDate:"); - bool _objc_msgSend_351( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer otherDate, + ffi.Pointer NSProtocolFromString( + ffi.Pointer namestr, ) { - return __objc_msgSend_351( - obj, - sel, - otherDate, + return _NSProtocolFromString( + namestr, ); } - late final __objc_msgSend_351Ptr = _lookup< + late final _NSProtocolFromStringPtr = _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)>>('NSProtocolFromString'); + late final _NSProtocolFromString = _NSProtocolFromStringPtr.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 NSGetSizeAndAlignment( + ffi.Pointer typePtr, + ffi.Pointer sizep, + ffi.Pointer alignp, ) { - return __objc_msgSend_352( - obj, - sel, - secsToBeAdded, - date, + return _NSGetSizeAndAlignment( + typePtr, + sizep, + alignp, ); } - late final __objc_msgSend_352Ptr = _lookup< + late final _NSGetSizeAndAlignmentPtr = _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, + ffi.Pointer, + ffi.Pointer)>>('NSGetSizeAndAlignment'); + late final _NSGetSizeAndAlignment = _NSGetSizeAndAlignmentPtr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_distantFuture1 = _registerName1("distantFuture"); - ffi.Pointer _objc_msgSend_353( - ffi.Pointer obj, - ffi.Pointer sel, + void NSLog( + ffi.Pointer format, ) { - return __objc_msgSend_353( - obj, - sel, + return _NSLog( + format, ); } - 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 _NSLogPtr = + _lookup)>>( + 'NSLog'); + late final _NSLog = + _NSLogPtr.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_354( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer URL, - int cachePolicy, - double timeoutInterval, + void NSLogv( + ffi.Pointer format, + va_list args, ) { - return __objc_msgSend_354( - obj, - sel, - URL, - cachePolicy, - timeoutInterval, + return _NSLogv( + format, + args, ); } - 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 _NSLogvPtr = _lookup< + ffi + .NativeFunction, va_list)>>( + 'NSLogv'); + late final _NSLogv = + _NSLogvPtr.asFunction, va_list)>(); - 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 ffi.Pointer _NSNotFound = + _lookup('NSNotFound'); - 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)>(); + int get NSNotFound => _NSNotFound.value; - 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, + set NSNotFound(int value) => _NSNotFound.value = value; + + ffi.Pointer _Block_copy1( + ffi.Pointer aBlock, ) { - return __objc_msgSend_356( - obj, - sel, + return __Block_copy1( + aBlock, ); } - late final __objc_msgSend_356Ptr = _lookup< + late final __Block_copy1Ptr = _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)>>('_Block_copy'); + late final __Block_copy1 = __Block_copy1Ptr + .asFunction 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, + void _Block_release1( + ffi.Pointer aBlock, ) { - return __objc_msgSend_357( - obj, - sel, + return __Block_release1( + aBlock, ); } - 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 __Block_release1Ptr = + _lookup)>>( + '_Block_release'); + late final __Block_release1 = + __Block_release1Ptr.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_358( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + void _Block_object_assign( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, ) { - return __objc_msgSend_358( - obj, - sel, - value, + return __Block_object_assign( + arg0, + arg1, + arg2, ); } - late final __objc_msgSend_358Ptr = _lookup< + late final __Block_object_assignPtr = _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)>(); + 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_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 _Block_object_dispose( + ffi.Pointer arg0, + int arg1, ) { - return __objc_msgSend_359( - obj, - sel, - value, + return __Block_object_dispose( + arg0, + arg1, ); } - 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 __Block_object_disposePtr = _lookup< + ffi + .NativeFunction, ffi.Int)>>( + '_Block_object_dispose'); + late final __Block_object_dispose = __Block_object_disposePtr + .asFunction, 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 ffi.Pointer>> + __NSConcreteGlobalBlock = + _lookup>>('_NSConcreteGlobalBlock'); - 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)>(); + ffi.Pointer> get _NSConcreteGlobalBlock => + __NSConcreteGlobalBlock.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, - ) { - return __objc_msgSend_361( - obj, - sel, - value, - field, - ); - } + set _NSConcreteGlobalBlock(ffi.Pointer> value) => + __NSConcreteGlobalBlock.value = value; - 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 ffi.Pointer>> + __NSConcreteStackBlock = + _lookup>>('_NSConcreteStackBlock'); - 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, - ); - } + ffi.Pointer> get _NSConcreteStackBlock => + __NSConcreteStackBlock.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)>(); + set _NSConcreteStackBlock(ffi.Pointer> value) => + __NSConcreteStackBlock.value = value; - 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, - ); + void Debugger() { + return _Debugger(); } - 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 _DebuggerPtr = + _lookup>('Debugger'); + late final _Debugger = _DebuggerPtr.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_364( - ffi.Pointer obj, - ffi.Pointer sel, + void DebugStr( + ConstStr255Param debuggerMsg, ) { - return __objc_msgSend_364( - obj, - sel, + return _DebugStr( + debuggerMsg, ); } - 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 _DebugStrPtr = + _lookup>( + 'DebugStr'); + late final _DebugStr = + _DebugStrPtr.asFunction(); - 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, - ); + void SysBreak() { + return _SysBreak(); } - 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 _SysBreakPtr = + _lookup>('SysBreak'); + late final _SysBreak = _SysBreakPtr.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 SysBreakStr( + ConstStr255Param debuggerMsg, ) { - return __objc_msgSend_366( - obj, - sel, - cookie, + return _SysBreakStr( + 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 _SysBreakStrPtr = + _lookup>( + 'SysBreakStr'); + late final _SysBreakStr = + _SysBreakStrPtr.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, + void SysBreakFunc( + ConstStr255Param debuggerMsg, ) { - return __objc_msgSend_367( - obj, - sel, - date, + return _SysBreakFunc( + debuggerMsg, ); } - 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 _SysBreakFuncPtr = + _lookup>( + 'SysBreakFunc'); + late final _SysBreakFunc = + _SysBreakFuncPtr.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, - ) { - return __objc_msgSend_368( - obj, - sel, - cookies, - URL, - mainDocumentURL, - ); - } + late final ffi.Pointer _kCFCoreFoundationVersionNumber = + _lookup('kCFCoreFoundationVersionNumber'); - 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)>(); + double get kCFCoreFoundationVersionNumber => + _kCFCoreFoundationVersionNumber.value; - late final _sel_cookieAcceptPolicy1 = _registerName1("cookieAcceptPolicy"); - int _objc_msgSend_369( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_369( - obj, - sel, - ); - } + set kCFCoreFoundationVersionNumber(double value) => + _kCFCoreFoundationVersionNumber.value = value; - 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 ffi.Pointer _kCFNotFound = + _lookup('kCFNotFound'); - late final _sel_setCookieAcceptPolicy_1 = - _registerName1("setCookieAcceptPolicy:"); - void _objc_msgSend_370( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + 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 ffi.Pointer - _NSHTTPCookieManagerAcceptPolicyChangedNotification = - _lookup( - 'NSHTTPCookieManagerAcceptPolicyChangedNotification'); + late final _CFGetTypeIDPtr = + _lookup>('CFGetTypeID'); + late final _CFGetTypeID = + _CFGetTypeIDPtr.asFunction(); - NSNotificationName get NSHTTPCookieManagerAcceptPolicyChangedNotification => - _NSHTTPCookieManagerAcceptPolicyChangedNotification.value; + CFStringRef CFCopyTypeIDDescription( + int type_id, + ) { + return _CFCopyTypeIDDescription( + type_id, + ); + } - set NSHTTPCookieManagerAcceptPolicyChangedNotification( - NSNotificationName value) => - _NSHTTPCookieManagerAcceptPolicyChangedNotification.value = value; + late final _CFCopyTypeIDDescriptionPtr = + _lookup>( + 'CFCopyTypeIDDescription'); + late final _CFCopyTypeIDDescription = + _CFCopyTypeIDDescriptionPtr.asFunction(); - late final ffi.Pointer - _NSHTTPCookieManagerCookiesChangedNotification = - _lookup( - 'NSHTTPCookieManagerCookiesChangedNotification'); + CFTypeRef CFRetain( + CFTypeRef cf, + ) { + return _CFRetain( + cf, + ); + } - NSNotificationName get NSHTTPCookieManagerCookiesChangedNotification => - _NSHTTPCookieManagerCookiesChangedNotification.value; + late final _CFRetainPtr = + _lookup>('CFRetain'); + late final _CFRetain = + _CFRetainPtr.asFunction(); - set NSHTTPCookieManagerCookiesChangedNotification(NSNotificationName value) => - _NSHTTPCookieManagerCookiesChangedNotification.value = value; + void CFRelease( + CFTypeRef cf, + ) { + return _CFRelease( + cf, + ); + } - late final ffi.Pointer - _NSProgressEstimatedTimeRemainingKey = - _lookup('NSProgressEstimatedTimeRemainingKey'); + late final _CFReleasePtr = + _lookup>('CFRelease'); + late final _CFRelease = _CFReleasePtr.asFunction(); - NSProgressUserInfoKey get NSProgressEstimatedTimeRemainingKey => - _NSProgressEstimatedTimeRemainingKey.value; + CFTypeRef CFAutorelease( + CFTypeRef arg, + ) { + return _CFAutorelease( + arg, + ); + } - set NSProgressEstimatedTimeRemainingKey(NSProgressUserInfoKey value) => - _NSProgressEstimatedTimeRemainingKey.value = value; + late final _CFAutoreleasePtr = + _lookup>( + 'CFAutorelease'); + late final _CFAutorelease = + _CFAutoreleasePtr.asFunction(); - late final ffi.Pointer _NSProgressThroughputKey = - _lookup('NSProgressThroughputKey'); + int CFGetRetainCount( + CFTypeRef cf, + ) { + return _CFGetRetainCount( + cf, + ); + } - NSProgressUserInfoKey get NSProgressThroughputKey => - _NSProgressThroughputKey.value; + late final _CFGetRetainCountPtr = + _lookup>( + 'CFGetRetainCount'); + late final _CFGetRetainCount = + _CFGetRetainCountPtr.asFunction(); - set NSProgressThroughputKey(NSProgressUserInfoKey value) => - _NSProgressThroughputKey.value = value; + int CFEqual( + CFTypeRef cf1, + CFTypeRef cf2, + ) { + return _CFEqual( + cf1, + cf2, + ); + } - late final ffi.Pointer _NSProgressKindFile = - _lookup('NSProgressKindFile'); + late final _CFEqualPtr = + _lookup>( + 'CFEqual'); + late final _CFEqual = + _CFEqualPtr.asFunction(); - NSProgressKind get NSProgressKindFile => _NSProgressKindFile.value; + int CFHash( + CFTypeRef cf, + ) { + return _CFHash( + cf, + ); + } - set NSProgressKindFile(NSProgressKind value) => - _NSProgressKindFile.value = value; + late final _CFHashPtr = + _lookup>('CFHash'); + late final _CFHash = _CFHashPtr.asFunction(); - late final ffi.Pointer - _NSProgressFileOperationKindKey = - _lookup('NSProgressFileOperationKindKey'); + CFStringRef CFCopyDescription( + CFTypeRef cf, + ) { + return _CFCopyDescription( + cf, + ); + } - NSProgressUserInfoKey get NSProgressFileOperationKindKey => - _NSProgressFileOperationKindKey.value; + late final _CFCopyDescriptionPtr = + _lookup>( + 'CFCopyDescription'); + late final _CFCopyDescription = + _CFCopyDescriptionPtr.asFunction(); - set NSProgressFileOperationKindKey(NSProgressUserInfoKey value) => - _NSProgressFileOperationKindKey.value = value; + CFAllocatorRef CFGetAllocator( + CFTypeRef cf, + ) { + return _CFGetAllocator( + cf, + ); + } - late final ffi.Pointer - _NSProgressFileOperationKindDownloading = - _lookup( - 'NSProgressFileOperationKindDownloading'); + late final _CFGetAllocatorPtr = + _lookup>( + 'CFGetAllocator'); + late final _CFGetAllocator = + _CFGetAllocatorPtr.asFunction(); - NSProgressFileOperationKind get NSProgressFileOperationKindDownloading => - _NSProgressFileOperationKindDownloading.value; + CFTypeRef CFMakeCollectable( + CFTypeRef cf, + ) { + return _CFMakeCollectable( + cf, + ); + } - 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; + late final _CFMakeCollectablePtr = + _lookup>( + 'CFMakeCollectable'); + late final _CFMakeCollectable = + _CFMakeCollectablePtr.asFunction(); - int CFArrayGetTypeID() { - return _CFArrayGetTypeID(); + ffi.Pointer NSDefaultMallocZone() { + return _NSDefaultMallocZone(); } - late final _CFArrayGetTypeIDPtr = - _lookup>('CFArrayGetTypeID'); - late final _CFArrayGetTypeID = - _CFArrayGetTypeIDPtr.asFunction(); + late final _NSDefaultMallocZonePtr = + _lookup Function()>>( + 'NSDefaultMallocZone'); + late final _NSDefaultMallocZone = + _NSDefaultMallocZonePtr.asFunction Function()>(); - CFArrayRef CFArrayCreate( - CFAllocatorRef allocator, - ffi.Pointer> values, - int numValues, - ffi.Pointer callBacks, + ffi.Pointer NSCreateZone( + int startSize, + int granularity, + bool canFree, ) { - return _CFArrayCreate( - allocator, - values, - numValues, - callBacks, + return _NSCreateZone( + startSize, + granularity, + canFree, ); } - late final _CFArrayCreatePtr = _lookup< + late final _NSCreateZonePtr = _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 Function( + NSUInteger, NSUInteger, ffi.Bool)>>('NSCreateZone'); + late final _NSCreateZone = _NSCreateZonePtr.asFunction< + ffi.Pointer Function(int, int, bool)>(); - CFArrayRef CFArrayCreateCopy( - CFAllocatorRef allocator, - CFArrayRef theArray, + void NSRecycleZone( + ffi.Pointer zone, ) { - return _CFArrayCreateCopy( - allocator, - theArray, + return _NSRecycleZone( + zone, ); } - late final _CFArrayCreateCopyPtr = _lookup< - ffi.NativeFunction>( - 'CFArrayCreateCopy'); - late final _CFArrayCreateCopy = _CFArrayCreateCopyPtr.asFunction< - CFArrayRef Function(CFAllocatorRef, CFArrayRef)>(); + late final _NSRecycleZonePtr = + _lookup)>>( + 'NSRecycleZone'); + late final _NSRecycleZone = + _NSRecycleZonePtr.asFunction)>(); - CFMutableArrayRef CFArrayCreateMutable( - CFAllocatorRef allocator, - int capacity, - ffi.Pointer callBacks, + void NSSetZoneName( + ffi.Pointer zone, + ffi.Pointer name, ) { - return _CFArrayCreateMutable( - allocator, - capacity, - callBacks, + return _NSSetZoneName( + zone, + name, ); } - late final _CFArrayCreateMutablePtr = _lookup< + late final _NSSetZoneNamePtr = _lookup< ffi.NativeFunction< - CFMutableArrayRef Function(CFAllocatorRef, CFIndex, - ffi.Pointer)>>('CFArrayCreateMutable'); - late final _CFArrayCreateMutable = _CFArrayCreateMutablePtr.asFunction< - CFMutableArrayRef Function( - CFAllocatorRef, int, ffi.Pointer)>(); + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>>('NSSetZoneName'); + late final _NSSetZoneName = _NSSetZoneNamePtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer)>(); - CFMutableArrayRef CFArrayCreateMutableCopy( - CFAllocatorRef allocator, - int capacity, - CFArrayRef theArray, + ffi.Pointer NSZoneName( + ffi.Pointer zone, ) { - return _CFArrayCreateMutableCopy( - allocator, - capacity, - theArray, + return _NSZoneName( + zone, ); } - late final _CFArrayCreateMutableCopyPtr = _lookup< + late final _NSZoneNamePtr = _lookup< ffi.NativeFunction< - CFMutableArrayRef Function(CFAllocatorRef, CFIndex, - CFArrayRef)>>('CFArrayCreateMutableCopy'); - late final _CFArrayCreateMutableCopy = - _CFArrayCreateMutableCopyPtr.asFunction< - CFMutableArrayRef Function(CFAllocatorRef, int, CFArrayRef)>(); + ffi.Pointer Function(ffi.Pointer)>>('NSZoneName'); + late final _NSZoneName = _NSZoneNamePtr.asFunction< + ffi.Pointer Function(ffi.Pointer)>(); - int CFArrayGetCount( - CFArrayRef theArray, + ffi.Pointer NSZoneFromPointer( + ffi.Pointer ptr, ) { - return _CFArrayGetCount( - theArray, + return _NSZoneFromPointer( + ptr, ); } - late final _CFArrayGetCountPtr = - _lookup>( - 'CFArrayGetCount'); - late final _CFArrayGetCount = - _CFArrayGetCountPtr.asFunction(); + late final _NSZoneFromPointerPtr = _lookup< + ffi + .NativeFunction Function(ffi.Pointer)>>( + 'NSZoneFromPointer'); + late final _NSZoneFromPointer = _NSZoneFromPointerPtr.asFunction< + ffi.Pointer Function(ffi.Pointer)>(); - int CFArrayGetCountOfValue( - CFArrayRef theArray, - CFRange range, - ffi.Pointer value, + ffi.Pointer NSZoneMalloc( + ffi.Pointer zone, + int size, ) { - return _CFArrayGetCountOfValue( - theArray, - range, - value, + return _NSZoneMalloc( + zone, + size, ); } - late final _CFArrayGetCountOfValuePtr = _lookup< + late final _NSZoneMallocPtr = _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, NSUInteger)>>('NSZoneMalloc'); + late final _NSZoneMalloc = _NSZoneMallocPtr.asFunction< + ffi.Pointer Function(ffi.Pointer, int)>(); - int CFArrayContainsValue( - CFArrayRef theArray, - CFRange range, - ffi.Pointer value, + ffi.Pointer NSZoneCalloc( + ffi.Pointer zone, + int numElems, + int byteSize, ) { - return _CFArrayContainsValue( - theArray, - range, - value, + return _NSZoneCalloc( + zone, + numElems, + byteSize, ); } - late final _CFArrayContainsValuePtr = _lookup< + late final _NSZoneCallocPtr = _lookup< ffi.NativeFunction< - Boolean Function(CFArrayRef, CFRange, - ffi.Pointer)>>('CFArrayContainsValue'); - late final _CFArrayContainsValue = _CFArrayContainsValuePtr.asFunction< - int Function(CFArrayRef, CFRange, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, NSUInteger, NSUInteger)>>('NSZoneCalloc'); + late final _NSZoneCalloc = _NSZoneCallocPtr.asFunction< + ffi.Pointer Function(ffi.Pointer, int, int)>(); - ffi.Pointer CFArrayGetValueAtIndex( - CFArrayRef theArray, - int idx, + ffi.Pointer NSZoneRealloc( + ffi.Pointer zone, + ffi.Pointer ptr, + int size, ) { - return _CFArrayGetValueAtIndex( - theArray, - idx, + return _NSZoneRealloc( + zone, + ptr, + size, ); } - late final _CFArrayGetValueAtIndexPtr = _lookup< + late final _NSZoneReallocPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - CFArrayRef, CFIndex)>>('CFArrayGetValueAtIndex'); - late final _CFArrayGetValueAtIndex = _CFArrayGetValueAtIndexPtr.asFunction< - ffi.Pointer Function(CFArrayRef, int)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSUInteger)>>('NSZoneRealloc'); + late final _NSZoneRealloc = _NSZoneReallocPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - void CFArrayGetValues( - CFArrayRef theArray, - CFRange range, - ffi.Pointer> values, + void NSZoneFree( + ffi.Pointer zone, + ffi.Pointer ptr, ) { - return _CFArrayGetValues( - theArray, - range, - values, + return _NSZoneFree( + zone, + ptr, ); } - late final _CFArrayGetValuesPtr = _lookup< + late final _NSZoneFreePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFArrayRef, CFRange, - ffi.Pointer>)>>('CFArrayGetValues'); - late final _CFArrayGetValues = _CFArrayGetValuesPtr.asFunction< - void Function(CFArrayRef, CFRange, ffi.Pointer>)>(); + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>>('NSZoneFree'); + late final _NSZoneFree = _NSZoneFreePtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer)>(); - void CFArrayApplyFunction( - CFArrayRef theArray, - CFRange range, - CFArrayApplierFunction applier, - ffi.Pointer context, + ffi.Pointer NSAllocateCollectable( + int size, + int options, ) { - return _CFArrayApplyFunction( - theArray, - range, - applier, - context, + return _NSAllocateCollectable( + size, + options, ); } - late final _CFArrayApplyFunctionPtr = _lookup< + late final _NSAllocateCollectablePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFArrayRef, CFRange, CFArrayApplierFunction, - ffi.Pointer)>>('CFArrayApplyFunction'); - late final _CFArrayApplyFunction = _CFArrayApplyFunctionPtr.asFunction< - void Function(CFArrayRef, CFRange, CFArrayApplierFunction, - ffi.Pointer)>(); + ffi.Pointer Function( + NSUInteger, NSUInteger)>>('NSAllocateCollectable'); + late final _NSAllocateCollectable = _NSAllocateCollectablePtr.asFunction< + ffi.Pointer Function(int, int)>(); - int CFArrayGetFirstIndexOfValue( - CFArrayRef theArray, - CFRange range, - ffi.Pointer value, + ffi.Pointer NSReallocateCollectable( + ffi.Pointer ptr, + int size, + int options, ) { - return _CFArrayGetFirstIndexOfValue( - theArray, - range, - value, + return _NSReallocateCollectable( + ptr, + size, + options, ); } - late final _CFArrayGetFirstIndexOfValuePtr = _lookup< + late final _NSReallocateCollectablePtr = _lookup< ffi.NativeFunction< - CFIndex Function(CFArrayRef, CFRange, - ffi.Pointer)>>('CFArrayGetFirstIndexOfValue'); - late final _CFArrayGetFirstIndexOfValue = _CFArrayGetFirstIndexOfValuePtr - .asFunction)>(); + ffi.Pointer Function(ffi.Pointer, NSUInteger, + NSUInteger)>>('NSReallocateCollectable'); + late final _NSReallocateCollectable = _NSReallocateCollectablePtr.asFunction< + ffi.Pointer Function(ffi.Pointer, int, int)>(); - int CFArrayGetLastIndexOfValue( - CFArrayRef theArray, - CFRange range, - ffi.Pointer value, + 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 _CFArrayGetLastIndexOfValue( - theArray, - range, - value, + return _NSRoundUpToMultipleOfPageSize( + bytes, ); } - late final _CFArrayGetLastIndexOfValuePtr = _lookup< - ffi.NativeFunction< - CFIndex Function(CFArrayRef, CFRange, - ffi.Pointer)>>('CFArrayGetLastIndexOfValue'); - late final _CFArrayGetLastIndexOfValue = _CFArrayGetLastIndexOfValuePtr - .asFunction)>(); + late final _NSRoundUpToMultipleOfPageSizePtr = + _lookup>( + 'NSRoundUpToMultipleOfPageSize'); + late final _NSRoundUpToMultipleOfPageSize = + _NSRoundUpToMultipleOfPageSizePtr.asFunction(); - int CFArrayBSearchValues( - CFArrayRef theArray, - CFRange range, - ffi.Pointer value, - CFComparatorFunction comparator, - ffi.Pointer context, + int NSRoundDownToMultipleOfPageSize( + int bytes, ) { - return _CFArrayBSearchValues( - theArray, - range, - value, - comparator, - context, + return _NSRoundDownToMultipleOfPageSize( + 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 _NSRoundDownToMultipleOfPageSizePtr = + _lookup>( + 'NSRoundDownToMultipleOfPageSize'); + late final _NSRoundDownToMultipleOfPageSize = + _NSRoundDownToMultipleOfPageSizePtr.asFunction(); - void CFArrayAppendValue( - CFMutableArrayRef theArray, - ffi.Pointer value, + ffi.Pointer NSAllocateMemoryPages( + int bytes, ) { - return _CFArrayAppendValue( - theArray, - value, + return _NSAllocateMemoryPages( + bytes, ); } - 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 _NSAllocateMemoryPagesPtr = + _lookup Function(NSUInteger)>>( + 'NSAllocateMemoryPages'); + late final _NSAllocateMemoryPages = _NSAllocateMemoryPagesPtr.asFunction< + ffi.Pointer Function(int)>(); - void CFArrayInsertValueAtIndex( - CFMutableArrayRef theArray, - int idx, - ffi.Pointer value, + void NSDeallocateMemoryPages( + ffi.Pointer ptr, + int bytes, ) { - return _CFArrayInsertValueAtIndex( - theArray, - idx, - value, + return _NSDeallocateMemoryPages( + ptr, + bytes, ); } - late final _CFArrayInsertValueAtIndexPtr = _lookup< + late final _NSDeallocateMemoryPagesPtr = _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, NSUInteger)>>('NSDeallocateMemoryPages'); + late final _NSDeallocateMemoryPages = _NSDeallocateMemoryPagesPtr.asFunction< + void Function(ffi.Pointer, int)>(); - void CFArraySetValueAtIndex( - CFMutableArrayRef theArray, - int idx, - ffi.Pointer value, + void NSCopyMemoryPages( + ffi.Pointer source, + ffi.Pointer dest, + int bytes, ) { - return _CFArraySetValueAtIndex( - theArray, - idx, - value, + return _NSCopyMemoryPages( + source, + dest, + bytes, ); } - late final _CFArraySetValueAtIndexPtr = _lookup< + late final _NSCopyMemoryPagesPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFMutableArrayRef, CFIndex, - ffi.Pointer)>>('CFArraySetValueAtIndex'); - late final _CFArraySetValueAtIndex = _CFArraySetValueAtIndexPtr.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 CFArrayRemoveValueAtIndex( - CFMutableArrayRef theArray, - int idx, - ) { - return _CFArrayRemoveValueAtIndex( - theArray, - idx, - ); + int NSRealMemoryAvailable() { + return _NSRealMemoryAvailable(); } - late final _CFArrayRemoveValueAtIndexPtr = _lookup< - ffi.NativeFunction>( - 'CFArrayRemoveValueAtIndex'); - late final _CFArrayRemoveValueAtIndex = _CFArrayRemoveValueAtIndexPtr - .asFunction(); + late final _NSRealMemoryAvailablePtr = + _lookup>( + 'NSRealMemoryAvailable'); + late final _NSRealMemoryAvailable = + _NSRealMemoryAvailablePtr.asFunction(); - void CFArrayRemoveAllValues( - CFMutableArrayRef theArray, + ffi.Pointer NSAllocateObject( + ffi.Pointer aClass, + int extraBytes, + ffi.Pointer zone, ) { - return _CFArrayRemoveAllValues( - theArray, + return _NSAllocateObject( + aClass, + extraBytes, + zone, ); } - late final _CFArrayRemoveAllValuesPtr = - _lookup>( - 'CFArrayRemoveAllValues'); - late final _CFArrayRemoveAllValues = - _CFArrayRemoveAllValuesPtr.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 CFArrayReplaceValues( - CFMutableArrayRef theArray, - CFRange range, - ffi.Pointer> newValues, - int newCount, + void NSDeallocateObject( + ffi.Pointer object, ) { - return _CFArrayReplaceValues( - theArray, - range, - newValues, - newCount, + return _NSDeallocateObject( + object, ); } - 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 _NSDeallocateObjectPtr = + _lookup)>>( + 'NSDeallocateObject'); + late final _NSDeallocateObject = _NSDeallocateObjectPtr.asFunction< + void Function(ffi.Pointer)>(); - void CFArrayExchangeValuesAtIndices( - CFMutableArrayRef theArray, - int idx1, - int idx2, + ffi.Pointer NSCopyObject( + ffi.Pointer object, + int extraBytes, + ffi.Pointer zone, ) { - return _CFArrayExchangeValuesAtIndices( - theArray, - idx1, - idx2, + return _NSCopyObject( + object, + extraBytes, + zone, ); } - late final _CFArrayExchangeValuesAtIndicesPtr = _lookup< + late final _NSCopyObjectPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFMutableArrayRef, CFIndex, - CFIndex)>>('CFArrayExchangeValuesAtIndices'); - late final _CFArrayExchangeValuesAtIndices = - _CFArrayExchangeValuesAtIndicesPtr.asFunction< - void Function(CFMutableArrayRef, int, int)>(); + ffi.Pointer Function(ffi.Pointer, NSUInteger, + ffi.Pointer)>>('NSCopyObject'); + late final _NSCopyObject = _NSCopyObjectPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, int, ffi.Pointer)>(); - void CFArraySortValues( - CFMutableArrayRef theArray, - CFRange range, - CFComparatorFunction comparator, - ffi.Pointer context, + bool NSShouldRetainWithZone( + ffi.Pointer anObject, + ffi.Pointer requestedZone, ) { - return _CFArraySortValues( - theArray, - range, - comparator, - context, + return _NSShouldRetainWithZone( + anObject, + requestedZone, ); } - late final _CFArraySortValuesPtr = _lookup< + late final _NSShouldRetainWithZonePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFMutableArrayRef, CFRange, CFComparatorFunction, - ffi.Pointer)>>('CFArraySortValues'); - late final _CFArraySortValues = _CFArraySortValuesPtr.asFunction< - void Function(CFMutableArrayRef, CFRange, CFComparatorFunction, - ffi.Pointer)>(); + ffi.Bool Function(ffi.Pointer, + ffi.Pointer)>>('NSShouldRetainWithZone'); + late final _NSShouldRetainWithZone = _NSShouldRetainWithZonePtr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer)>(); - void CFArrayAppendArray( - CFMutableArrayRef theArray, - CFArrayRef otherArray, - CFRange otherRange, + void NSIncrementExtraRefCount( + ffi.Pointer object, ) { - return _CFArrayAppendArray( - theArray, - otherArray, - otherRange, + return _NSIncrementExtraRefCount( + 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 _NSIncrementExtraRefCountPtr = + _lookup)>>( + 'NSIncrementExtraRefCount'); + late final _NSIncrementExtraRefCount = _NSIncrementExtraRefCountPtr + .asFunction)>(); - late final _class_OS_object1 = _getClass1("OS_object"); - ffi.Pointer os_retain( - ffi.Pointer object, + bool NSDecrementExtraRefCountWasZero( + ffi.Pointer object, ) { - return _os_retain( + return _NSDecrementExtraRefCountWasZero( 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 _NSDecrementExtraRefCountWasZeroPtr = + _lookup)>>( + 'NSDecrementExtraRefCountWasZero'); + late final _NSDecrementExtraRefCountWasZero = + _NSDecrementExtraRefCountWasZeroPtr.asFunction< + bool Function(ffi.Pointer)>(); - void os_release( - ffi.Pointer object, + int NSExtraRefCount( + ffi.Pointer object, ) { - return _os_release( + return _NSExtraRefCount( object, ); } - late final _os_releasePtr = - _lookup)>>( - 'os_release'); - late final _os_release = - _os_releasePtr.asFunction)>(); + late final _NSExtraRefCountPtr = + _lookup)>>( + 'NSExtraRefCount'); + late final _NSExtraRefCount = + _NSExtraRefCountPtr.asFunction)>(); - ffi.Pointer sec_retain( - ffi.Pointer obj, + NSRange NSUnionRange( + NSRange range1, + NSRange range2, ) { - return _sec_retain( - obj, + return _NSUnionRange( + 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 _NSUnionRangePtr = + _lookup>( + 'NSUnionRange'); + late final _NSUnionRange = + _NSUnionRangePtr.asFunction(); - void sec_release( - ffi.Pointer obj, + NSRange NSIntersectionRange( + NSRange range1, + NSRange range2, ) { - return _sec_release( - obj, + return _NSIntersectionRange( + range1, + range2, ); } - late final _sec_releasePtr = - _lookup)>>( - 'sec_release'); - late final _sec_release = - _sec_releasePtr.asFunction)>(); + late final _NSIntersectionRangePtr = + _lookup>( + 'NSIntersectionRange'); + late final _NSIntersectionRange = + _NSIntersectionRangePtr.asFunction(); - CFStringRef SecCopyErrorMessageString( - int status, - ffi.Pointer reserved, + ffi.Pointer NSStringFromRange( + NSRange range, ) { - return _SecCopyErrorMessageString( - status, - reserved, + return _NSStringFromRange( + range, ); } - late final _SecCopyErrorMessageStringPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function( - OSStatus, ffi.Pointer)>>('SecCopyErrorMessageString'); - late final _SecCopyErrorMessageString = _SecCopyErrorMessageStringPtr - .asFunction)>(); + late final _NSStringFromRangePtr = + _lookup Function(NSRange)>>( + 'NSStringFromRange'); + late final _NSStringFromRange = _NSStringFromRangePtr.asFunction< + ffi.Pointer Function(NSRange)>(); - void __assert_rtn( - ffi.Pointer arg0, - ffi.Pointer arg1, - int arg2, - ffi.Pointer arg3, + NSRange NSRangeFromString( + ffi.Pointer aString, ) { - return ___assert_rtn( - arg0, - arg1, - arg2, - arg3, + return _NSRangeFromString( + aString, ); } - 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 _NSRangeFromStringPtr = + _lookup)>>( + 'NSRangeFromString'); + late final _NSRangeFromString = _NSRangeFromStringPtr.asFunction< + NSRange Function(ffi.Pointer)>(); - int ___runetype( - int arg0, + 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 ____runetype( - arg0, + return __objc_msgSend_285( + obj, + sel, + indexSet, ); } - late final ____runetypePtr = _lookup< - ffi.NativeFunction>( - '___runetype'); - late final ____runetype = ____runetypePtr.asFunction(); + 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)>(); - int ___tolower( - 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 ____tolower( - arg0, + return __objc_msgSend_286( + obj, + sel, + value, ); } - 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_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 ___toupper( - 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 ____toupper( - arg0, + return __objc_msgSend_287( + obj, + sel, + range, ); } - 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_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 __maskrune( - int arg0, - int arg1, + 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 ___maskrune( - arg0, - arg1, + return __objc_msgSend_288( + obj, + sel, + index, + delta, ); } - late final ___maskrunePtr = _lookup< + late final __objc_msgSend_288Ptr = _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, + NSUInteger, NSInteger)>>('objc_msgSend'); + late final __objc_msgSend_288 = __objc_msgSend_288Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, int)>(); - int __toupper( - int arg0, + 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 ___toupper1( - arg0, + return __objc_msgSend_289( + obj, + sel, + anObject, + index, ); } - 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_289Ptr = _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)>(); - int __tolower( - 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 ___tolower1( - arg0, + return __objc_msgSend_290( + obj, + sel, + index, + anObject, ); } - 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_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)>(); - ffi.Pointer __error() { - return ___error(); + 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 __objc_msgSend_291( + obj, + sel, + otherArray, + ); } - late final ___errorPtr = - _lookup Function()>>('__error'); - late final ___error = - ___errorPtr.asFunction Function()>(); + 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 localeconv() { - return _localeconv(); - } - - late final _localeconvPtr = - _lookup Function()>>('localeconv'); - late final _localeconv = - _localeconvPtr.asFunction Function()>(); - - ffi.Pointer setlocale( - int arg0, - ffi.Pointer arg1, + late final _sel_exchangeObjectAtIndex_withObjectAtIndex_1 = + _registerName1("exchangeObjectAtIndex:withObjectAtIndex:"); + void _objc_msgSend_292( + ffi.Pointer obj, + ffi.Pointer sel, + int idx1, + int idx2, ) { - return _setlocale( - arg0, - arg1, + return __objc_msgSend_292( + obj, + sel, + idx1, + idx2, ); } - late final _setlocalePtr = _lookup< + late final __objc_msgSend_292Ptr = _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, + NSUInteger, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_292 = __objc_msgSend_292Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, int)>(); - int __fpclassifyf( - double arg0, + 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 ___fpclassifyf( - arg0, + return __objc_msgSend_293( + obj, + sel, + anObject, + range, ); } - late final ___fpclassifyfPtr = - _lookup>('__fpclassifyf'); - late final ___fpclassifyf = - ___fpclassifyfPtr.asFunction(); + late final __objc_msgSend_293Ptr = _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)>(); - int __fpclassifyd( - 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 ___fpclassifyd( - arg0, + return __objc_msgSend_294( + obj, + sel, + indices, + cnt, ); } - late final ___fpclassifydPtr = - _lookup>( - '__fpclassifyd'); - late final ___fpclassifyd = - ___fpclassifydPtr.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)>(); - double acosf( - 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 _acosf( - arg0, + return __objc_msgSend_295( + obj, + sel, + range, + otherArray, + otherRange, ); } - late final _acosfPtr = - _lookup>('acosf'); - late final _acosf = _acosfPtr.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 acos( - 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 _acos( - arg0, + return __objc_msgSend_296( + obj, + sel, + range, + otherArray, ); } - late final _acosPtr = - _lookup>('acos'); - late final _acos = _acosPtr.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 asinf( - 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 _asinf( - arg0, + return __objc_msgSend_297( + obj, + sel, + compare, + context, ); } - late final _asinfPtr = - _lookup>('asinf'); - late final _asinf = _asinfPtr.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 asin( - 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 _asin( - arg0, + return __objc_msgSend_298( + obj, + sel, + objects, + indexes, ); } - late final _asinPtr = - _lookup>('asin'); - late final _asin = _asinPtr.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 atanf( - 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 _atanf( - arg0, + return __objc_msgSend_299( + obj, + sel, + indexes, + objects, ); } - late final _atanfPtr = - _lookup>('atanf'); - late final _atanf = _atanfPtr.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 atan( - 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 _atan( - arg0, + return __objc_msgSend_300( + obj, + sel, + cmptr, ); } - late final _atanPtr = - _lookup>('atan'); - late final _atan = _atanPtr.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 atan2f( - double arg0, - double arg1, + late final _sel_sortWithOptions_usingComparator_1 = + _registerName1("sortWithOptions:usingComparator:"); + void _objc_msgSend_301( + ffi.Pointer obj, + ffi.Pointer sel, + int opts, + NSComparator cmptr, ) { - return _atan2f( - arg0, - arg1, + return __objc_msgSend_301( + obj, + sel, + opts, + cmptr, ); } - late final _atan2fPtr = - _lookup>( - 'atan2f'); - late final _atan2f = _atan2fPtr.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 atan2( - 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 _atan2( - arg0, - arg1, + return __objc_msgSend_302( + obj, + sel, + path, ); } - late final _atan2Ptr = - _lookup>( - 'atan2'); - late final _atan2 = _atan2Ptr.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 cosf( - double arg0, + ffi.Pointer _objc_msgSend_303( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, ) { - return _cosf( - arg0, + return __objc_msgSend_303( + obj, + sel, + url, ); } - late final _cosfPtr = - _lookup>('cosf'); - late final _cosf = _cosfPtr.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 cos( - double arg0, + late final _sel_applyDifference_1 = _registerName1("applyDifference:"); + void _objc_msgSend_304( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer difference, ) { - return _cos( - arg0, + return __objc_msgSend_304( + obj, + sel, + difference, ); } - late final _cosPtr = - _lookup>('cos'); - late final _cos = _cosPtr.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 sinf( - 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 _sinf( - arg0, + return __objc_msgSend_305( + obj, + sel, + value, ); } - late final _sinfPtr = - _lookup>('sinf'); - late final _sinf = _sinfPtr.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 sin( - 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 _sin( - arg0, + return __objc_msgSend_306( + obj, + sel, + other, ); } - late final _sinPtr = - _lookup>('sin'); - late final _sin = _sinPtr.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 tanf( - 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 _tanf( - arg0, + return __objc_msgSend_307( + obj, + sel, + range, + bytes, ); } - late final _tanfPtr = - _lookup>('tanf'); - late final _tanf = _tanfPtr.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 tan( - 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 _tan( - arg0, + return __objc_msgSend_308( + obj, + sel, + range, + replacementBytes, + replacementLength, ); } - late final _tanPtr = - _lookup>('tan'); - late final _tan = _tanPtr.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 acoshf( - 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 _acoshf( - arg0, + return __objc_msgSend_309( + obj, + sel, + algorithm, + error, ); } - late final _acoshfPtr = - _lookup>('acoshf'); - late final _acoshf = _acoshfPtr.asFunction(); + 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>)>(); - 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_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, + ffi.Pointer URL, + ffi.Pointer MIMEType, + int length, + ffi.Pointer name, ) { - return _coshf( - arg0, + return __objc_msgSend_315( + obj, + sel, + URL, + MIMEType, + length, + name, ); } - late final _coshfPtr = - _lookup>('coshf'); - late final _coshf = _coshfPtr.asFunction(); + late final __objc_msgSend_315Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSInteger, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_315 = __objc_msgSend_315Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); - double cosh( - double arg0, + 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 _cosh( - arg0, + return __objc_msgSend_316( + obj, + sel, + response, + data, ); } - late final _coshPtr = - _lookup>('cosh'); - late final _cosh = _coshPtr.asFunction(); + late final __objc_msgSend_316Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_316 = __objc_msgSend_316Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - double sinhf( - double arg0, + 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 response, + ffi.Pointer data, + ffi.Pointer userInfo, + int storagePolicy, ) { - return _sinhf( - arg0, + return __objc_msgSend_317( + obj, + sel, + response, + data, + userInfo, + storagePolicy, ); } - late final _sinhfPtr = - _lookup>('sinhf'); - late final _sinhf = _sinhfPtr.asFunction(); + late final __objc_msgSend_317Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_317 = __objc_msgSend_317Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); - double sinh( - double arg0, + late final _sel_response1 = _registerName1("response"); + ffi.Pointer _objc_msgSend_318( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _sinh( - arg0, + return __objc_msgSend_318( + obj, + sel, ); } - late final _sinhPtr = - _lookup>('sinh'); - late final _sinh = _sinhPtr.asFunction(); + 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)>(); - double tanhf( - double arg0, + late final _sel_storagePolicy1 = _registerName1("storagePolicy"); + int _objc_msgSend_319( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _tanhf( - arg0, + return __objc_msgSend_319( + obj, + sel, ); } - late final _tanhfPtr = - _lookup>('tanhf'); - late final _tanhf = _tanhfPtr.asFunction(); + late final __objc_msgSend_319Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_319 = __objc_msgSend_319Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - double tanh( - double arg0, + late final _class_NSURLCache1 = _getClass1("NSURLCache"); + late final _sel_sharedURLCache1 = _registerName1("sharedURLCache"); + ffi.Pointer _objc_msgSend_320( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _tanh( - arg0, + return __objc_msgSend_320( + obj, + sel, ); } - late final _tanhPtr = - _lookup>('tanh'); - late final _tanh = _tanhPtr.asFunction(); + late final __objc_msgSend_320Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_320 = __objc_msgSend_320Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - double expf( - double arg0, + late final _sel_setSharedURLCache_1 = _registerName1("setSharedURLCache:"); + void _objc_msgSend_321( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, ) { - return _expf( - arg0, + return __objc_msgSend_321( + obj, + sel, + value, ); } - 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)>>('objc_msgSend'); + late final __objc_msgSend_321 = __objc_msgSend_321Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - double exp( - double arg0, + 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 _exp( - arg0, + return __objc_msgSend_322( + obj, + sel, + memoryCapacity, + diskCapacity, + path, ); } - late final _expPtr = - _lookup>('exp'); - late final _exp = _expPtr.asFunction(); + late final __objc_msgSend_322Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + NSUInteger, + NSUInteger, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_322 = __objc_msgSend_322Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, int, + int, ffi.Pointer)>(); - double exp2f( - double arg0, + late final _sel_initWithMemoryCapacity_diskCapacity_directoryURL_1 = + _registerName1("initWithMemoryCapacity:diskCapacity:directoryURL:"); + instancetype _objc_msgSend_323( + ffi.Pointer obj, + ffi.Pointer sel, + int memoryCapacity, + int diskCapacity, + ffi.Pointer directoryURL, ) { - return _exp2f( - arg0, + return __objc_msgSend_323( + obj, + sel, + memoryCapacity, + diskCapacity, + directoryURL, ); } - late final _exp2fPtr = - _lookup>('exp2f'); - late final _exp2f = _exp2fPtr.asFunction(); + late final __objc_msgSend_323Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + NSUInteger, + NSUInteger, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_323 = __objc_msgSend_323Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, int, + int, ffi.Pointer)>(); - double exp2( - double arg0, + 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, + ffi.Pointer URL, + int cachePolicy, + double timeoutInterval, ) { - return _exp2( - arg0, + return __objc_msgSend_324( + obj, + sel, + URL, + cachePolicy, + timeoutInterval, ); } - late final _exp2Ptr = - _lookup>('exp2'); - late final _exp2 = _exp2Ptr.asFunction(); + late final __objc_msgSend_324Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + NSTimeInterval)>>('objc_msgSend'); + late final __objc_msgSend_324 = __objc_msgSend_324Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, double)>(); - double expm1f( - double arg0, + 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, ) { - return _expm1f( - arg0, + return __objc_msgSend_325( + obj, + sel, ); } - late final _expm1fPtr = - _lookup>('expm1f'); - late final _expm1f = _expm1fPtr.asFunction(); + late final __objc_msgSend_325Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_325 = __objc_msgSend_325Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - double expm1( - double arg0, + 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, ) { - return _expm1( - arg0, + return __objc_msgSend_326( + obj, + sel, ); } - late final _expm1Ptr = - _lookup>('expm1'); - late final _expm1 = _expm1Ptr.asFunction(); + late final __objc_msgSend_326Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_326 = __objc_msgSend_326Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - double logf( - 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_327( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _logf( - arg0, + return __objc_msgSend_327( + obj, + sel, ); } - late final _logfPtr = - _lookup>('logf'); - late final _logf = _logfPtr.asFunction(); + late final __objc_msgSend_327Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_327 = __objc_msgSend_327Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - double log( - 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 _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 value, ) { - return _log( - arg0, + return __objc_msgSend_328( + obj, + sel, + value, ); } - 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)>>('objc_msgSend'); + late final __objc_msgSend_328 = __objc_msgSend_328Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - double log10f( - double arg0, + 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 _log10f( - arg0, + return __objc_msgSend_329( + obj, + sel, + aRunLoop, + mode, ); } - late final _log10fPtr = - _lookup>('log10f'); - late final _log10f = _log10fPtr.asFunction(); + late final __objc_msgSend_329Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSRunLoopMode)>>('objc_msgSend'); + late final __objc_msgSend_329 = __objc_msgSend_329Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSRunLoopMode)>(); - double log10( - double arg0, + 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, ) { - return _log10( - arg0, + return __objc_msgSend_330( + obj, + sel, ); } - late final _log10Ptr = - _lookup>('log10'); - late final _log10 = _log10Ptr.asFunction(); + late final __objc_msgSend_330Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_330 = __objc_msgSend_330Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - double log2f( - double arg0, + late final _sel_streamError1 = _registerName1("streamError"); + ffi.Pointer _objc_msgSend_331( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _log2f( - arg0, + return __objc_msgSend_331( + obj, + sel, ); } - late final _log2fPtr = - _lookup>('log2f'); - late final _log2f = _log2fPtr.asFunction(); + late final __objc_msgSend_331Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_331 = __objc_msgSend_331Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - double log2( - double arg0, + 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, + ffi.Pointer buffer, + int len, ) { - return _log2( - arg0, + return __objc_msgSend_332( + obj, + sel, + buffer, + len, ); } - late final _log2Ptr = - _lookup>('log2'); - late final _log2 = _log2Ptr.asFunction(); + late final __objc_msgSend_332Ptr = _lookup< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_332 = __objc_msgSend_332Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); - double log1pf( - double arg0, + 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 _log1pf( - arg0, + return __objc_msgSend_333( + obj, + sel, + buffer, + capacity, ); } - late final _log1pfPtr = - _lookup>('log1pf'); - late final _log1pf = _log1pfPtr.asFunction(); - - double log1p( - double arg0, + late final __objc_msgSend_333Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_333 = __objc_msgSend_333Ptr.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_334( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer hostname, + int port, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream, ) { - return _log1p( - arg0, + return __objc_msgSend_334( + obj, + sel, + hostname, + port, + inputStream, + outputStream, ); } - 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, + NSInteger, + ffi.Pointer>, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_334 = __objc_msgSend_334Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>, + ffi.Pointer>)>(); - double logbf( - double arg0, + 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 host, + int port, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream, ) { - return _logbf( - arg0, + return __objc_msgSend_335( + obj, + sel, + host, + port, + inputStream, + outputStream, ); } - 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, + NSInteger, + ffi.Pointer>, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_335 = __objc_msgSend_335Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>, + ffi.Pointer>)>(); - double logb( - double arg0, + late final _sel_getBoundStreamsWithBufferSize_inputStream_outputStream_1 = + _registerName1("getBoundStreamsWithBufferSize:inputStream:outputStream:"); + void _objc_msgSend_336( + ffi.Pointer obj, + ffi.Pointer sel, + int bufferSize, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream, ) { - return _logb( - arg0, + return __objc_msgSend_336( + obj, + sel, + bufferSize, + inputStream, + outputStream, ); } - 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, + NSUInteger, + ffi.Pointer>, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_336 = __objc_msgSend_336Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>, + ffi.Pointer>)>(); - double modff( - double arg0, - ffi.Pointer arg1, + 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> buffer, + ffi.Pointer len, ) { - return _modff( - arg0, - arg1, + return __objc_msgSend_337( + obj, + sel, + buffer, + len, ); } - 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)>(); - - double modf( - double arg0, - ffi.Pointer arg1, + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_337 = __objc_msgSend_337Ptr.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_338( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _modf( - arg0, - arg1, + return __objc_msgSend_338( + obj, + sel, ); } - 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.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_338 = __objc_msgSend_338Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - double ldexpf( - double arg0, - int arg1, + 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 _ldexpf( - arg0, - arg1, + return __objc_msgSend_339( + obj, + sel, + request, ); } - late final _ldexpfPtr = - _lookup>( - 'ldexpf'); - late final _ldexpf = _ldexpfPtr.asFunction(); + late final __objc_msgSend_339Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_339 = __objc_msgSend_339Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - double ldexp( - double arg0, - int arg1, + late final _sel_storeCachedResponse_forRequest_1 = + _registerName1("storeCachedResponse:forRequest:"); + void _objc_msgSend_340( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer cachedResponse, + ffi.Pointer request, ) { - return _ldexp( - arg0, - arg1, + return __objc_msgSend_340( + obj, + sel, + cachedResponse, + request, ); } - 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.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_340 = __objc_msgSend_340Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - double frexpf( - double arg0, - ffi.Pointer arg1, + late final _sel_removeCachedResponseForRequest_1 = + _registerName1("removeCachedResponseForRequest:"); + void _objc_msgSend_341( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer request, ) { - return _frexpf( - arg0, - arg1, + return __objc_msgSend_341( + obj, + sel, + request, ); } - 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.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_341 = __objc_msgSend_341Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - double frexp( - double arg0, - ffi.Pointer arg1, + 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 _frexp( - arg0, - arg1, + return __objc_msgSend_342( + obj, + sel, + ti, ); } - 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)>(); + instancetype Function(ffi.Pointer, ffi.Pointer, + NSTimeInterval)>>('objc_msgSend'); + late final __objc_msgSend_342 = __objc_msgSend_342Ptr.asFunction< + instancetype Function( + ffi.Pointer, ffi.Pointer, double)>(); - int ilogbf( - double arg0, + late final _sel_timeIntervalSinceDate_1 = + _registerName1("timeIntervalSinceDate:"); + double _objc_msgSend_343( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer anotherDate, ) { - return _ilogbf( - arg0, + return __objc_msgSend_343( + obj, + sel, + anotherDate, ); } - late final _ilogbfPtr = - _lookup>('ilogbf'); - late final _ilogbf = _ilogbfPtr.asFunction(); + late final __objc_msgSend_343Ptr = _lookup< + ffi.NativeFunction< + NSTimeInterval Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_343 = __objc_msgSend_343Ptr.asFunction< + double Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - int ilogb( - double arg0, + 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 anotherDate, ) { - return _ilogb( - arg0, + return __objc_msgSend_344( + obj, + sel, + anotherDate, ); } - late final _ilogbPtr = - _lookup>('ilogb'); - late final _ilogb = _ilogbPtr.asFunction(); + late final __objc_msgSend_344Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_344 = __objc_msgSend_344Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - double scalbnf( - double arg0, - int arg1, + late final _sel_laterDate_1 = _registerName1("laterDate:"); + int _objc_msgSend_345( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer other, ) { - return _scalbnf( - arg0, - arg1, + return __objc_msgSend_345( + obj, + sel, + other, ); } - late final _scalbnfPtr = - _lookup>( - 'scalbnf'); - late final _scalbnf = _scalbnfPtr.asFunction(); + late final __objc_msgSend_345Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_345 = __objc_msgSend_345Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - double scalbn( - double arg0, - int arg1, + late final _sel_isEqualToDate_1 = _registerName1("isEqualToDate:"); + bool _objc_msgSend_346( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer otherDate, ) { - return _scalbn( - arg0, - arg1, + return __objc_msgSend_346( + obj, + sel, + otherDate, ); } - late final _scalbnPtr = - _lookup>( - 'scalbn'); - late final _scalbn = _scalbnPtr.asFunction(); + late final __objc_msgSend_346Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_346 = __objc_msgSend_346Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - double scalblnf( - double arg0, - int arg1, + 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 _scalblnf( - arg0, - arg1, + return __objc_msgSend_347( + obj, + sel, + secsToBeAdded, + date, ); } - late final _scalblnfPtr = - _lookup>( - 'scalblnf'); - late final _scalblnf = - _scalblnfPtr.asFunction(); + late final __objc_msgSend_347Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + NSTimeInterval, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_347 = __objc_msgSend_347Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + double, ffi.Pointer)>(); - double scalbln( - double arg0, - int arg1, + late final _sel_distantFuture1 = _registerName1("distantFuture"); + ffi.Pointer _objc_msgSend_348( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _scalbln( - arg0, - arg1, + return __objc_msgSend_348( + obj, + sel, ); } - late final _scalblnPtr = - _lookup>( - 'scalbln'); - late final _scalbln = _scalblnPtr.asFunction(); + 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)>(); - double fabsf( - double arg0, - ) { - return _fabsf( - 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 _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 _fabsfPtr = - _lookup>('fabsf'); - late final _fabsf = _fabsfPtr.asFunction(); + late final __objc_msgSend_349Ptr = _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)>(); - double fabs( - double arg0, + 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, ) { - return _fabs( - arg0, + return __objc_msgSend_350( + obj, + sel, ); } - 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)>>('objc_msgSend'); + late final __objc_msgSend_350 = __objc_msgSend_350Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - double cbrtf( - double arg0, + 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, ) { - return _cbrtf( - arg0, + return __objc_msgSend_351( + obj, + sel, ); } - late final _cbrtfPtr = - _lookup>('cbrtf'); - late final _cbrtf = _cbrtfPtr.asFunction(); + late final __objc_msgSend_351Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_351 = __objc_msgSend_351Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - double cbrt( - double arg0, + late final _sel_progressWithTotalUnitCount_1 = + _registerName1("progressWithTotalUnitCount:"); + ffi.Pointer _objc_msgSend_352( + ffi.Pointer obj, + ffi.Pointer sel, + int unitCount, ) { - return _cbrt( - arg0, + return __objc_msgSend_352( + obj, + sel, + unitCount, ); } - late final _cbrtPtr = - _lookup>('cbrt'); - late final _cbrt = _cbrtPtr.asFunction(); + late final __objc_msgSend_352Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int64)>>('objc_msgSend'); + late final __objc_msgSend_352 = __objc_msgSend_352Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - double hypotf( - double arg0, - double arg1, + 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, + int unitCount, + ffi.Pointer parent, + int portionOfParentTotalUnitCount, ) { - return _hypotf( - arg0, - arg1, + return __objc_msgSend_353( + obj, + sel, + unitCount, + parent, + portionOfParentTotalUnitCount, ); } - late final _hypotfPtr = - _lookup>( - 'hypotf'); - late final _hypotf = _hypotfPtr.asFunction(); + late final __objc_msgSend_353Ptr = _lookup< + ffi.NativeFunction< + 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, int, ffi.Pointer, int)>(); - double hypot( - double arg0, - double arg1, + late final _sel_initWithParent_userInfo_1 = + _registerName1("initWithParent:userInfo:"); + instancetype _objc_msgSend_354( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer parentProgressOrNil, + ffi.Pointer userInfoOrNil, ) { - return _hypot( - arg0, - arg1, + return __objc_msgSend_354( + obj, + sel, + parentProgressOrNil, + userInfoOrNil, ); } - late final _hypotPtr = - _lookup>( - 'hypot'); - late final _hypot = _hypotPtr.asFunction(); + late final __objc_msgSend_354Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_354 = __objc_msgSend_354Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - double powf( - double arg0, - double arg1, + late final _sel_becomeCurrentWithPendingUnitCount_1 = + _registerName1("becomeCurrentWithPendingUnitCount:"); + void _objc_msgSend_355( + ffi.Pointer obj, + ffi.Pointer sel, + int unitCount, ) { - return _powf( - arg0, - arg1, + return __objc_msgSend_355( + obj, + sel, + unitCount, ); } - late final _powfPtr = - _lookup>( - 'powf'); - late final _powf = _powfPtr.asFunction(); + late final __objc_msgSend_355Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int64)>>('objc_msgSend'); + late final __objc_msgSend_355 = __objc_msgSend_355Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - double pow( - double arg0, - double arg1, + late final _sel_performAsCurrentWithPendingUnitCount_usingBlock_1 = + _registerName1("performAsCurrentWithPendingUnitCount:usingBlock:"); + void _objc_msgSend_356( + ffi.Pointer obj, + ffi.Pointer sel, + int unitCount, + ffi.Pointer<_ObjCBlock> work, ) { - return _pow( - arg0, - arg1, + return __objc_msgSend_356( + obj, + sel, + unitCount, + work, ); } - late final _powPtr = - _lookup>( - 'pow'); - late final _pow = _powPtr.asFunction(); + late final __objc_msgSend_356Ptr = _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< + void Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer<_ObjCBlock>)>(); - double sqrtf( - double arg0, + 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 _sqrtf( - arg0, + return __objc_msgSend_357( + obj, + sel, + child, + inUnitCount, ); } - late final _sqrtfPtr = - _lookup>('sqrtf'); - late final _sqrtf = _sqrtfPtr.asFunction(); + late final __objc_msgSend_357Ptr = _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< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); - double sqrt( - double arg0, + late final _sel_totalUnitCount1 = _registerName1("totalUnitCount"); + int _objc_msgSend_358( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _sqrt( - arg0, + return __objc_msgSend_358( + obj, + sel, ); } - late final _sqrtPtr = - _lookup>('sqrt'); - late final _sqrt = _sqrtPtr.asFunction(); + late final __objc_msgSend_358Ptr = _lookup< + ffi.NativeFunction< + ffi.Int64 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_358 = __objc_msgSend_358Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - double erff( - double arg0, + late final _sel_setTotalUnitCount_1 = _registerName1("setTotalUnitCount:"); + void _objc_msgSend_359( + ffi.Pointer obj, + ffi.Pointer sel, + int value, ) { - return _erff( - arg0, + return __objc_msgSend_359( + obj, + sel, + value, ); } - late final _erffPtr = - _lookup>('erff'); - late final _erff = _erffPtr.asFunction(); + late final __objc_msgSend_359Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int64)>>('objc_msgSend'); + late final __objc_msgSend_359 = __objc_msgSend_359Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - double erf( - 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_360( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, ) { - return _erf( - arg0, + return __objc_msgSend_360( + obj, + sel, + value, ); } - late final _erfPtr = - _lookup>('erf'); - late final _erf = _erfPtr.asFunction(); + 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)>(); - double erfcf( - 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_361( + ffi.Pointer obj, + ffi.Pointer sel, + bool value, ) { - return _erfcf( - arg0, + return __objc_msgSend_361( + obj, + sel, + value, ); } - late final _erfcfPtr = - _lookup>('erfcf'); - late final _erfcf = _erfcfPtr.asFunction(); + late final __objc_msgSend_361Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_361 = __objc_msgSend_361Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, bool)>(); - double erfc( - 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_362( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _erfc( - arg0, + return __objc_msgSend_362( + obj, + sel, ); } - late final _erfcPtr = - _lookup>('erfc'); - late final _erfc = _erfcPtr.asFunction(); + late final __objc_msgSend_362Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer<_ObjCBlock> Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_362 = __objc_msgSend_362Ptr.asFunction< + ffi.Pointer<_ObjCBlock> Function( + ffi.Pointer, ffi.Pointer)>(); - double lgammaf( - double arg0, + late final _sel_setCancellationHandler_1 = + _registerName1("setCancellationHandler:"); + void _objc_msgSend_363( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> value, ) { - return _lgammaf( - arg0, + return __objc_msgSend_363( + obj, + sel, + value, ); } - late final _lgammafPtr = - _lookup>('lgammaf'); - late final _lgammaf = _lgammafPtr.asFunction(); + late final __objc_msgSend_363Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_363 = __objc_msgSend_363Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - double lgamma( - 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_364( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, ) { - return _lgamma( - arg0, + return __objc_msgSend_364( + obj, + sel, + value, ); } - late final _lgammaPtr = - _lookup>('lgamma'); - late final _lgamma = _lgammaPtr.asFunction(); + late final __objc_msgSend_364Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(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)>(); - double tgammaf( - 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_365( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, ) { - return _tgammaf( - arg0, + return __objc_msgSend_365( + obj, + sel, + value, ); } - late final _tgammafPtr = - _lookup>('tgammaf'); - late final _tgammaf = _tgammafPtr.asFunction(); + late final __objc_msgSend_365Ptr = _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)>(); - double tgamma( - double arg0, + 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 url, + NSProgressPublishingHandler publishingHandler, ) { - return _tgamma( - arg0, + return __objc_msgSend_366( + obj, + sel, + url, + publishingHandler, ); } - late final _tgammaPtr = - _lookup>('tgamma'); - late final _tgamma = _tgammaPtr.asFunction(); + late final __objc_msgSend_366Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSProgressPublishingHandler)>>('objc_msgSend'); + late final __objc_msgSend_366 = __objc_msgSend_366Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSProgressPublishingHandler)>(); - double ceilf( - double arg0, + 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 value, ) { - return _ceilf( - arg0, + return __objc_msgSend_367( + obj, + sel, + value, ); } - 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(); + 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)>(); - double floorf( - 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_368( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _floorf( - arg0, + return __objc_msgSend_368( + obj, + sel, ); } - late final _floorfPtr = - _lookup>('floorf'); - late final _floorf = _floorfPtr.asFunction(); + late final __objc_msgSend_368Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_368 = __objc_msgSend_368Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - double floor( - double arg0, + 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, + double value, ) { - return _floor( - arg0, + return __objc_msgSend_369( + obj, + sel, + value, ); } - late final _floorPtr = - _lookup>('floor'); - late final _floor = _floorPtr.asFunction(); + late final __objc_msgSend_369Ptr = _lookup< + ffi.NativeFunction< + 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, double)>(); - double nearbyintf( - double arg0, + 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, + ffi.Pointer cachedResponse, + ffi.Pointer dataTask, ) { - return _nearbyintf( - arg0, + return __objc_msgSend_370( + obj, + sel, + cachedResponse, + dataTask, ); } - late final _nearbyintfPtr = - _lookup>('nearbyintf'); - late final _nearbyintf = _nearbyintfPtr.asFunction(); + late final __objc_msgSend_370Ptr = _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< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - double nearbyint( - double arg0, + late final _sel_getCachedResponseForDataTask_completionHandler_1 = + _registerName1("getCachedResponseForDataTask:completionHandler:"); + void _objc_msgSend_371( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer dataTask, + ffi.Pointer<_ObjCBlock> completionHandler, ) { - return _nearbyint( - arg0, + return __objc_msgSend_371( + obj, + sel, + dataTask, + completionHandler, ); } - late final _nearbyintPtr = - _lookup>('nearbyint'); - late final _nearbyint = _nearbyintPtr.asFunction(); + late final __objc_msgSend_371Ptr = _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< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); - double rintf( - double arg0, + late final _sel_removeCachedResponseForDataTask_1 = + _registerName1("removeCachedResponseForDataTask:"); + void _objc_msgSend_372( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer dataTask, ) { - return _rintf( - arg0, + return __objc_msgSend_372( + obj, + sel, + dataTask, ); } - late final _rintfPtr = - _lookup>('rintf'); - late final _rintf = _rintfPtr.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)>(); - double rint( - 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_373( + ffi.Pointer obj, + ffi.Pointer sel, + NSNotificationName name, + ffi.Pointer object, + ffi.Pointer userInfo, ) { - return _rint( - arg0, + return __objc_msgSend_373( + obj, + sel, + name, + object, + userInfo, ); } - late final _rintPtr = - _lookup>('rint'); - late final _rint = _rintPtr.asFunction(); + late final __objc_msgSend_373Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + NSNotificationName, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_373 = __objc_msgSend_373Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + NSNotificationName, + ffi.Pointer, + ffi.Pointer)>(); - int lrintf( - 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_374( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _lrintf( - arg0, + return __objc_msgSend_374( + obj, + sel, ); } - late final _lrintfPtr = - _lookup>('lrintf'); - late final _lrintf = _lrintfPtr.asFunction(); + 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)>(); - int lrint( - double arg0, + late final _sel_addObserver_selector_name_object_1 = + _registerName1("addObserver:selector:name:object:"); + void _objc_msgSend_375( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer observer, + ffi.Pointer aSelector, + NSNotificationName aName, + ffi.Pointer anObject, ) { - return _lrint( - arg0, + return __objc_msgSend_375( + obj, + sel, + observer, + aSelector, + aName, + anObject, ); } - late final _lrintPtr = - _lookup>('lrint'); - late final _lrint = _lrintPtr.asFunction(); + late final __objc_msgSend_375Ptr = _lookup< + ffi.NativeFunction< + 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, + ffi.Pointer, + ffi.Pointer, + NSNotificationName, + ffi.Pointer)>(); - double roundf( - double arg0, + late final _sel_postNotification_1 = _registerName1("postNotification:"); + void _objc_msgSend_376( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer notification, ) { - return _roundf( - arg0, + return __objc_msgSend_376( + obj, + sel, + notification, ); } - late final _roundfPtr = - _lookup>('roundf'); - late final _roundf = _roundfPtr.asFunction(); + late final __objc_msgSend_376Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_376 = __objc_msgSend_376Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - double round( - double arg0, + late final _sel_postNotificationName_object_1 = + _registerName1("postNotificationName:object:"); + void _objc_msgSend_377( + ffi.Pointer obj, + ffi.Pointer sel, + NSNotificationName aName, + ffi.Pointer anObject, ) { - return _round( - arg0, + return __objc_msgSend_377( + obj, + sel, + aName, + anObject, ); } - late final _roundPtr = - _lookup>('round'); - late final _round = _roundPtr.asFunction(); + late final __objc_msgSend_377Ptr = _lookup< + ffi.NativeFunction< + 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, + NSNotificationName, ffi.Pointer)>(); - int lroundf( - double arg0, + late final _sel_postNotificationName_object_userInfo_1 = + _registerName1("postNotificationName:object:userInfo:"); + void _objc_msgSend_378( + ffi.Pointer obj, + ffi.Pointer sel, + NSNotificationName aName, + ffi.Pointer anObject, + ffi.Pointer aUserInfo, ) { - return _lroundf( - arg0, + return __objc_msgSend_378( + obj, + sel, + aName, + anObject, + aUserInfo, ); } - late final _lroundfPtr = - _lookup>('lroundf'); - late final _lroundf = _lroundfPtr.asFunction(); + late final __objc_msgSend_378Ptr = _lookup< + ffi.NativeFunction< + 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, + NSNotificationName, + ffi.Pointer, + ffi.Pointer)>(); - int lround( - double arg0, + 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 observer, + NSNotificationName aName, + ffi.Pointer anObject, ) { - return _lround( - arg0, + return __objc_msgSend_379( + obj, + sel, + observer, + aName, + anObject, ); } - late final _lroundPtr = - _lookup>('lround'); - late final _lround = _lroundPtr.asFunction(); + late final __objc_msgSend_379Ptr = _lookup< + ffi.NativeFunction< + 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, + ffi.Pointer, + NSNotificationName, + ffi.Pointer)>(); - int llrintf( - double arg0, + 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 _llrintf( - arg0, + return __objc_msgSend_380( + obj, + sel, + op, ); } - late final _llrintfPtr = - _lookup>('llrintf'); - late final _llrintf = _llrintfPtr.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 llrint( - double arg0, + 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, ) { - return _llrint( - arg0, + return __objc_msgSend_381( + obj, + sel, ); } - late final _llrintPtr = - _lookup>('llrint'); - late final _llrint = _llrintPtr.asFunction(); + late final __objc_msgSend_381Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_381 = __objc_msgSend_381Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - int llroundf( - double arg0, + late final _sel_setQueuePriority_1 = _registerName1("setQueuePriority:"); + void _objc_msgSend_382( + ffi.Pointer obj, + ffi.Pointer sel, + int value, ) { - return _llroundf( - arg0, + return __objc_msgSend_382( + obj, + sel, + value, ); } - late final _llroundfPtr = - _lookup>('llroundf'); - late final _llroundf = _llroundfPtr.asFunction(); + late final __objc_msgSend_382Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_382 = __objc_msgSend_382Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - int llround( - double arg0, + 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, + double value, ) { - return _llround( - arg0, + return __objc_msgSend_383( + obj, + sel, + value, ); } - late final _llroundPtr = - _lookup>('llround'); - late final _llround = _llroundPtr.asFunction(); + late final __objc_msgSend_383Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Double)>>('objc_msgSend'); + late final __objc_msgSend_383 = __objc_msgSend_383Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, double)>(); - double truncf( - double arg0, + late final _sel_qualityOfService1 = _registerName1("qualityOfService"); + int _objc_msgSend_384( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _truncf( - arg0, + return __objc_msgSend_384( + obj, + sel, ); } - late final _truncfPtr = - _lookup>('truncf'); - late final _truncf = _truncfPtr.asFunction(); + late final __objc_msgSend_384Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_384 = __objc_msgSend_384Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - double trunc( - double arg0, + late final _sel_setQualityOfService_1 = + _registerName1("setQualityOfService:"); + void _objc_msgSend_385( + ffi.Pointer obj, + ffi.Pointer sel, + int value, ) { - return _trunc( - arg0, + return __objc_msgSend_385( + obj, + sel, + value, ); } - late final _truncPtr = - _lookup>('trunc'); - late final _trunc = _truncPtr.asFunction(); + late final __objc_msgSend_385Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_385 = __objc_msgSend_385Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - double fmodf( - double arg0, - double arg1, - ) { - return _fmodf( - arg0, - arg1, + 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, + ffi.Pointer ops, + bool wait, + ) { + return __objc_msgSend_386( + obj, + sel, + ops, + wait, ); } - late final _fmodfPtr = - _lookup>( - 'fmodf'); - late final _fmodf = _fmodfPtr.asFunction(); + late final __objc_msgSend_386Ptr = _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< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, bool)>(); - double fmod( - double arg0, - double arg1, + late final _sel_addOperationWithBlock_1 = + _registerName1("addOperationWithBlock:"); + void _objc_msgSend_387( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> block, ) { - return _fmod( - arg0, - arg1, + return __objc_msgSend_387( + obj, + sel, + block, ); } - late final _fmodPtr = - _lookup>( - 'fmod'); - late final _fmod = _fmodPtr.asFunction(); + late final __objc_msgSend_387Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_387 = __objc_msgSend_387Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - double remainderf( - double arg0, - double arg1, + 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, + int value, ) { - return _remainderf( - arg0, - arg1, + return __objc_msgSend_388( + obj, + sel, + value, ); } - late final _remainderfPtr = - _lookup>( - 'remainderf'); - late final _remainderf = - _remainderfPtr.asFunction(); + late final __objc_msgSend_388Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSInteger)>>('objc_msgSend'); + late final __objc_msgSend_388 = __objc_msgSend_388Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - double remainder( - double arg0, - double 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_389( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _remainder( - arg0, - arg1, + return __objc_msgSend_389( + obj, + sel, ); } - late final _remainderPtr = - _lookup>( - 'remainder'); - late final _remainder = - _remainderPtr.asFunction(); + late final __objc_msgSend_389Ptr = _lookup< + ffi.NativeFunction< + dispatch_queue_t Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_389 = __objc_msgSend_389Ptr.asFunction< + dispatch_queue_t Function( + ffi.Pointer, ffi.Pointer)>(); - double remquof( - double arg0, - double arg1, - ffi.Pointer arg2, + late final _sel_setUnderlyingQueue_1 = _registerName1("setUnderlyingQueue:"); + void _objc_msgSend_390( + ffi.Pointer obj, + ffi.Pointer sel, + dispatch_queue_t value, ) { - return _remquof( - arg0, - arg1, - arg2, + return __objc_msgSend_390( + obj, + sel, + value, ); } - late final _remquofPtr = _lookup< + late final __objc_msgSend_390Ptr = _lookup< ffi.NativeFunction< - ffi.Float Function( - ffi.Float, ffi.Float, ffi.Pointer)>>('remquof'); - late final _remquof = _remquofPtr - .asFunction)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + dispatch_queue_t)>>('objc_msgSend'); + late final __objc_msgSend_390 = __objc_msgSend_390Ptr.asFunction< + void Function( + ffi.Pointer, ffi.Pointer, dispatch_queue_t)>(); - double remquo( - double arg0, - double arg1, - ffi.Pointer arg2, + 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, ) { - return _remquo( - arg0, - arg1, - arg2, + return __objc_msgSend_391( + obj, + sel, ); } - late final _remquoPtr = _lookup< + late final __objc_msgSend_391Ptr = _lookup< ffi.NativeFunction< - ffi.Double Function( - ffi.Double, ffi.Double, ffi.Pointer)>>('remquo'); - late final _remquo = _remquoPtr - .asFunction)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_391 = __objc_msgSend_391Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - double copysignf( - double arg0, - double arg1, + 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, + NSNotificationName name, + ffi.Pointer obj1, + ffi.Pointer queue, + ffi.Pointer<_ObjCBlock> block, ) { - return _copysignf( - arg0, - arg1, + return __objc_msgSend_392( + obj, + sel, + name, + obj1, + queue, + block, ); } - late final _copysignfPtr = - _lookup>( - 'copysignf'); - late final _copysignf = - _copysignfPtr.asFunction(); + late final __objc_msgSend_392Ptr = _lookup< + ffi.NativeFunction< + 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< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + NSNotificationName, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - double copysign( - double arg0, - double arg1, - ) { - return _copysign( - arg0, - arg1, - ); - } + late final ffi.Pointer + _NSSystemClockDidChangeNotification = + _lookup('NSSystemClockDidChangeNotification'); - late final _copysignPtr = - _lookup>( - 'copysign'); - late final _copysign = - _copysignPtr.asFunction(); + NSNotificationName get NSSystemClockDidChangeNotification => + _NSSystemClockDidChangeNotification.value; - double nanf( - ffi.Pointer arg0, + 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, + int value, ) { - return _nanf( - arg0, + return __objc_msgSend_393( + obj, + sel, + value, ); } - late final _nanfPtr = - _lookup)>>( - 'nanf'); - late final _nanf = - _nanfPtr.asFunction)>(); + 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)>(); - double nan( - ffi.Pointer 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_394( + ffi.Pointer obj, + ffi.Pointer sel, + int value, ) { - return _nan( - arg0, + return __objc_msgSend_394( + obj, + sel, + value, ); } - late final _nanPtr = - _lookup)>>( - 'nan'); - late final _nan = - _nanPtr.asFunction)>(); + 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)>(); - double nextafterf( - double arg0, - double arg1, + 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 _nextafterf( - arg0, - arg1, + return __objc_msgSend_395( + obj, + sel, + value, ); } - late final _nextafterfPtr = - _lookup>( - 'nextafterf'); - late final _nextafterf = - _nextafterfPtr.asFunction(); + 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)>(); - double nextafter( - double arg0, - double arg1, + 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 _nextafter( - arg0, - arg1, + return __objc_msgSend_396( + obj, + sel, + value, ); } - late final _nextafterPtr = - _lookup>( - 'nextafter'); - late final _nextafter = - _nextafterPtr.asFunction(); + 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)>(); - double fdimf( - double arg0, - double arg1, + 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 _fdimf( - arg0, - arg1, + return __objc_msgSend_397( + obj, + sel, + value, + field, ); } - late final _fdimfPtr = - _lookup>( - 'fdimf'); - late final _fdimf = _fdimfPtr.asFunction(); + 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)>(); - double fdim( - double arg0, - double arg1, + 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 _fdim( - arg0, - arg1, + return __objc_msgSend_398( + obj, + sel, + value, ); } - late final _fdimPtr = - _lookup>( - 'fdim'); - late final _fdim = _fdimPtr.asFunction(); + 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)>(); - double fmaxf( - double arg0, - double arg1, + late final _sel_setHTTPBodyStream_1 = _registerName1("setHTTPBodyStream:"); + void _objc_msgSend_399( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, ) { - return _fmaxf( - arg0, - arg1, + return __objc_msgSend_399( + obj, + sel, + value, ); } - late final _fmaxfPtr = - _lookup>( - 'fmaxf'); - late final _fmaxf = _fmaxfPtr.asFunction(); + 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)>(); - double fmax( - double arg0, - double arg1, + 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 _fmax( - arg0, - arg1, + return __objc_msgSend_400( + obj, + sel, ); } - late final _fmaxPtr = - _lookup>( - 'fmax'); - late final _fmax = _fmaxPtr.asFunction(); + 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)>(); - double fminf( - double arg0, - double arg1, + late final _sel_sharedCookieStorageForGroupContainerIdentifier_1 = + _registerName1("sharedCookieStorageForGroupContainerIdentifier:"); + ffi.Pointer _objc_msgSend_401( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer identifier, ) { - return _fminf( - arg0, - arg1, + return __objc_msgSend_401( + obj, + sel, + identifier, ); } - late final _fminfPtr = - _lookup>( - 'fminf'); - late final _fminf = _fminfPtr.asFunction(); + 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)>(); - double fmin( - double arg0, - double arg1, + 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 _fmin( - arg0, - arg1, + return __objc_msgSend_402( + obj, + sel, + cookie, ); } - late final _fminPtr = - _lookup>( - 'fmin'); - late final _fmin = _fminPtr.asFunction(); - - double fmaf( - double arg0, - double arg1, - double arg2, + 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 _fmaf( - arg0, - arg1, - arg2, + return __objc_msgSend_403( + obj, + sel, + cookies, + URL, + mainDocumentURL, ); } - late final _fmafPtr = _lookup< + late final __objc_msgSend_403Ptr = _lookup< ffi.NativeFunction< - ffi.Float Function(ffi.Float, ffi.Float, ffi.Float)>>('fmaf'); - late final _fmaf = - _fmafPtr.asFunction(); + 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)>(); - double fma( - double arg0, - double arg1, - double arg2, + late final _sel_cookieAcceptPolicy1 = _registerName1("cookieAcceptPolicy"); + int _objc_msgSend_404( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _fma( - arg0, - arg1, - arg2, + return __objc_msgSend_404( + obj, + sel, ); } - late final _fmaPtr = _lookup< + late final __objc_msgSend_404Ptr = _lookup< ffi.NativeFunction< - ffi.Double Function(ffi.Double, ffi.Double, ffi.Double)>>('fma'); - late final _fma = - _fmaPtr.asFunction(); + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_404 = __objc_msgSend_404Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - double __exp10f( - double arg0, + late final _sel_setCookieAcceptPolicy_1 = + _registerName1("setCookieAcceptPolicy:"); + void _objc_msgSend_405( + ffi.Pointer obj, + ffi.Pointer sel, + int value, ) { - return ___exp10f( - arg0, + return __objc_msgSend_405( + obj, + sel, + value, ); } - late final ___exp10fPtr = - _lookup>('__exp10f'); - late final ___exp10f = ___exp10fPtr.asFunction(); + 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)>(); - double __exp10( - double arg0, + 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 ___exp10( - arg0, + return __objc_msgSend_406( + obj, + sel, + cookies, + task, ); } - late final ___exp10Ptr = - _lookup>('__exp10'); - late final ___exp10 = ___exp10Ptr.asFunction(); + 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)>(); - double __cospif( - double arg0, + 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 ___cospif( - arg0, + return __objc_msgSend_407( + obj, + sel, + task, + completionHandler, ); } - late final ___cospifPtr = - _lookup>('__cospif'); - late final ___cospif = ___cospifPtr.asFunction(); + 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>)>(); - double __cospi( - double arg0, - ) { - return ___cospi( - arg0, - ); - } + late final ffi.Pointer + _NSHTTPCookieManagerAcceptPolicyChangedNotification = + _lookup( + 'NSHTTPCookieManagerAcceptPolicyChangedNotification'); - late final ___cospiPtr = - _lookup>('__cospi'); - late final ___cospi = ___cospiPtr.asFunction(); + NSNotificationName get NSHTTPCookieManagerAcceptPolicyChangedNotification => + _NSHTTPCookieManagerAcceptPolicyChangedNotification.value; - double __sinpif( - double arg0, - ) { - return ___sinpif( - arg0, - ); - } + set NSHTTPCookieManagerAcceptPolicyChangedNotification( + NSNotificationName value) => + _NSHTTPCookieManagerAcceptPolicyChangedNotification.value = value; - late final ___sinpifPtr = - _lookup>('__sinpif'); - late final ___sinpif = ___sinpifPtr.asFunction(); + late final ffi.Pointer + _NSHTTPCookieManagerCookiesChangedNotification = + _lookup( + 'NSHTTPCookieManagerCookiesChangedNotification'); - double __sinpi( - double arg0, - ) { - return ___sinpi( - arg0, - ); - } + NSNotificationName get NSHTTPCookieManagerCookiesChangedNotification => + _NSHTTPCookieManagerCookiesChangedNotification.value; - late final ___sinpiPtr = - _lookup>('__sinpi'); - late final ___sinpi = ___sinpiPtr.asFunction(); + set NSHTTPCookieManagerCookiesChangedNotification(NSNotificationName value) => + _NSHTTPCookieManagerCookiesChangedNotification.value = value; - double __tanpif( - double arg0, - ) { - return ___tanpif( - arg0, - ); - } + late final ffi.Pointer + _NSProgressEstimatedTimeRemainingKey = + _lookup('NSProgressEstimatedTimeRemainingKey'); - late final ___tanpifPtr = - _lookup>('__tanpif'); - late final ___tanpif = ___tanpifPtr.asFunction(); + NSProgressUserInfoKey get NSProgressEstimatedTimeRemainingKey => + _NSProgressEstimatedTimeRemainingKey.value; - double __tanpi( - double arg0, - ) { - return ___tanpi( - arg0, - ); - } + set NSProgressEstimatedTimeRemainingKey(NSProgressUserInfoKey value) => + _NSProgressEstimatedTimeRemainingKey.value = value; - late final ___tanpiPtr = - _lookup>('__tanpi'); - late final ___tanpi = ___tanpiPtr.asFunction(); + late final ffi.Pointer _NSProgressThroughputKey = + _lookup('NSProgressThroughputKey'); - __float2 __sincosf_stret( - double arg0, - ) { - return ___sincosf_stret( - arg0, - ); - } + NSProgressUserInfoKey get NSProgressThroughputKey => + _NSProgressThroughputKey.value; - late final ___sincosf_stretPtr = - _lookup>( - '__sincosf_stret'); - late final ___sincosf_stret = - ___sincosf_stretPtr.asFunction<__float2 Function(double)>(); + set NSProgressThroughputKey(NSProgressUserInfoKey value) => + _NSProgressThroughputKey.value = value; - __double2 __sincos_stret( - double arg0, - ) { - return ___sincos_stret( - arg0, - ); - } + late final ffi.Pointer _NSProgressKindFile = + _lookup('NSProgressKindFile'); - late final ___sincos_stretPtr = - _lookup>( - '__sincos_stret'); - late final ___sincos_stret = - ___sincos_stretPtr.asFunction<__double2 Function(double)>(); + NSProgressKind get NSProgressKindFile => _NSProgressKindFile.value; - __float2 __sincospif_stret( - double arg0, - ) { - return ___sincospif_stret( - arg0, - ); - } + set NSProgressKindFile(NSProgressKind value) => + _NSProgressKindFile.value = value; - late final ___sincospif_stretPtr = - _lookup>( - '__sincospif_stret'); - late final ___sincospif_stret = - ___sincospif_stretPtr.asFunction<__float2 Function(double)>(); + late final ffi.Pointer + _NSProgressFileOperationKindKey = + _lookup('NSProgressFileOperationKindKey'); - __double2 __sincospi_stret( - double arg0, - ) { - return ___sincospi_stret( - arg0, - ); - } + NSProgressUserInfoKey get NSProgressFileOperationKindKey => + _NSProgressFileOperationKindKey.value; - late final ___sincospi_stretPtr = - _lookup>( - '__sincospi_stret'); - late final ___sincospi_stret = - ___sincospi_stretPtr.asFunction<__double2 Function(double)>(); + set NSProgressFileOperationKindKey(NSProgressUserInfoKey value) => + _NSProgressFileOperationKindKey.value = value; - double j0( - double arg0, - ) { - return _j0( - arg0, - ); - } + late final ffi.Pointer + _NSProgressFileOperationKindDownloading = + _lookup( + 'NSProgressFileOperationKindDownloading'); - late final _j0Ptr = - _lookup>('j0'); - late final _j0 = _j0Ptr.asFunction(); + NSProgressFileOperationKind get NSProgressFileOperationKindDownloading => + _NSProgressFileOperationKindDownloading.value; - double j1( - double arg0, - ) { - return _j1( - arg0, - ); - } + set NSProgressFileOperationKindDownloading( + NSProgressFileOperationKind value) => + _NSProgressFileOperationKindDownloading.value = value; - late final _j1Ptr = - _lookup>('j1'); - late final _j1 = _j1Ptr.asFunction(); + late final ffi.Pointer + _NSProgressFileOperationKindDecompressingAfterDownloading = + _lookup( + 'NSProgressFileOperationKindDecompressingAfterDownloading'); - double jn( - int arg0, - double arg1, - ) { - return _jn( - arg0, - arg1, - ); - } + NSProgressFileOperationKind + get NSProgressFileOperationKindDecompressingAfterDownloading => + _NSProgressFileOperationKindDecompressingAfterDownloading.value; - late final _jnPtr = - _lookup>( - 'jn'); - late final _jn = _jnPtr.asFunction(); + set NSProgressFileOperationKindDecompressingAfterDownloading( + NSProgressFileOperationKind value) => + _NSProgressFileOperationKindDecompressingAfterDownloading.value = value; - double y0( - double arg0, - ) { - return _y0( - arg0, - ); - } + late final ffi.Pointer + _NSProgressFileOperationKindReceiving = + _lookup( + 'NSProgressFileOperationKindReceiving'); - late final _y0Ptr = - _lookup>('y0'); - late final _y0 = _y0Ptr.asFunction(); + NSProgressFileOperationKind get NSProgressFileOperationKindReceiving => + _NSProgressFileOperationKindReceiving.value; - double y1( - double arg0, - ) { - return _y1( - arg0, - ); - } + set NSProgressFileOperationKindReceiving(NSProgressFileOperationKind value) => + _NSProgressFileOperationKindReceiving.value = value; - late final _y1Ptr = - _lookup>('y1'); - late final _y1 = _y1Ptr.asFunction(); + late final ffi.Pointer + _NSProgressFileOperationKindCopying = + _lookup( + 'NSProgressFileOperationKindCopying'); - double yn( - int arg0, - double arg1, - ) { - return _yn( - arg0, - arg1, - ); - } + NSProgressFileOperationKind get NSProgressFileOperationKindCopying => + _NSProgressFileOperationKindCopying.value; - late final _ynPtr = - _lookup>( - 'yn'); - late final _yn = _ynPtr.asFunction(); + set NSProgressFileOperationKindCopying(NSProgressFileOperationKind value) => + _NSProgressFileOperationKindCopying.value = value; - double scalb( - double arg0, - double arg1, - ) { - return _scalb( - arg0, - arg1, - ); - } + late final ffi.Pointer + _NSProgressFileOperationKindUploading = + _lookup( + 'NSProgressFileOperationKindUploading'); - late final _scalbPtr = - _lookup>( - 'scalb'); - late final _scalb = _scalbPtr.asFunction(); + NSProgressFileOperationKind get NSProgressFileOperationKindUploading => + _NSProgressFileOperationKindUploading.value; - late final ffi.Pointer _signgam = _lookup('signgam'); + set NSProgressFileOperationKindUploading(NSProgressFileOperationKind value) => + _NSProgressFileOperationKindUploading.value = value; - int get signgam => _signgam.value; + late final ffi.Pointer + _NSProgressFileOperationKindDuplicating = + _lookup( + 'NSProgressFileOperationKindDuplicating'); - set signgam(int value) => _signgam.value = value; + NSProgressFileOperationKind get NSProgressFileOperationKindDuplicating => + _NSProgressFileOperationKindDuplicating.value; - int setjmp( - ffi.Pointer arg0, - ) { - return _setjmp1( - arg0, - ); - } + set NSProgressFileOperationKindDuplicating( + NSProgressFileOperationKind value) => + _NSProgressFileOperationKindDuplicating.value = value; - late final _setjmpPtr = - _lookup)>>( - 'setjmp'); - late final _setjmp1 = - _setjmpPtr.asFunction)>(); + late final ffi.Pointer _NSProgressFileURLKey = + _lookup('NSProgressFileURLKey'); - void longjmp( - ffi.Pointer arg0, - int arg1, - ) { - return _longjmp1( - arg0, - arg1, - ); - } + NSProgressUserInfoKey get NSProgressFileURLKey => _NSProgressFileURLKey.value; - late final _longjmpPtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - 'longjmp'); - late final _longjmp1 = - _longjmpPtr.asFunction, int)>(); + set NSProgressFileURLKey(NSProgressUserInfoKey value) => + _NSProgressFileURLKey.value = value; - int _setjmp( - ffi.Pointer arg0, - ) { - return __setjmp( - arg0, - ); - } + late final ffi.Pointer _NSProgressFileTotalCountKey = + _lookup('NSProgressFileTotalCountKey'); - late final __setjmpPtr = - _lookup)>>( - '_setjmp'); - late final __setjmp = - __setjmpPtr.asFunction)>(); + NSProgressUserInfoKey get NSProgressFileTotalCountKey => + _NSProgressFileTotalCountKey.value; - void _longjmp( - ffi.Pointer arg0, - int arg1, - ) { - return __longjmp( - arg0, - arg1, - ); - } + set NSProgressFileTotalCountKey(NSProgressUserInfoKey value) => + _NSProgressFileTotalCountKey.value = value; - late final __longjmpPtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - '_longjmp'); - late final __longjmp = - __longjmpPtr.asFunction, int)>(); + late final ffi.Pointer + _NSProgressFileCompletedCountKey = + _lookup('NSProgressFileCompletedCountKey'); - int sigsetjmp( - ffi.Pointer arg0, - int arg1, - ) { - return _sigsetjmp( - arg0, - arg1, - ); - } + NSProgressUserInfoKey get NSProgressFileCompletedCountKey => + _NSProgressFileCompletedCountKey.value; - late final _sigsetjmpPtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - 'sigsetjmp'); - late final _sigsetjmp = - _sigsetjmpPtr.asFunction, int)>(); + set NSProgressFileCompletedCountKey(NSProgressUserInfoKey value) => + _NSProgressFileCompletedCountKey.value = value; - 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)>(); + late final ffi.Pointer + _NSProgressFileAnimationImageKey = + _lookup('NSProgressFileAnimationImageKey'); - void longjmperror() { - return _longjmperror(); - } + NSProgressUserInfoKey get NSProgressFileAnimationImageKey => + _NSProgressFileAnimationImageKey.value; - late final _longjmperrorPtr = - _lookup>('longjmperror'); - late final _longjmperror = _longjmperrorPtr.asFunction(); + set NSProgressFileAnimationImageKey(NSProgressUserInfoKey value) => + _NSProgressFileAnimationImageKey.value = value; - ffi.Pointer> signal( - int arg0, - ffi.Pointer> arg1, - ) { - return _signal( - arg0, - arg1, - ); - } + late final ffi.Pointer + _NSProgressFileAnimationImageOriginalRectKey = + _lookup( + 'NSProgressFileAnimationImageOriginalRectKey'); - 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>)>(); + NSProgressUserInfoKey get NSProgressFileAnimationImageOriginalRectKey => + _NSProgressFileAnimationImageOriginalRectKey.value; - late final ffi.Pointer>> _sys_signame = - _lookup>>('sys_signame'); + set NSProgressFileAnimationImageOriginalRectKey( + NSProgressUserInfoKey value) => + _NSProgressFileAnimationImageOriginalRectKey.value = value; - ffi.Pointer> get sys_signame => _sys_signame.value; + late final ffi.Pointer _NSProgressFileIconKey = + _lookup('NSProgressFileIconKey'); - set sys_signame(ffi.Pointer> value) => - _sys_signame.value = value; + NSProgressUserInfoKey get NSProgressFileIconKey => + _NSProgressFileIconKey.value; - late final ffi.Pointer>> _sys_siglist = - _lookup>>('sys_siglist'); + set NSProgressFileIconKey(NSProgressUserInfoKey value) => + _NSProgressFileIconKey.value = value; - ffi.Pointer> get sys_siglist => _sys_siglist.value; + late final ffi.Pointer _kCFTypeArrayCallBacks = + _lookup('kCFTypeArrayCallBacks'); - set sys_siglist(ffi.Pointer> value) => - _sys_siglist.value = value; + CFArrayCallBacks get kCFTypeArrayCallBacks => _kCFTypeArrayCallBacks.ref; - int raise( - int arg0, - ) { - return _raise( - arg0, - ); + int CFArrayGetTypeID() { + return _CFArrayGetTypeID(); } - late final _raisePtr = - _lookup>('raise'); - late final _raise = _raisePtr.asFunction(); + late final _CFArrayGetTypeIDPtr = + _lookup>('CFArrayGetTypeID'); + late final _CFArrayGetTypeID = + _CFArrayGetTypeIDPtr.asFunction(); - ffi.Pointer> bsd_signal( - int arg0, - ffi.Pointer> arg1, + CFArrayRef CFArrayCreate( + CFAllocatorRef allocator, + ffi.Pointer> values, + int numValues, + ffi.Pointer callBacks, ) { - return _bsd_signal( - arg0, - arg1, + return _CFArrayCreate( + allocator, + values, + numValues, + callBacks, ); } - late final _bsd_signalPtr = _lookup< + late final _CFArrayCreatePtr = _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>)>(); + CFArrayRef Function( + CFAllocatorRef, + ffi.Pointer>, + CFIndex, + ffi.Pointer)>>('CFArrayCreate'); + late final _CFArrayCreate = _CFArrayCreatePtr.asFunction< + CFArrayRef Function(CFAllocatorRef, ffi.Pointer>, + int, ffi.Pointer)>(); - int kill( - int arg0, - int arg1, + CFArrayRef CFArrayCreateCopy( + CFAllocatorRef allocator, + CFArrayRef theArray, ) { - return _kill( - arg0, - arg1, + return _CFArrayCreateCopy( + allocator, + theArray, ); } - late final _killPtr = - _lookup>('kill'); - late final _kill = _killPtr.asFunction(); + late final _CFArrayCreateCopyPtr = _lookup< + ffi.NativeFunction>( + 'CFArrayCreateCopy'); + late final _CFArrayCreateCopy = _CFArrayCreateCopyPtr.asFunction< + CFArrayRef Function(CFAllocatorRef, CFArrayRef)>(); - int killpg( - int arg0, - int arg1, + CFMutableArrayRef CFArrayCreateMutable( + CFAllocatorRef allocator, + int capacity, + ffi.Pointer callBacks, ) { - return _killpg( - arg0, - arg1, + return _CFArrayCreateMutable( + allocator, + capacity, + callBacks, ); } - late final _killpgPtr = - _lookup>('killpg'); - late final _killpg = _killpgPtr.asFunction(); + late final _CFArrayCreateMutablePtr = _lookup< + ffi.NativeFunction< + CFMutableArrayRef Function(CFAllocatorRef, CFIndex, + ffi.Pointer)>>('CFArrayCreateMutable'); + late final _CFArrayCreateMutable = _CFArrayCreateMutablePtr.asFunction< + CFMutableArrayRef Function( + CFAllocatorRef, int, ffi.Pointer)>(); - int pthread_kill( - pthread_t arg0, - int arg1, + CFMutableArrayRef CFArrayCreateMutableCopy( + CFAllocatorRef allocator, + int capacity, + CFArrayRef theArray, ) { - return _pthread_kill( - arg0, - arg1, + return _CFArrayCreateMutableCopy( + allocator, + capacity, + theArray, ); } - late final _pthread_killPtr = - _lookup>( - 'pthread_kill'); - late final _pthread_kill = - _pthread_killPtr.asFunction(); + late final _CFArrayCreateMutableCopyPtr = _lookup< + ffi.NativeFunction< + CFMutableArrayRef Function(CFAllocatorRef, CFIndex, + CFArrayRef)>>('CFArrayCreateMutableCopy'); + late final _CFArrayCreateMutableCopy = + _CFArrayCreateMutableCopyPtr.asFunction< + CFMutableArrayRef Function(CFAllocatorRef, int, CFArrayRef)>(); - int pthread_sigmask( - int arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, + int CFArrayGetCount( + CFArrayRef theArray, ) { - return _pthread_sigmask( - arg0, - arg1, - arg2, + return _CFArrayGetCount( + theArray, ); } - 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)>(); + late final _CFArrayGetCountPtr = + _lookup>( + 'CFArrayGetCount'); + late final _CFArrayGetCount = + _CFArrayGetCountPtr.asFunction(); - int sigaction1( - int arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, + int CFArrayGetCountOfValue( + CFArrayRef theArray, + CFRange range, + ffi.Pointer value, ) { - return _sigaction1( - arg0, - arg1, - arg2, + return _CFArrayGetCountOfValue( + theArray, + range, + value, ); } - late final _sigaction1Ptr = _lookup< + late final _CFArrayGetCountOfValuePtr = _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)>(); + CFIndex Function(CFArrayRef, CFRange, + ffi.Pointer)>>('CFArrayGetCountOfValue'); + late final _CFArrayGetCountOfValue = _CFArrayGetCountOfValuePtr.asFunction< + int Function(CFArrayRef, CFRange, ffi.Pointer)>(); - int sigaddset( - ffi.Pointer arg0, - int arg1, + int CFArrayContainsValue( + CFArrayRef theArray, + CFRange range, + ffi.Pointer value, ) { - return _sigaddset( - arg0, - arg1, + return _CFArrayContainsValue( + theArray, + range, + value, ); } - late final _sigaddsetPtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - 'sigaddset'); - late final _sigaddset = - _sigaddsetPtr.asFunction, int)>(); + late final _CFArrayContainsValuePtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFArrayRef, CFRange, + ffi.Pointer)>>('CFArrayContainsValue'); + late final _CFArrayContainsValue = _CFArrayContainsValuePtr.asFunction< + int Function(CFArrayRef, CFRange, ffi.Pointer)>(); - int sigaltstack( - ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer CFArrayGetValueAtIndex( + CFArrayRef theArray, + int idx, ) { - return _sigaltstack( - arg0, - arg1, + return _CFArrayGetValueAtIndex( + theArray, + idx, ); } - late final _sigaltstackPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('sigaltstack'); - late final _sigaltstack = _sigaltstackPtr - .asFunction, ffi.Pointer)>(); + late final _CFArrayGetValueAtIndexPtr = _lookup< + ffi + .NativeFunction Function(CFArrayRef, CFIndex)>>( + 'CFArrayGetValueAtIndex'); + late final _CFArrayGetValueAtIndex = _CFArrayGetValueAtIndexPtr.asFunction< + ffi.Pointer Function(CFArrayRef, int)>(); - int sigdelset( - ffi.Pointer arg0, - int arg1, + void CFArrayGetValues( + CFArrayRef theArray, + CFRange range, + ffi.Pointer> values, ) { - return _sigdelset( - arg0, - arg1, + return _CFArrayGetValues( + theArray, + range, + values, ); } - late final _sigdelsetPtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - 'sigdelset'); - late final _sigdelset = - _sigdelsetPtr.asFunction, int)>(); + 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>)>(); - int sigemptyset( - ffi.Pointer arg0, + void CFArrayApplyFunction( + CFArrayRef theArray, + CFRange range, + CFArrayApplierFunction applier, + ffi.Pointer context, ) { - return _sigemptyset( - arg0, + return _CFArrayApplyFunction( + theArray, + range, + applier, + context, ); } - late final _sigemptysetPtr = - _lookup)>>( - 'sigemptyset'); - late final _sigemptyset = - _sigemptysetPtr.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)>(); - int sigfillset( - ffi.Pointer arg0, + int CFArrayGetFirstIndexOfValue( + CFArrayRef theArray, + CFRange range, + ffi.Pointer value, ) { - return _sigfillset( - arg0, + return _CFArrayGetFirstIndexOfValue( + theArray, + range, + value, ); } - late final _sigfillsetPtr = - _lookup)>>( - 'sigfillset'); - late final _sigfillset = - _sigfillsetPtr.asFunction)>(); + late final _CFArrayGetFirstIndexOfValuePtr = _lookup< + ffi.NativeFunction< + CFIndex Function(CFArrayRef, CFRange, + ffi.Pointer)>>('CFArrayGetFirstIndexOfValue'); + late final _CFArrayGetFirstIndexOfValue = _CFArrayGetFirstIndexOfValuePtr + .asFunction)>(); - int sighold( - int arg0, + int CFArrayGetLastIndexOfValue( + CFArrayRef theArray, + CFRange range, + ffi.Pointer value, ) { - return _sighold( - arg0, + return _CFArrayGetLastIndexOfValue( + theArray, + range, + value, ); } - late final _sigholdPtr = - _lookup>('sighold'); - late final _sighold = _sigholdPtr.asFunction(); + late final _CFArrayGetLastIndexOfValuePtr = _lookup< + ffi.NativeFunction< + CFIndex Function(CFArrayRef, CFRange, + ffi.Pointer)>>('CFArrayGetLastIndexOfValue'); + late final _CFArrayGetLastIndexOfValue = _CFArrayGetLastIndexOfValuePtr + .asFunction)>(); - int sigignore( - int arg0, + int CFArrayBSearchValues( + CFArrayRef theArray, + CFRange range, + ffi.Pointer value, + CFComparatorFunction comparator, + ffi.Pointer context, ) { - return _sigignore( - arg0, + return _CFArrayBSearchValues( + theArray, + range, + value, + comparator, + context, ); } - late final _sigignorePtr = - _lookup>('sigignore'); - late final _sigignore = _sigignorePtr.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)>(); - int siginterrupt( - int arg0, - int arg1, + void CFArrayAppendValue( + CFMutableArrayRef theArray, + ffi.Pointer value, ) { - return _siginterrupt( - arg0, - arg1, + return _CFArrayAppendValue( + theArray, + value, ); } - late final _siginterruptPtr = - _lookup>( - 'siginterrupt'); - late final _siginterrupt = - _siginterruptPtr.asFunction(); + late final _CFArrayAppendValuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMutableArrayRef, ffi.Pointer)>>('CFArrayAppendValue'); + late final _CFArrayAppendValue = _CFArrayAppendValuePtr.asFunction< + void Function(CFMutableArrayRef, ffi.Pointer)>(); - int sigismember( - ffi.Pointer arg0, - int arg1, + void CFArrayInsertValueAtIndex( + CFMutableArrayRef theArray, + int idx, + ffi.Pointer value, ) { - return _sigismember( - arg0, - arg1, + return _CFArrayInsertValueAtIndex( + theArray, + idx, + value, ); } - late final _sigismemberPtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - 'sigismember'); - late final _sigismember = - _sigismemberPtr.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 sigpause( - int arg0, + void CFArraySetValueAtIndex( + CFMutableArrayRef theArray, + int idx, + ffi.Pointer value, ) { - return _sigpause( - arg0, + return _CFArraySetValueAtIndex( + theArray, + idx, + value, ); } - late final _sigpausePtr = - _lookup>('sigpause'); - late final _sigpause = _sigpausePtr.asFunction(); + 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)>(); - int sigpending( - ffi.Pointer arg0, + void CFArrayRemoveValueAtIndex( + CFMutableArrayRef theArray, + int idx, ) { - return _sigpending( - arg0, + return _CFArrayRemoveValueAtIndex( + theArray, + idx, ); } - late final _sigpendingPtr = - _lookup)>>( - 'sigpending'); - late final _sigpending = - _sigpendingPtr.asFunction)>(); + late final _CFArrayRemoveValueAtIndexPtr = _lookup< + ffi.NativeFunction>( + 'CFArrayRemoveValueAtIndex'); + late final _CFArrayRemoveValueAtIndex = _CFArrayRemoveValueAtIndexPtr + .asFunction(); - int sigprocmask( - int arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, + void CFArrayRemoveAllValues( + CFMutableArrayRef theArray, ) { - return _sigprocmask( - arg0, - arg1, - arg2, + return _CFArrayRemoveAllValues( + theArray, ); } - 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(); + late final _CFArrayRemoveAllValuesPtr = + _lookup>( + 'CFArrayRemoveAllValues'); + late final _CFArrayRemoveAllValues = + _CFArrayRemoveAllValuesPtr.asFunction(); - ffi.Pointer> sigset( - int arg0, - ffi.Pointer> arg1, + void CFArrayReplaceValues( + CFMutableArrayRef theArray, + CFRange range, + ffi.Pointer> newValues, + int newCount, ) { - return _sigset( - arg0, - arg1, + return _CFArrayReplaceValues( + theArray, + range, + newValues, + newCount, ); } - late final _sigsetPtr = _lookup< + late final _CFArrayReplaceValuesPtr = _lookup< ffi.NativeFunction< - ffi.Pointer> Function( - ffi.Int, - ffi.Pointer< - ffi.NativeFunction>)>>('sigset'); - late final _sigset = _sigsetPtr.asFunction< - ffi.Pointer> Function( - int, ffi.Pointer>)>(); + ffi.Void Function( + CFMutableArrayRef, + CFRange, + ffi.Pointer>, + CFIndex)>>('CFArrayReplaceValues'); + late final _CFArrayReplaceValues = _CFArrayReplaceValuesPtr.asFunction< + void Function(CFMutableArrayRef, CFRange, + ffi.Pointer>, int)>(); - int sigsuspend( - ffi.Pointer arg0, + void CFArrayExchangeValuesAtIndices( + CFMutableArrayRef theArray, + int idx1, + int idx2, ) { - return _sigsuspend( - arg0, + return _CFArrayExchangeValuesAtIndices( + theArray, + idx1, + idx2, ); } - late final _sigsuspendPtr = - _lookup)>>( - 'sigsuspend'); - late final _sigsuspend = - _sigsuspendPtr.asFunction)>(); + late final _CFArrayExchangeValuesAtIndicesPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableArrayRef, CFIndex, + CFIndex)>>('CFArrayExchangeValuesAtIndices'); + late final _CFArrayExchangeValuesAtIndices = + _CFArrayExchangeValuesAtIndicesPtr.asFunction< + void Function(CFMutableArrayRef, int, int)>(); - int sigwait( - ffi.Pointer arg0, - ffi.Pointer arg1, + void CFArraySortValues( + CFMutableArrayRef theArray, + CFRange range, + CFComparatorFunction comparator, + ffi.Pointer context, ) { - return _sigwait( - arg0, - arg1, + return _CFArraySortValues( + theArray, + range, + comparator, + context, ); } - late final _sigwaitPtr = _lookup< + late final _CFArraySortValuesPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('sigwait'); - late final _sigwait = _sigwaitPtr - .asFunction, ffi.Pointer)>(); + ffi.Void Function(CFMutableArrayRef, CFRange, CFComparatorFunction, + ffi.Pointer)>>('CFArraySortValues'); + late final _CFArraySortValues = _CFArraySortValuesPtr.asFunction< + void Function(CFMutableArrayRef, CFRange, CFComparatorFunction, + ffi.Pointer)>(); - void psignal( - int arg0, - ffi.Pointer arg1, + void CFArrayAppendArray( + CFMutableArrayRef theArray, + CFArrayRef otherArray, + CFRange otherRange, ) { - return _psignal( - arg0, - arg1, + return _CFArrayAppendArray( + theArray, + otherArray, + otherRange, ); } - late final _psignalPtr = _lookup< + late final _CFArrayAppendArrayPtr = _lookup< ffi.NativeFunction< ffi.Void Function( - ffi.UnsignedInt, ffi.Pointer)>>('psignal'); - late final _psignal = - _psignalPtr.asFunction)>(); + CFMutableArrayRef, CFArrayRef, CFRange)>>('CFArrayAppendArray'); + late final _CFArrayAppendArray = _CFArrayAppendArrayPtr.asFunction< + void Function(CFMutableArrayRef, CFArrayRef, CFRange)>(); - int sigblock( - int arg0, + late final _class_OS_object1 = _getClass1("OS_object"); + ffi.Pointer os_retain( + ffi.Pointer object, ) { - return _sigblock( - arg0, + return _os_retain( + object, ); } - late final _sigblockPtr = - _lookup>('sigblock'); - late final _sigblock = _sigblockPtr.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 sigsetmask( - int arg0, + void os_release( + ffi.Pointer object, ) { - return _sigsetmask( - arg0, + return _os_release( + object, ); } - late final _sigsetmaskPtr = - _lookup>('sigsetmask'); - late final _sigsetmask = _sigsetmaskPtr.asFunction(); + late final _os_releasePtr = + _lookup)>>( + 'os_release'); + late final _os_release = + _os_releasePtr.asFunction)>(); - int sigvec1( - int arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, + ffi.Pointer sec_retain( + ffi.Pointer obj, ) { - return _sigvec1( - arg0, - arg1, - arg2, + return _sec_retain( + obj, ); } - late final _sigvec1Ptr = _lookup< + late final _sec_retainPtr = _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)>(); + ffi.Pointer Function(ffi.Pointer)>>('sec_retain'); + late final _sec_retain = _sec_retainPtr + .asFunction Function(ffi.Pointer)>(); - int renameat( - int arg0, - ffi.Pointer arg1, - int arg2, - ffi.Pointer arg3, + void sec_release( + ffi.Pointer obj, ) { - return _renameat( - arg0, - arg1, - arg2, - arg3, + return _sec_release( + obj, ); } - 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 _sec_releasePtr = + _lookup)>>( + 'sec_release'); + late final _sec_release = + _sec_releasePtr.asFunction)>(); - int renamex_np( - ffi.Pointer arg0, - ffi.Pointer arg1, - int arg2, + CFStringRef SecCopyErrorMessageString( + int status, + ffi.Pointer reserved, ) { - return _renamex_np( - arg0, - arg1, - arg2, + return _SecCopyErrorMessageString( + status, + reserved, ); } - late final _renamex_npPtr = _lookup< + late final _SecCopyErrorMessageStringPtr = _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( + OSStatus, ffi.Pointer)>>('SecCopyErrorMessageString'); + late final _SecCopyErrorMessageString = _SecCopyErrorMessageStringPtr + .asFunction)>(); - int renameatx_np( - int arg0, + void __assert_rtn( + ffi.Pointer arg0, ffi.Pointer arg1, int arg2, ffi.Pointer arg3, - int arg4, ) { - return _renameatx_np( + return ___assert_rtn( arg0, arg1, arg2, arg3, - arg4, ); } - late final _renameatx_npPtr = _lookup< + late final ___assert_rtnPtr = _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.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)>(); - ffi.Pointer get __stdoutp => ___stdoutp.value; + late final ffi.Pointer<_RuneLocale> __DefaultRuneLocale = + _lookup<_RuneLocale>('_DefaultRuneLocale'); - set __stdoutp(ffi.Pointer value) => ___stdoutp.value = value; + _RuneLocale get _DefaultRuneLocale => __DefaultRuneLocale.ref; - late final ffi.Pointer> ___stderrp = - _lookup>('__stderrp'); + late final ffi.Pointer> __CurrentRuneLocale = + _lookup>('_CurrentRuneLocale'); - ffi.Pointer get __stderrp => ___stderrp.value; + ffi.Pointer<_RuneLocale> get _CurrentRuneLocale => __CurrentRuneLocale.value; - set __stderrp(ffi.Pointer value) => ___stderrp.value = value; + set _CurrentRuneLocale(ffi.Pointer<_RuneLocale> value) => + __CurrentRuneLocale.value = value; - void clearerr( - ffi.Pointer arg0, + int ___runetype( + int arg0, ) { - return _clearerr( + return ____runetype( arg0, ); } - late final _clearerrPtr = - _lookup)>>( - 'clearerr'); - late final _clearerr = - _clearerrPtr.asFunction)>(); + late final ____runetypePtr = _lookup< + ffi.NativeFunction>( + '___runetype'); + late final ____runetype = ____runetypePtr.asFunction(); - int fclose( - ffi.Pointer arg0, + int ___tolower( + int arg0, ) { - return _fclose( + return ____tolower( arg0, ); } - late final _fclosePtr = - _lookup)>>( - 'fclose'); - late final _fclose = _fclosePtr.asFunction)>(); + late final ____tolowerPtr = _lookup< + ffi.NativeFunction<__darwin_ct_rune_t Function(__darwin_ct_rune_t)>>( + '___tolower'); + late final ____tolower = ____tolowerPtr.asFunction(); - int feof( - ffi.Pointer arg0, + int ___toupper( + int arg0, ) { - return _feof( + return ____toupper( arg0, ); } - late final _feofPtr = - _lookup)>>('feof'); - late final _feof = _feofPtr.asFunction)>(); + late final ____toupperPtr = _lookup< + ffi.NativeFunction<__darwin_ct_rune_t Function(__darwin_ct_rune_t)>>( + '___toupper'); + late final ____toupper = ____toupperPtr.asFunction(); - int ferror( - ffi.Pointer arg0, + int __maskrune( + int arg0, + int arg1, ) { - return _ferror( + return ___maskrune( arg0, + arg1, ); } - late final _ferrorPtr = - _lookup)>>( - 'ferror'); - late final _ferror = _ferrorPtr.asFunction)>(); + late final ___maskrunePtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + __darwin_ct_rune_t, ffi.UnsignedLong)>>('__maskrune'); + late final ___maskrune = ___maskrunePtr.asFunction(); - int fflush( - ffi.Pointer arg0, + int __toupper( + int arg0, ) { - return _fflush( + return ___toupper1( arg0, ); } - late final _fflushPtr = - _lookup)>>( - 'fflush'); - late final _fflush = _fflushPtr.asFunction)>(); + late final ___toupperPtr = _lookup< + ffi.NativeFunction<__darwin_ct_rune_t Function(__darwin_ct_rune_t)>>( + '__toupper'); + late final ___toupper1 = ___toupperPtr.asFunction(); - int fgetc( - ffi.Pointer arg0, + int __tolower( + int arg0, ) { - return _fgetc( + return ___tolower1( arg0, ); } - late final _fgetcPtr = - _lookup)>>('fgetc'); - late final _fgetc = _fgetcPtr.asFunction)>(); + late final ___tolowerPtr = _lookup< + ffi.NativeFunction<__darwin_ct_rune_t Function(__darwin_ct_rune_t)>>( + '__tolower'); + late final ___tolower1 = ___tolowerPtr.asFunction(); - int fgetpos( - ffi.Pointer arg0, - ffi.Pointer arg1, + 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 _fgetpos( + return _setlocale( arg0, arg1, ); } - late final _fgetposPtr = _lookup< + late final _setlocalePtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer)>>('fgetpos'); - late final _fgetpos = _fgetposPtr - .asFunction, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Int, ffi.Pointer)>>('setlocale'); + late final _setlocale = _setlocalePtr + .asFunction Function(int, ffi.Pointer)>(); - ffi.Pointer fgets( - ffi.Pointer arg0, - int arg1, - ffi.Pointer arg2, + 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 _fgets( + return ___fpclassifyf( 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 ___fpclassifyfPtr = + _lookup>('__fpclassifyf'); + late final ___fpclassifyf = + ___fpclassifyfPtr.asFunction(); - ffi.Pointer fopen( - ffi.Pointer __filename, - ffi.Pointer __mode, + int __fpclassifyd( + double arg0, ) { - return _fopen( - __filename, - __mode, + return ___fpclassifyd( + 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 ___fpclassifydPtr = + _lookup>( + '__fpclassifyd'); + late final ___fpclassifyd = + ___fpclassifydPtr.asFunction(); - int fprintf( - ffi.Pointer arg0, - ffi.Pointer arg1, + double acosf( + double arg0, ) { - return _fprintf( + return _acosf( 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 _acosfPtr = + _lookup>('acosf'); + late final _acosf = _acosfPtr.asFunction(); - int fputc( - int arg0, - ffi.Pointer arg1, + double acos( + double arg0, ) { - return _fputc( + return _acos( arg0, - arg1, ); } - late final _fputcPtr = - _lookup)>>( - 'fputc'); - late final _fputc = - _fputcPtr.asFunction)>(); + late final _acosPtr = + _lookup>('acos'); + late final _acos = _acosPtr.asFunction(); - int fputs( - ffi.Pointer arg0, - ffi.Pointer arg1, + double asinf( + double arg0, ) { - return _fputs( + return _asinf( 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 _asinfPtr = + _lookup>('asinf'); + late final _asinf = _asinfPtr.asFunction(); - int fread( - ffi.Pointer __ptr, - int __size, - int __nitems, - ffi.Pointer __stream, + double asin( + double arg0, ) { - return _fread( - __ptr, - __size, - __nitems, - __stream, + return _asin( + 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 _asinPtr = + _lookup>('asin'); + late final _asin = _asinPtr.asFunction(); - ffi.Pointer freopen( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, + double atanf( + double arg0, ) { - return _freopen( + return _atanf( 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 _atanfPtr = + _lookup>('atanf'); + late final _atanf = _atanfPtr.asFunction(); - int fscanf( - ffi.Pointer arg0, - ffi.Pointer arg1, + double atan( + double arg0, ) { - return _fscanf( + return _atan( 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 _atanPtr = + _lookup>('atan'); + late final _atan = _atanPtr.asFunction(); - int fseek( - ffi.Pointer arg0, - int arg1, - int arg2, + double atan2f( + double arg0, + double arg1, ) { - return _fseek( + return _atan2f( 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 _atan2fPtr = + _lookup>( + 'atan2f'); + late final _atan2f = _atan2fPtr.asFunction(); - int fsetpos( - ffi.Pointer arg0, - ffi.Pointer arg1, + double atan2( + double arg0, + double arg1, ) { - return _fsetpos( + return _atan2( 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 _atan2Ptr = + _lookup>( + 'atan2'); + late final _atan2 = _atan2Ptr.asFunction(); - int ftell( - ffi.Pointer arg0, + double cosf( + double arg0, ) { - return _ftell( + return _cosf( arg0, ); } - late final _ftellPtr = - _lookup)>>( - 'ftell'); - late final _ftell = _ftellPtr.asFunction)>(); + late final _cosfPtr = + _lookup>('cosf'); + late final _cosf = _cosfPtr.asFunction(); - int fwrite( - ffi.Pointer __ptr, - int __size, - int __nitems, - ffi.Pointer __stream, + double cos( + double arg0, ) { - return _fwrite( - __ptr, - __size, - __nitems, - __stream, + return _cos( + 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 _cosPtr = + _lookup>('cos'); + late final _cos = _cosPtr.asFunction(); - int getc( - ffi.Pointer arg0, + double sinf( + double arg0, ) { - return _getc( + return _sinf( 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 _sinfPtr = + _lookup>('sinf'); + late final _sinf = _sinfPtr.asFunction(); - ffi.Pointer gets( - ffi.Pointer arg0, + double sin( + double arg0, ) { - return _gets( + return _sin( arg0, ); } - late final _getsPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('gets'); - late final _gets = _getsPtr - .asFunction Function(ffi.Pointer)>(); + late final _sinPtr = + _lookup>('sin'); + late final _sin = _sinPtr.asFunction(); - void perror( - ffi.Pointer arg0, + double tanf( + double arg0, ) { - return _perror( + return _tanf( arg0, ); } - late final _perrorPtr = - _lookup)>>( - 'perror'); - late final _perror = - _perrorPtr.asFunction)>(); + late final _tanfPtr = + _lookup>('tanf'); + late final _tanf = _tanfPtr.asFunction(); - int printf( - ffi.Pointer arg0, + double tan( + double arg0, ) { - return _printf( + return _tan( arg0, ); } - late final _printfPtr = - _lookup)>>( - 'printf'); - late final _printf = - _printfPtr.asFunction)>(); + late final _tanPtr = + _lookup>('tan'); + late final _tan = _tanPtr.asFunction(); - int putc( - int arg0, - ffi.Pointer arg1, + double acoshf( + double arg0, ) { - return _putc( + return _acoshf( arg0, - arg1, ); } - late final _putcPtr = - _lookup)>>( - 'putc'); - late final _putc = - _putcPtr.asFunction)>(); + late final _acoshfPtr = + _lookup>('acoshf'); + late final _acoshf = _acoshfPtr.asFunction(); - int putchar( - int arg0, + double acosh( + double arg0, ) { - return _putchar( + return _acosh( arg0, ); } - late final _putcharPtr = - _lookup>('putchar'); - late final _putchar = _putcharPtr.asFunction(); + late final _acoshPtr = + _lookup>('acosh'); + late final _acosh = _acoshPtr.asFunction(); - int puts( - ffi.Pointer arg0, + double asinhf( + double arg0, ) { - return _puts( + return _asinhf( arg0, ); } - late final _putsPtr = - _lookup)>>( - 'puts'); - late final _puts = _putsPtr.asFunction)>(); + late final _asinhfPtr = + _lookup>('asinhf'); + late final _asinhf = _asinhfPtr.asFunction(); - int remove( - ffi.Pointer arg0, + double asinh( + double arg0, ) { - return _remove( + return _asinh( arg0, ); } - late final _removePtr = - _lookup)>>( - 'remove'); - late final _remove = - _removePtr.asFunction)>(); + late final _asinhPtr = + _lookup>('asinh'); + late final _asinh = _asinhPtr.asFunction(); - int rename( - ffi.Pointer __old, - ffi.Pointer __new, + double atanhf( + double arg0, ) { - return _rename( - __old, - __new, + return _atanhf( + arg0, ); } - late final _renamePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('rename'); - late final _rename = _renamePtr - .asFunction, ffi.Pointer)>(); + late final _atanhfPtr = + _lookup>('atanhf'); + late final _atanhf = _atanhfPtr.asFunction(); - void rewind( - ffi.Pointer arg0, + double atanh( + double arg0, ) { - return _rewind( + return _atanh( arg0, ); } - late final _rewindPtr = - _lookup)>>( - 'rewind'); - late final _rewind = - _rewindPtr.asFunction)>(); + late final _atanhPtr = + _lookup>('atanh'); + late final _atanh = _atanhPtr.asFunction(); - int scanf( - ffi.Pointer arg0, + double coshf( + double arg0, ) { - return _scanf( + return _coshf( arg0, ); } - late final _scanfPtr = - _lookup)>>( - 'scanf'); - late final _scanf = - _scanfPtr.asFunction)>(); + late final _coshfPtr = + _lookup>('coshf'); + late final _coshf = _coshfPtr.asFunction(); - void setbuf( - ffi.Pointer arg0, - ffi.Pointer arg1, + double cosh( + double arg0, ) { - return _setbuf( + return _cosh( 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 _coshPtr = + _lookup>('cosh'); + late final _cosh = _coshPtr.asFunction(); - int setvbuf( - ffi.Pointer arg0, - ffi.Pointer arg1, - int arg2, - int arg3, + double sinhf( + double arg0, ) { - return _setvbuf( + return _sinhf( 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 _sinhfPtr = + _lookup>('sinhf'); + late final _sinhf = _sinhfPtr.asFunction(); - int sprintf( - ffi.Pointer arg0, - ffi.Pointer arg1, + double sinh( + double arg0, ) { - return _sprintf( + return _sinh( 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 _sinhPtr = + _lookup>('sinh'); + late final _sinh = _sinhPtr.asFunction(); - int sscanf( - ffi.Pointer arg0, - ffi.Pointer arg1, + double tanhf( + double arg0, ) { - return _sscanf( + return _tanhf( 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()>(); + late final _tanhfPtr = + _lookup>('tanhf'); + late final _tanhf = _tanhfPtr.asFunction(); - ffi.Pointer tmpnam( - ffi.Pointer arg0, + double tanh( + double arg0, ) { - return _tmpnam( + return _tanh( arg0, ); } - late final _tmpnamPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('tmpnam'); - late final _tmpnam = _tmpnamPtr - .asFunction Function(ffi.Pointer)>(); + late final _tanhPtr = + _lookup>('tanh'); + late final _tanh = _tanhPtr.asFunction(); - int ungetc( - int arg0, - ffi.Pointer arg1, + double expf( + double arg0, ) { - return _ungetc( + return _expf( arg0, - arg1, ); } - late final _ungetcPtr = - _lookup)>>( - 'ungetc'); - late final _ungetc = - _ungetcPtr.asFunction)>(); + late final _expfPtr = + _lookup>('expf'); + late final _expf = _expfPtr.asFunction(); - int vfprintf( - ffi.Pointer arg0, - ffi.Pointer arg1, - va_list arg2, + double exp( + double arg0, ) { - return _vfprintf( + return _exp( 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 _expPtr = + _lookup>('exp'); + late final _exp = _expPtr.asFunction(); - int vprintf( - ffi.Pointer arg0, - va_list arg1, + double exp2f( + double arg0, ) { - return _vprintf( + return _exp2f( arg0, - arg1, ); } - late final _vprintfPtr = _lookup< - ffi.NativeFunction, va_list)>>( - 'vprintf'); - late final _vprintf = - _vprintfPtr.asFunction, va_list)>(); + late final _exp2fPtr = + _lookup>('exp2f'); + late final _exp2f = _exp2fPtr.asFunction(); - int vsprintf( - ffi.Pointer arg0, - ffi.Pointer arg1, - va_list arg2, + double exp2( + double arg0, ) { - return _vsprintf( + return _exp2( 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 _exp2Ptr = + _lookup>('exp2'); + late final _exp2 = _exp2Ptr.asFunction(); - ffi.Pointer ctermid( - ffi.Pointer arg0, + double expm1f( + double arg0, ) { - return _ctermid( + return _expm1f( arg0, ); } - late final _ctermidPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('ctermid'); - late final _ctermid = _ctermidPtr - .asFunction Function(ffi.Pointer)>(); + late final _expm1fPtr = + _lookup>('expm1f'); + late final _expm1f = _expm1fPtr.asFunction(); - ffi.Pointer fdopen( - int arg0, - ffi.Pointer arg1, + double expm1( + double arg0, ) { - return _fdopen( + return _expm1( 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 _expm1Ptr = + _lookup>('expm1'); + late final _expm1 = _expm1Ptr.asFunction(); - int fileno( - ffi.Pointer arg0, + double logf( + double arg0, ) { - return _fileno( + return _logf( arg0, ); } - late final _filenoPtr = - _lookup)>>( - 'fileno'); - late final _fileno = _filenoPtr.asFunction)>(); + late final _logfPtr = + _lookup>('logf'); + late final _logf = _logfPtr.asFunction(); - int pclose( - ffi.Pointer arg0, + double log( + double arg0, ) { - return _pclose( + return _log( arg0, ); } - late final _pclosePtr = - _lookup)>>( - 'pclose'); - late final _pclose = _pclosePtr.asFunction)>(); + late final _logPtr = + _lookup>('log'); + late final _log = _logPtr.asFunction(); - ffi.Pointer popen( - ffi.Pointer arg0, - ffi.Pointer arg1, + double log10f( + double arg0, ) { - return _popen( + return _log10f( 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 _log10fPtr = + _lookup>('log10f'); + late final _log10f = _log10fPtr.asFunction(); - int __srget( - ffi.Pointer arg0, + double log10( + double arg0, ) { - return ___srget( + return _log10( arg0, ); } - late final ___srgetPtr = - _lookup)>>( - '__srget'); - late final ___srget = - ___srgetPtr.asFunction)>(); + late final _log10Ptr = + _lookup>('log10'); + late final _log10 = _log10Ptr.asFunction(); - int __svfscanf( - ffi.Pointer arg0, - ffi.Pointer arg1, - va_list arg2, + double log2f( + double arg0, ) { - return ___svfscanf( + return _log2f( 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 _log2fPtr = + _lookup>('log2f'); + late final _log2f = _log2fPtr.asFunction(); - int __swbuf( - int arg0, - ffi.Pointer arg1, + double log2( + double arg0, ) { - return ___swbuf( + return _log2( arg0, - arg1, ); } - late final ___swbufPtr = - _lookup)>>( - '__swbuf'); - late final ___swbuf = - ___swbufPtr.asFunction)>(); + late final _log2Ptr = + _lookup>('log2'); + late final _log2 = _log2Ptr.asFunction(); - void flockfile( - ffi.Pointer arg0, + double log1pf( + double arg0, ) { - return _flockfile( + return _log1pf( arg0, ); } - late final _flockfilePtr = - _lookup)>>( - 'flockfile'); - late final _flockfile = - _flockfilePtr.asFunction)>(); + late final _log1pfPtr = + _lookup>('log1pf'); + late final _log1pf = _log1pfPtr.asFunction(); - int ftrylockfile( - ffi.Pointer arg0, + double log1p( + double arg0, ) { - return _ftrylockfile( + return _log1p( arg0, ); } - late final _ftrylockfilePtr = - _lookup)>>( - 'ftrylockfile'); - late final _ftrylockfile = - _ftrylockfilePtr.asFunction)>(); + late final _log1pPtr = + _lookup>('log1p'); + late final _log1p = _log1pPtr.asFunction(); - void funlockfile( - ffi.Pointer arg0, + double logbf( + double arg0, ) { - return _funlockfile( + return _logbf( arg0, ); } - late final _funlockfilePtr = - _lookup)>>( - 'funlockfile'); - late final _funlockfile = - _funlockfilePtr.asFunction)>(); + late final _logbfPtr = + _lookup>('logbf'); + late final _logbf = _logbfPtr.asFunction(); - int getc_unlocked( - ffi.Pointer arg0, + double logb( + double arg0, ) { - return _getc_unlocked( + return _logb( arg0, ); } - late final _getc_unlockedPtr = - _lookup)>>( - 'getc_unlocked'); - late final _getc_unlocked = - _getc_unlockedPtr.asFunction)>(); + late final _logbPtr = + _lookup>('logb'); + late final _logb = _logbPtr.asFunction(); - int getchar_unlocked() { - return _getchar_unlocked(); + double modff( + double arg0, + ffi.Pointer arg1, + ) { + return _modff( + arg0, + arg1, + ); } - late final _getchar_unlockedPtr = - _lookup>('getchar_unlocked'); - late final _getchar_unlocked = - _getchar_unlockedPtr.asFunction(); + late final _modffPtr = _lookup< + ffi.NativeFunction< + ffi.Float Function(ffi.Float, ffi.Pointer)>>('modff'); + late final _modff = + _modffPtr.asFunction)>(); - int putc_unlocked( - int arg0, - ffi.Pointer arg1, + double modf( + double arg0, + ffi.Pointer arg1, ) { - return _putc_unlocked( + return _modf( arg0, arg1, ); } - late final _putc_unlockedPtr = - _lookup)>>( - 'putc_unlocked'); - late final _putc_unlocked = - _putc_unlockedPtr.asFunction)>(); + late final _modfPtr = _lookup< + ffi.NativeFunction< + ffi.Double Function(ffi.Double, ffi.Pointer)>>('modf'); + late final _modf = + _modfPtr.asFunction)>(); - int putchar_unlocked( - int arg0, + double ldexpf( + double arg0, + int arg1, ) { - return _putchar_unlocked( + return _ldexpf( arg0, + arg1, ); } - late final _putchar_unlockedPtr = - _lookup>( - 'putchar_unlocked'); - late final _putchar_unlocked = - _putchar_unlockedPtr.asFunction(); + late final _ldexpfPtr = + _lookup>( + 'ldexpf'); + late final _ldexpf = _ldexpfPtr.asFunction(); - int getw( - ffi.Pointer arg0, + double ldexp( + double arg0, + int arg1, ) { - return _getw( + return _ldexp( arg0, + arg1, ); } - late final _getwPtr = - _lookup)>>('getw'); - late final _getw = _getwPtr.asFunction)>(); + late final _ldexpPtr = + _lookup>( + 'ldexp'); + late final _ldexp = _ldexpPtr.asFunction(); - int putw( - int arg0, - ffi.Pointer arg1, + double frexpf( + double arg0, + ffi.Pointer arg1, ) { - return _putw( + return _frexpf( arg0, arg1, ); } - late final _putwPtr = - _lookup)>>( - 'putw'); - late final _putw = - _putwPtr.asFunction)>(); + late final _frexpfPtr = _lookup< + ffi + .NativeFunction)>>( + 'frexpf'); + late final _frexpf = + _frexpfPtr.asFunction)>(); - ffi.Pointer tempnam( - ffi.Pointer __dir, - ffi.Pointer __prefix, + double frexp( + double arg0, + ffi.Pointer arg1, ) { - return _tempnam( - __dir, - __prefix, + return _frexp( + arg0, + arg1, ); } - late final _tempnamPtr = _lookup< + late final _frexpPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('tempnam'); - late final _tempnam = _tempnamPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Double Function(ffi.Double, ffi.Pointer)>>('frexp'); + late final _frexp = + _frexpPtr.asFunction)>(); - int fseeko( - ffi.Pointer __stream, - int __offset, - int __whence, + int ilogbf( + double arg0, ) { - return _fseeko( - __stream, - __offset, - __whence, + return _ilogbf( + 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 _ilogbfPtr = + _lookup>('ilogbf'); + late final _ilogbf = _ilogbfPtr.asFunction(); - int ftello( - ffi.Pointer __stream, + int ilogb( + double arg0, ) { - return _ftello( - __stream, + return _ilogb( + arg0, ); } - late final _ftelloPtr = - _lookup)>>('ftello'); - late final _ftello = _ftelloPtr.asFunction)>(); + late final _ilogbPtr = + _lookup>('ilogb'); + late final _ilogb = _ilogbPtr.asFunction(); - int snprintf( - ffi.Pointer __str, - int __size, - ffi.Pointer __format, + double scalbnf( + double arg0, + int arg1, ) { - return _snprintf( - __str, - __size, - __format, + return _scalbnf( + arg0, + arg1, ); } - 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 _scalbnfPtr = + _lookup>( + 'scalbnf'); + late final _scalbnf = _scalbnfPtr.asFunction(); - int vfscanf( - ffi.Pointer __stream, - ffi.Pointer __format, - va_list arg2, + double scalbn( + double arg0, + int arg1, ) { - return _vfscanf( - __stream, - __format, - arg2, + return _scalbn( + arg0, + arg1, ); } - 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 _scalbnPtr = + _lookup>( + 'scalbn'); + late final _scalbn = _scalbnPtr.asFunction(); - int vscanf( - ffi.Pointer __format, - va_list arg1, + double scalblnf( + double arg0, + int arg1, ) { - return _vscanf( - __format, + return _scalblnf( + arg0, arg1, ); } - late final _vscanfPtr = _lookup< - ffi.NativeFunction, va_list)>>( - 'vscanf'); - late final _vscanf = - _vscanfPtr.asFunction, va_list)>(); + late final _scalblnfPtr = + _lookup>( + 'scalblnf'); + late final _scalblnf = + _scalblnfPtr.asFunction(); - int vsnprintf( - ffi.Pointer __str, - int __size, - ffi.Pointer __format, - va_list arg3, + double scalbln( + double arg0, + int arg1, ) { - return _vsnprintf( - __str, - __size, - __format, - arg3, + return _scalbln( + arg0, + arg1, ); } - 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 _scalblnPtr = + _lookup>( + 'scalbln'); + late final _scalbln = _scalblnPtr.asFunction(); - int vsscanf( - ffi.Pointer __str, - ffi.Pointer __format, - va_list arg2, + double fabsf( + double arg0, ) { - return _vsscanf( - __str, - __format, - arg2, + return _fabsf( + 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 _fabsfPtr = + _lookup>('fabsf'); + late final _fabsf = _fabsfPtr.asFunction(); - int dprintf( - int arg0, - ffi.Pointer arg1, + double fabs( + double arg0, ) { - return _dprintf( + return _fabs( arg0, - arg1, ); } - late final _dprintfPtr = _lookup< - ffi.NativeFunction)>>( - 'dprintf'); - late final _dprintf = - _dprintfPtr.asFunction)>(); + late final _fabsPtr = + _lookup>('fabs'); + late final _fabs = _fabsPtr.asFunction(); - int vdprintf( - int arg0, - ffi.Pointer arg1, - va_list arg2, + double cbrtf( + double arg0, ) { - return _vdprintf( + return _cbrtf( 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 _cbrtfPtr = + _lookup>('cbrtf'); + late final _cbrtf = _cbrtfPtr.asFunction(); - int getdelim( - ffi.Pointer> __linep, - ffi.Pointer __linecapp, - int __delimiter, - ffi.Pointer __stream, + double cbrt( + double arg0, ) { - return _getdelim( - __linep, - __linecapp, - __delimiter, - __stream, + return _cbrt( + 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 _cbrtPtr = + _lookup>('cbrt'); + late final _cbrt = _cbrtPtr.asFunction(); - int getline( - ffi.Pointer> __linep, - ffi.Pointer __linecapp, - ffi.Pointer __stream, + double hypotf( + double arg0, + double arg1, ) { - return _getline( - __linep, - __linecapp, - __stream, + return _hypotf( + arg0, + arg1, ); } - 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 _hypotfPtr = + _lookup>( + 'hypotf'); + late final _hypotf = _hypotfPtr.asFunction(); - ffi.Pointer fmemopen( - ffi.Pointer __buf, - int __size, - ffi.Pointer __mode, + double hypot( + double arg0, + double arg1, ) { - return _fmemopen( - __buf, - __size, - __mode, + return _hypot( + arg0, + arg1, ); } - 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 _hypotPtr = + _lookup>( + 'hypot'); + late final _hypot = _hypotPtr.asFunction(); - ffi.Pointer open_memstream( - ffi.Pointer> __bufp, - ffi.Pointer __sizep, + double powf( + double arg0, + double arg1, ) { - return _open_memstream( - __bufp, - __sizep, + return _powf( + arg0, + arg1, ); } - 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'); + late final _powfPtr = + _lookup>( + 'powf'); + late final _powf = _powfPtr.asFunction(); - int get sys_nerr => _sys_nerr.value; + double pow( + double arg0, + double arg1, + ) { + return _pow( + arg0, + arg1, + ); + } - set sys_nerr(int value) => _sys_nerr.value = value; - - late final ffi.Pointer>> _sys_errlist = - _lookup>>('sys_errlist'); + late final _powPtr = + _lookup>( + 'pow'); + late final _pow = _powPtr.asFunction(); - ffi.Pointer> get sys_errlist => _sys_errlist.value; + double sqrtf( + double arg0, + ) { + return _sqrtf( + arg0, + ); + } - set sys_errlist(ffi.Pointer> value) => - _sys_errlist.value = value; + late final _sqrtfPtr = + _lookup>('sqrtf'); + late final _sqrtf = _sqrtfPtr.asFunction(); - int asprintf( - ffi.Pointer> arg0, - ffi.Pointer arg1, + double sqrt( + double arg0, ) { - return _asprintf( + return _sqrt( 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 _sqrtPtr = + _lookup>('sqrt'); + late final _sqrt = _sqrtPtr.asFunction(); - ffi.Pointer ctermid_r( - ffi.Pointer arg0, + double erff( + double arg0, ) { - return _ctermid_r( + return _erff( 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 _erffPtr = + _lookup>('erff'); + late final _erff = _erffPtr.asFunction(); - ffi.Pointer fgetln( - ffi.Pointer arg0, - ffi.Pointer arg1, + double erf( + double arg0, ) { - return _fgetln( + return _erf( 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 _erfPtr = + _lookup>('erf'); + late final _erf = _erfPtr.asFunction(); - ffi.Pointer fmtcheck( - ffi.Pointer arg0, - ffi.Pointer arg1, + double erfcf( + double arg0, ) { - return _fmtcheck( + return _erfcf( 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 _erfcfPtr = + _lookup>('erfcf'); + late final _erfcf = _erfcfPtr.asFunction(); - int fpurge( - ffi.Pointer arg0, + double erfc( + double arg0, ) { - return _fpurge( + return _erfc( arg0, ); } - late final _fpurgePtr = - _lookup)>>( - 'fpurge'); - late final _fpurge = _fpurgePtr.asFunction)>(); + late final _erfcPtr = + _lookup>('erfc'); + late final _erfc = _erfcPtr.asFunction(); - void setbuffer( - ffi.Pointer arg0, - ffi.Pointer arg1, - int arg2, + double lgammaf( + double arg0, ) { - return _setbuffer( + return _lgammaf( 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 _lgammafPtr = + _lookup>('lgammaf'); + late final _lgammaf = _lgammafPtr.asFunction(); - int setlinebuf( - ffi.Pointer arg0, + double lgamma( + double arg0, ) { - return _setlinebuf( + return _lgamma( arg0, ); } - late final _setlinebufPtr = - _lookup)>>( - 'setlinebuf'); - late final _setlinebuf = - _setlinebufPtr.asFunction)>(); + late final _lgammaPtr = + _lookup>('lgamma'); + late final _lgamma = _lgammaPtr.asFunction(); - int vasprintf( - ffi.Pointer> arg0, - ffi.Pointer arg1, - va_list arg2, + double tgammaf( + double arg0, ) { - return _vasprintf( + return _tgammaf( 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 _tgammafPtr = + _lookup>('tgammaf'); + late final _tgammaf = _tgammafPtr.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, + double tgamma( + double arg0, ) { - return _funopen( + return _tgamma( 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 _tgammaPtr = + _lookup>('tgamma'); + late final _tgamma = _tgammaPtr.asFunction(); - int __sprintf_chk( - ffi.Pointer arg0, - int arg1, - int arg2, - ffi.Pointer arg3, + double ceilf( + double arg0, ) { - return ___sprintf_chk( + return _ceilf( 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 _ceilfPtr = + _lookup>('ceilf'); + late final _ceilf = _ceilfPtr.asFunction(); - int __snprintf_chk( - ffi.Pointer arg0, - int arg1, - int arg2, - int arg3, - ffi.Pointer arg4, + double ceil( + double arg0, ) { - return ___snprintf_chk( + return _ceil( 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 _ceilPtr = + _lookup>('ceil'); + late final _ceil = _ceilPtr.asFunction(); - int __vsprintf_chk( - ffi.Pointer arg0, - int arg1, - int arg2, - ffi.Pointer arg3, - va_list arg4, + double floorf( + double arg0, ) { - return ___vsprintf_chk( + return _floorf( 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 _floorfPtr = + _lookup>('floorf'); + late final _floorf = _floorfPtr.asFunction(); - int __vsnprintf_chk( - ffi.Pointer arg0, - int arg1, - int arg2, - int arg3, - ffi.Pointer arg4, - va_list arg5, + double floor( + double arg0, ) { - return ___vsnprintf_chk( + return _floor( 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 _floorPtr = + _lookup>('floor'); + late final _floor = _floorPtr.asFunction(); - int getpriority( - int arg0, - int arg1, + double nearbyintf( + double arg0, ) { - return _getpriority( + return _nearbyintf( arg0, - arg1, ); } - late final _getpriorityPtr = - _lookup>( - 'getpriority'); - late final _getpriority = - _getpriorityPtr.asFunction(); + late final _nearbyintfPtr = + _lookup>('nearbyintf'); + late final _nearbyintf = _nearbyintfPtr.asFunction(); - int getiopolicy_np( - int arg0, - int arg1, + double nearbyint( + double arg0, ) { - return _getiopolicy_np( + return _nearbyint( arg0, - arg1, ); } - late final _getiopolicy_npPtr = - _lookup>( - 'getiopolicy_np'); - late final _getiopolicy_np = - _getiopolicy_npPtr.asFunction(); + late final _nearbyintPtr = + _lookup>('nearbyint'); + late final _nearbyint = _nearbyintPtr.asFunction(); - int getrlimit( - int arg0, - ffi.Pointer arg1, + double rintf( + double arg0, ) { - return _getrlimit( + return _rintf( arg0, - arg1, ); } - late final _getrlimitPtr = _lookup< - ffi.NativeFunction)>>( - 'getrlimit'); - late final _getrlimit = - _getrlimitPtr.asFunction)>(); + late final _rintfPtr = + _lookup>('rintf'); + late final _rintf = _rintfPtr.asFunction(); - int getrusage( - int arg0, - ffi.Pointer arg1, + double rint( + double arg0, ) { - return _getrusage( + return _rint( arg0, - arg1, ); } - late final _getrusagePtr = _lookup< - ffi.NativeFunction)>>( - 'getrusage'); - late final _getrusage = - _getrusagePtr.asFunction)>(); + late final _rintPtr = + _lookup>('rint'); + late final _rint = _rintPtr.asFunction(); - int setpriority( - int arg0, - int arg1, - int arg2, + int lrintf( + double arg0, ) { - return _setpriority( + return _lrintf( arg0, - arg1, - arg2, ); } - late final _setpriorityPtr = - _lookup>( - 'setpriority'); - late final _setpriority = - _setpriorityPtr.asFunction(); + late final _lrintfPtr = + _lookup>('lrintf'); + late final _lrintf = _lrintfPtr.asFunction(); - int setiopolicy_np( - int arg0, - int arg1, - int arg2, + int lrint( + double arg0, ) { - return _setiopolicy_np( + return _lrint( arg0, - arg1, - arg2, ); } - late final _setiopolicy_npPtr = - _lookup>( - 'setiopolicy_np'); - late final _setiopolicy_np = - _setiopolicy_npPtr.asFunction(); + late final _lrintPtr = + _lookup>('lrint'); + late final _lrint = _lrintPtr.asFunction(); - int setrlimit( - int arg0, - ffi.Pointer arg1, + double roundf( + double arg0, ) { - return _setrlimit( + return _roundf( arg0, - arg1, ); } - late final _setrlimitPtr = _lookup< - ffi.NativeFunction)>>( - 'setrlimit'); - late final _setrlimit = - _setrlimitPtr.asFunction)>(); + late final _roundfPtr = + _lookup>('roundf'); + late final _roundf = _roundfPtr.asFunction(); - int wait1( - ffi.Pointer arg0, + double round( + double arg0, ) { - return _wait1( + return _round( arg0, ); } - late final _wait1Ptr = - _lookup)>>('wait'); - late final _wait1 = - _wait1Ptr.asFunction)>(); + late final _roundPtr = + _lookup>('round'); + late final _round = _roundPtr.asFunction(); - int waitpid( - int arg0, - ffi.Pointer arg1, - int arg2, + int lroundf( + double arg0, ) { - return _waitpid( + return _lroundf( 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 _lroundfPtr = + _lookup>('lroundf'); + late final _lroundf = _lroundfPtr.asFunction(); - int waitid( - int arg0, - int arg1, - ffi.Pointer arg2, - int arg3, + int lround( + double arg0, ) { - return _waitid( + return _lround( 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 _lroundPtr = + _lookup>('lround'); + late final _lround = _lroundPtr.asFunction(); - int wait3( - ffi.Pointer arg0, - int arg1, - ffi.Pointer arg2, + int llrintf( + double arg0, ) { - return _wait3( + return _llrintf( 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 _llrintfPtr = + _lookup>('llrintf'); + late final _llrintf = _llrintfPtr.asFunction(); - int wait4( - int arg0, - ffi.Pointer arg1, - int arg2, - ffi.Pointer arg3, + int llrint( + double arg0, ) { - return _wait4( + return _llrint( 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 _llrintPtr = + _lookup>('llrint'); + late final _llrint = _llrintPtr.asFunction(); - ffi.Pointer alloca( - int arg0, + int llroundf( + double arg0, ) { - return _alloca( + return _llroundf( 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; + late final _llroundfPtr = + _lookup>('llroundf'); + late final _llroundf = _llroundfPtr.asFunction(); - ffi.Pointer malloc( - int __size, + int llround( + double arg0, ) { - return _malloc( - __size, + return _llround( + arg0, ); } - late final _mallocPtr = - _lookup Function(ffi.Size)>>( - 'malloc'); - late final _malloc = - _mallocPtr.asFunction Function(int)>(); + late final _llroundPtr = + _lookup>('llround'); + late final _llround = _llroundPtr.asFunction(); - ffi.Pointer calloc( - int __count, - int __size, + double truncf( + double arg0, ) { - return _calloc( - __count, - __size, + return _truncf( + arg0, ); } - late final _callocPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Size, ffi.Size)>>('calloc'); - late final _calloc = - _callocPtr.asFunction Function(int, int)>(); + late final _truncfPtr = + _lookup>('truncf'); + late final _truncf = _truncfPtr.asFunction(); - void free( - ffi.Pointer arg0, + double trunc( + double arg0, ) { - return _free( + return _trunc( arg0, ); } - late final _freePtr = - _lookup)>>( - 'free'); - late final _free = - _freePtr.asFunction)>(); + late final _truncPtr = + _lookup>('trunc'); + late final _trunc = _truncPtr.asFunction(); - ffi.Pointer realloc( - ffi.Pointer __ptr, - int __size, + double fmodf( + double arg0, + double arg1, ) { - return _realloc( - __ptr, - __size, + return _fmodf( + arg0, + arg1, ); } - late final _reallocPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Size)>>('realloc'); - late final _realloc = _reallocPtr - .asFunction Function(ffi.Pointer, int)>(); + late final _fmodfPtr = + _lookup>( + 'fmodf'); + late final _fmodf = _fmodfPtr.asFunction(); - ffi.Pointer valloc( - int arg0, + double fmod( + double arg0, + double arg1, ) { - return _valloc( + return _fmod( arg0, + arg1, ); } - late final _vallocPtr = - _lookup Function(ffi.Size)>>( - 'valloc'); - late final _valloc = - _vallocPtr.asFunction Function(int)>(); + late final _fmodPtr = + _lookup>( + 'fmod'); + late final _fmod = _fmodPtr.asFunction(); - ffi.Pointer aligned_alloc( - int __alignment, - int __size, + double remainderf( + double arg0, + double arg1, ) { - return _aligned_alloc( - __alignment, - __size, + return _remainderf( + arg0, + arg1, ); } - 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 _remainderfPtr = + _lookup>( + 'remainderf'); + late final _remainderf = + _remainderfPtr.asFunction(); - int posix_memalign( - ffi.Pointer> __memptr, - int __alignment, - int __size, + double remainder( + double arg0, + double arg1, ) { - return _posix_memalign( - __memptr, - __alignment, - __size, + return _remainder( + arg0, + arg1, ); } - 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(); + late final _remainderPtr = + _lookup>( + 'remainder'); + late final _remainder = + _remainderPtr.asFunction(); - int abs( - int arg0, + double remquof( + double arg0, + double arg1, + ffi.Pointer arg2, ) { - return _abs( + return _remquof( arg0, + arg1, + arg2, ); } - late final _absPtr = - _lookup>('abs'); - late final _abs = _absPtr.asFunction(); + late final _remquofPtr = _lookup< + ffi.NativeFunction< + ffi.Float Function( + ffi.Float, ffi.Float, ffi.Pointer)>>('remquof'); + late final _remquof = _remquofPtr + .asFunction)>(); - int atexit( - ffi.Pointer> arg0, + double remquo( + double arg0, + double arg1, + ffi.Pointer arg2, ) { - return _atexit( + return _remquo( arg0, + arg1, + arg2, ); } - late final _atexitPtr = _lookup< + late final _remquoPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer>)>>('atexit'); - late final _atexit = _atexitPtr.asFunction< - int Function(ffi.Pointer>)>(); + ffi.Double Function( + ffi.Double, ffi.Double, ffi.Pointer)>>('remquo'); + late final _remquo = _remquoPtr + .asFunction)>(); - double atof( - ffi.Pointer arg0, + double copysignf( + double arg0, + double arg1, ) { - return _atof( + return _copysignf( arg0, + arg1, ); } - late final _atofPtr = - _lookup)>>( - 'atof'); - late final _atof = - _atofPtr.asFunction)>(); + late final _copysignfPtr = + _lookup>( + 'copysignf'); + late final _copysignf = + _copysignfPtr.asFunction(); - int atoi( - ffi.Pointer arg0, + double copysign( + double arg0, + double arg1, ) { - return _atoi( + return _copysign( arg0, + arg1, ); } - late final _atoiPtr = - _lookup)>>( - 'atoi'); - late final _atoi = _atoiPtr.asFunction)>(); + late final _copysignPtr = + _lookup>( + 'copysign'); + late final _copysign = + _copysignPtr.asFunction(); - int atol( + double nanf( ffi.Pointer arg0, ) { - return _atol( + return _nanf( arg0, ); } - late final _atolPtr = - _lookup)>>( - 'atol'); - late final _atol = _atolPtr.asFunction)>(); + late final _nanfPtr = + _lookup)>>( + 'nanf'); + late final _nanf = + _nanfPtr.asFunction)>(); - int atoll( + double nan( ffi.Pointer arg0, ) { - return _atoll( + return _nan( arg0, ); } - late final _atollPtr = - _lookup)>>( - 'atoll'); - late final _atoll = - _atollPtr.asFunction)>(); + late final _nanPtr = + _lookup)>>( + 'nan'); + late final _nan = + _nanPtr.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, + double nextafterf( + double arg0, + double arg1, ) { - return _bsearch( - __key, - __base, - __nel, - __width, - __compar, + return _nextafterf( + arg0, + arg1, ); } - 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 _nextafterfPtr = + _lookup>( + 'nextafterf'); + late final _nextafterf = + _nextafterfPtr.asFunction(); - div_t div( - int arg0, - int arg1, + double nextafter( + double arg0, + double arg1, ) { - return _div( + return _nextafter( arg0, arg1, ); } - late final _divPtr = - _lookup>('div'); - late final _div = _divPtr.asFunction(); + late final _nextafterPtr = + _lookup>( + 'nextafter'); + late final _nextafter = + _nextafterPtr.asFunction(); - void exit( - int arg0, + double fdimf( + double arg0, + double arg1, ) { - return _exit1( + return _fdimf( arg0, + arg1, ); } - late final _exitPtr = - _lookup>('exit'); - late final _exit1 = _exitPtr.asFunction(); + late final _fdimfPtr = + _lookup>( + 'fdimf'); + late final _fdimf = _fdimfPtr.asFunction(); - ffi.Pointer getenv( - ffi.Pointer arg0, + double fdim( + double arg0, + double arg1, ) { - return _getenv( + return _fdim( arg0, + arg1, ); } - late final _getenvPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('getenv'); - late final _getenv = _getenvPtr - .asFunction Function(ffi.Pointer)>(); + late final _fdimPtr = + _lookup>( + 'fdim'); + late final _fdim = _fdimPtr.asFunction(); - int labs( - int arg0, + double fmaxf( + double arg0, + double arg1, ) { - return _labs( + return _fmaxf( arg0, + arg1, ); } - late final _labsPtr = - _lookup>('labs'); - late final _labs = _labsPtr.asFunction(); + late final _fmaxfPtr = + _lookup>( + 'fmaxf'); + late final _fmaxf = _fmaxfPtr.asFunction(); - ldiv_t ldiv( - int arg0, - int arg1, + double fmax( + double arg0, + double arg1, ) { - return _ldiv( + return _fmax( arg0, arg1, ); } - late final _ldivPtr = - _lookup>('ldiv'); - late final _ldiv = _ldivPtr.asFunction(); + late final _fmaxPtr = + _lookup>( + 'fmax'); + late final _fmax = _fmaxPtr.asFunction(); - int llabs( - int arg0, + double fminf( + double arg0, + double arg1, ) { - return _llabs( + return _fminf( arg0, + arg1, ); } - late final _llabsPtr = - _lookup>('llabs'); - late final _llabs = _llabsPtr.asFunction(); + late final _fminfPtr = + _lookup>( + 'fminf'); + late final _fminf = _fminfPtr.asFunction(); - lldiv_t lldiv( - int arg0, - int arg1, + double fmin( + double arg0, + double arg1, ) { - return _lldiv( + return _fmin( arg0, arg1, ); } - late final _lldivPtr = - _lookup>( - 'lldiv'); - late final _lldiv = _lldivPtr.asFunction(); + late final _fminPtr = + _lookup>( + 'fmin'); + late final _fmin = _fminPtr.asFunction(); - int mblen( - ffi.Pointer __s, - int __n, + double fmaf( + double arg0, + double arg1, + double arg2, ) { - return _mblen( - __s, - __n, + return _fmaf( + arg0, + arg1, + arg2, ); } - late final _mblenPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Size)>>('mblen'); - late final _mblen = - _mblenPtr.asFunction, int)>(); + late final _fmafPtr = _lookup< + ffi + .NativeFunction>( + 'fmaf'); + late final _fmaf = + _fmafPtr.asFunction(); - int mbstowcs( - ffi.Pointer arg0, - ffi.Pointer arg1, - int arg2, + double fma( + double arg0, + double arg1, + double arg2, ) { - return _mbstowcs( + return _fma( arg0, arg1, arg2, ); } - late final _mbstowcsPtr = _lookup< + late final _fmaPtr = _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.Double Function(ffi.Double, ffi.Double, ffi.Double)>>('fma'); + late final _fma = + _fmaPtr.asFunction(); - int mbtowc( - ffi.Pointer arg0, - ffi.Pointer arg1, - int arg2, + double __exp10f( + double arg0, ) { - return _mbtowc( + return ___exp10f( 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 ___exp10fPtr = + _lookup>('__exp10f'); + late final ___exp10f = ___exp10fPtr.asFunction(); - void qsort( - ffi.Pointer __base, - int __nel, - int __width, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer)>> - __compar, + double __exp10( + double arg0, ) { - return _qsort( - __base, - __nel, - __width, - __compar, + return ___exp10( + arg0, ); } - 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(); + late final ___exp10Ptr = + _lookup>('__exp10'); + late final ___exp10 = ___exp10Ptr.asFunction(); - void srand( - int arg0, + double __cospif( + double arg0, ) { - return _srand( + return ___cospif( arg0, ); } - late final _srandPtr = - _lookup>('srand'); - late final _srand = _srandPtr.asFunction(); + late final ___cospifPtr = + _lookup>('__cospif'); + late final ___cospif = ___cospifPtr.asFunction(); - double strtod( - ffi.Pointer arg0, - ffi.Pointer> arg1, + double __cospi( + double arg0, ) { - return _strtod( + return ___cospi( 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 ___cospiPtr = + _lookup>('__cospi'); + late final ___cospi = ___cospiPtr.asFunction(); - double strtof( - ffi.Pointer arg0, - ffi.Pointer> arg1, + double __sinpif( + double arg0, ) { - return _strtof( + return ___sinpif( 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 ___sinpifPtr = + _lookup>('__sinpif'); + late final ___sinpif = ___sinpifPtr.asFunction(); - int strtol( - ffi.Pointer __str, - ffi.Pointer> __endptr, - int __base, + double __sinpi( + double arg0, ) { - return _strtol( - __str, - __endptr, - __base, + return ___sinpi( + arg0, ); } - 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 ___sinpiPtr = + _lookup>('__sinpi'); + late final ___sinpi = ___sinpiPtr.asFunction(); - int strtoll( - ffi.Pointer __str, - ffi.Pointer> __endptr, - int __base, + double __tanpif( + double arg0, ) { - return _strtoll( - __str, - __endptr, - __base, + return ___tanpif( + 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 ___tanpifPtr = + _lookup>('__tanpif'); + late final ___tanpif = ___tanpifPtr.asFunction(); - int strtoul( - ffi.Pointer __str, - ffi.Pointer> __endptr, - int __base, + double __tanpi( + double arg0, ) { - return _strtoul( - __str, - __endptr, - __base, + return ___tanpi( + arg0, ); } - 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)>(); + late final ___tanpiPtr = + _lookup>('__tanpi'); + late final ___tanpi = ___tanpiPtr.asFunction(); - int strtoull( - ffi.Pointer __str, - ffi.Pointer> __endptr, - int __base, + __float2 __sincosf_stret( + double arg0, ) { - return _strtoull( - __str, - __endptr, - __base, + return ___sincosf_stret( + arg0, ); } - 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 ___sincosf_stretPtr = + _lookup>( + '__sincosf_stret'); + late final ___sincosf_stret = + ___sincosf_stretPtr.asFunction<__float2 Function(double)>(); - int system( - ffi.Pointer arg0, + __double2 __sincos_stret( + double arg0, ) { - return _system( + return ___sincos_stret( arg0, ); } - late final _systemPtr = - _lookup)>>( - 'system'); - late final _system = - _systemPtr.asFunction)>(); + late final ___sincos_stretPtr = + _lookup>( + '__sincos_stret'); + late final ___sincos_stret = + ___sincos_stretPtr.asFunction<__double2 Function(double)>(); - int wcstombs( - ffi.Pointer arg0, - ffi.Pointer arg1, - int arg2, + __float2 __sincospif_stret( + double arg0, ) { - return _wcstombs( + return ___sincospif_stret( 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 ___sincospif_stretPtr = + _lookup>( + '__sincospif_stret'); + late final ___sincospif_stret = + ___sincospif_stretPtr.asFunction<__float2 Function(double)>(); - int wctomb( - ffi.Pointer arg0, - int arg1, + __double2 __sincospi_stret( + double arg0, ) { - return _wctomb( + return ___sincospi_stret( arg0, - arg1, ); } - late final _wctombPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.WChar)>>('wctomb'); - late final _wctomb = - _wctombPtr.asFunction, int)>(); + late final ___sincospi_stretPtr = + _lookup>( + '__sincospi_stret'); + late final ___sincospi_stret = + ___sincospi_stretPtr.asFunction<__double2 Function(double)>(); - void _Exit( - int arg0, + double j0( + double arg0, ) { - return __Exit( + return _j0( arg0, ); } - late final __ExitPtr = - _lookup>('_Exit'); - late final __Exit = __ExitPtr.asFunction(); + late final _j0Ptr = + _lookup>('j0'); + late final _j0 = _j0Ptr.asFunction(); - int a64l( - ffi.Pointer arg0, + double j1( + double arg0, ) { - return _a64l( + return _j1( 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(); + late final _j1Ptr = + _lookup>('j1'); + late final _j1 = _j1Ptr.asFunction(); - ffi.Pointer ecvt( - double arg0, - int arg1, - ffi.Pointer arg2, - ffi.Pointer arg3, + double jn( + int arg0, + double arg1, ) { - return _ecvt( + return _jn( 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)>(); + late final _jnPtr = + _lookup>( + 'jn'); + late final _jn = _jnPtr.asFunction(); - double erand48( - ffi.Pointer arg0, + double y0( + double arg0, ) { - return _erand48( + return _y0( arg0, ); } - late final _erand48Ptr = _lookup< - ffi.NativeFunction< - ffi.Double Function(ffi.Pointer)>>('erand48'); - late final _erand48 = - _erand48Ptr.asFunction)>(); + late final _y0Ptr = + _lookup>('y0'); + late final _y0 = _y0Ptr.asFunction(); - ffi.Pointer fcvt( + double y1( double arg0, - int arg1, - ffi.Pointer arg2, - ffi.Pointer arg3, ) { - return _fcvt( + return _y1( 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 _y1Ptr = + _lookup>('y1'); + late final _y1 = _y1Ptr.asFunction(); - ffi.Pointer gcvt( - double arg0, - int arg1, - ffi.Pointer arg2, + double yn( + int arg0, + double arg1, ) { - return _gcvt( + return _yn( 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 _ynPtr = + _lookup>( + 'yn'); + late final _yn = _ynPtr.asFunction(); - int getsubopt( - ffi.Pointer> arg0, - ffi.Pointer> arg1, - ffi.Pointer> arg2, + double scalb( + double arg0, + double arg1, ) { - return _getsubopt( + return _scalb( 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 _scalbPtr = + _lookup>( + 'scalb'); + late final _scalb = _scalbPtr.asFunction(); - int grantpt( - int 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 _grantpt( + return _setjmp1( arg0, ); } - late final _grantptPtr = - _lookup>('grantpt'); - late final _grantpt = _grantptPtr.asFunction(); + late final _setjmpPtr = + _lookup)>>( + 'setjmp'); + late final _setjmp1 = + _setjmpPtr.asFunction)>(); - ffi.Pointer initstate( - int arg0, - ffi.Pointer arg1, - int arg2, + void longjmp( + ffi.Pointer arg0, + int arg1, ) { - return _initstate( + return _longjmp1( 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 _longjmpPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'longjmp'); + late final _longjmp1 = + _longjmpPtr.asFunction, int)>(); - int jrand48( - ffi.Pointer arg0, + int _setjmp( + ffi.Pointer arg0, ) { - return _jrand48( + return __setjmp( arg0, ); } - late final _jrand48Ptr = _lookup< - ffi.NativeFunction< - ffi.Long Function(ffi.Pointer)>>('jrand48'); - late final _jrand48 = - _jrand48Ptr.asFunction)>(); + late final __setjmpPtr = + _lookup)>>( + '_setjmp'); + late final __setjmp = + __setjmpPtr.asFunction)>(); - ffi.Pointer l64a( - int arg0, + void _longjmp( + ffi.Pointer arg0, + int arg1, ) { - return _l64a( + return __longjmp( arg0, + arg1, ); } - late final _l64aPtr = - _lookup Function(ffi.Long)>>( - 'l64a'); - late final _l64a = _l64aPtr.asFunction Function(int)>(); + late final __longjmpPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + '_longjmp'); + late final __longjmp = + __longjmpPtr.asFunction, int)>(); - void lcong48( - ffi.Pointer arg0, + int sigsetjmp( + ffi.Pointer arg0, + int arg1, ) { - return _lcong48( + return _sigsetjmp( arg0, + arg1, ); } - 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 _sigsetjmpPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'sigsetjmp'); + late final _sigsetjmp = + _sigsetjmpPtr.asFunction, int)>(); - ffi.Pointer mktemp( - ffi.Pointer arg0, + void siglongjmp( + ffi.Pointer arg0, + int arg1, ) { - return _mktemp( + return _siglongjmp( arg0, + arg1, ); } - late final _mktempPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('mktemp'); - late final _mktemp = _mktempPtr - .asFunction Function(ffi.Pointer)>(); + late final _siglongjmpPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'siglongjmp'); + late final _siglongjmp = + _siglongjmpPtr.asFunction, int)>(); - int mkstemp( - ffi.Pointer arg0, - ) { - return _mkstemp( - arg0, - ); + void longjmperror() { + return _longjmperror(); } - late final _mkstempPtr = - _lookup)>>( - 'mkstemp'); - late final _mkstemp = - _mkstempPtr.asFunction)>(); + late final _longjmperrorPtr = + _lookup>('longjmperror'); + late final _longjmperror = _longjmperrorPtr.asFunction(); - int mrand48() { - return _mrand48(); - } + late final ffi.Pointer>> _sys_signame = + _lookup>>('sys_signame'); - late final _mrand48Ptr = - _lookup>('mrand48'); - late final _mrand48 = _mrand48Ptr.asFunction(); + ffi.Pointer> get sys_signame => _sys_signame.value; - int nrand48( - ffi.Pointer arg0, - ) { - return _nrand48( - arg0, - ); - } + set sys_signame(ffi.Pointer> value) => + _sys_signame.value = value; - late final _nrand48Ptr = _lookup< - ffi.NativeFunction< - ffi.Long Function(ffi.Pointer)>>('nrand48'); - late final _nrand48 = - _nrand48Ptr.asFunction)>(); + late final ffi.Pointer>> _sys_siglist = + _lookup>>('sys_siglist'); - int posix_openpt( + ffi.Pointer> get sys_siglist => _sys_siglist.value; + + set sys_siglist(ffi.Pointer> value) => + _sys_siglist.value = value; + + int raise( int arg0, ) { - return _posix_openpt( + return _raise( arg0, ); } - late final _posix_openptPtr = - _lookup>('posix_openpt'); - late final _posix_openpt = _posix_openptPtr.asFunction(); + late final _raisePtr = + _lookup>('raise'); + late final _raise = _raisePtr.asFunction(); - ffi.Pointer ptsname( + ffi.Pointer> bsd_signal( int arg0, + ffi.Pointer> arg1, ) { - return _ptsname( + return _bsd_signal( arg0, + arg1, ); } - late final _ptsnamePtr = - _lookup Function(ffi.Int)>>( - 'ptsname'); - late final _ptsname = - _ptsnamePtr.asFunction Function(int)>(); + late final _bsd_signalPtr = _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>)>(); - int ptsname_r( - int fildes, - ffi.Pointer buffer, - int buflen, + int kill( + int arg0, + int arg1, ) { - return _ptsname_r( - fildes, - buffer, - buflen, + return _kill( + arg0, + arg1, ); } - 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)>(); + late final _killPtr = + _lookup>('kill'); + late final _kill = _killPtr.asFunction(); - int putenv( - ffi.Pointer arg0, + int killpg( + int arg0, + int arg1, ) { - return _putenv( + return _killpg( arg0, + arg1, ); } - late final _putenvPtr = - _lookup)>>( - 'putenv'); - late final _putenv = - _putenvPtr.asFunction)>(); + late final _killpgPtr = + _lookup>('killpg'); + late final _killpg = _killpgPtr.asFunction(); - int random() { - return _random(); + int pthread_kill( + pthread_t arg0, + int arg1, + ) { + return _pthread_kill( + arg0, + arg1, + ); } - late final _randomPtr = - _lookup>('random'); - late final _random = _randomPtr.asFunction(); + late final _pthread_killPtr = + _lookup>( + 'pthread_kill'); + late final _pthread_kill = + _pthread_killPtr.asFunction(); - int rand_r( - ffi.Pointer arg0, + int pthread_sigmask( + int arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, ) { - return _rand_r( + return _pthread_sigmask( arg0, + arg1, + arg2, ); } - late final _rand_rPtr = _lookup< - ffi.NativeFunction)>>( - 'rand_r'); - late final _rand_r = - _rand_rPtr.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)>(); - ffi.Pointer realpath( - ffi.Pointer arg0, - ffi.Pointer arg1, + int sigaction1( + int arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, ) { - return _realpath( + return _sigaction1( arg0, arg1, + arg2, ); } - late final _realpathPtr = _lookup< + late final _sigaction1Ptr = _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)>>('sigaction'); + late final _sigaction1 = _sigaction1Ptr.asFunction< + int Function(int, ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer seed48( - ffi.Pointer arg0, + int sigaddset( + ffi.Pointer arg0, + int arg1, ) { - return _seed48( + return _sigaddset( arg0, + arg1, ); } - late final _seed48Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('seed48'); - late final _seed48 = _seed48Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer)>(); + late final _sigaddsetPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'sigaddset'); + late final _sigaddset = + _sigaddsetPtr.asFunction, int)>(); - int setenv( - ffi.Pointer __name, - ffi.Pointer __value, - int __overwrite, + int sigaltstack( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _setenv( - __name, - __value, - __overwrite, + return _sigaltstack( + arg0, + arg1, ); } - late final _setenvPtr = _lookup< + late final _sigaltstackPtr = _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.Int Function( + ffi.Pointer, ffi.Pointer)>>('sigaltstack'); + late final _sigaltstack = _sigaltstackPtr + .asFunction, ffi.Pointer)>(); - void setkey( - ffi.Pointer arg0, + int sigdelset( + ffi.Pointer arg0, + int arg1, ) { - return _setkey( + return _sigdelset( arg0, + arg1, ); } - late final _setkeyPtr = - _lookup)>>( - 'setkey'); - late final _setkey = - _setkeyPtr.asFunction)>(); + late final _sigdelsetPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'sigdelset'); + late final _sigdelset = + _sigdelsetPtr.asFunction, int)>(); - ffi.Pointer setstate( - ffi.Pointer arg0, + int sigemptyset( + ffi.Pointer arg0, ) { - return _setstate( + return _sigemptyset( arg0, ); } - late final _setstatePtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('setstate'); - late final _setstate = _setstatePtr - .asFunction Function(ffi.Pointer)>(); + late final _sigemptysetPtr = + _lookup)>>( + 'sigemptyset'); + late final _sigemptyset = + _sigemptysetPtr.asFunction)>(); - void srand48( - int arg0, + int sigfillset( + ffi.Pointer arg0, ) { - return _srand48( + return _sigfillset( arg0, ); } - late final _srand48Ptr = - _lookup>('srand48'); - late final _srand48 = _srand48Ptr.asFunction(); + late final _sigfillsetPtr = + _lookup)>>( + 'sigfillset'); + late final _sigfillset = + _sigfillsetPtr.asFunction)>(); - void srandom( + int sighold( int arg0, ) { - return _srandom( + return _sighold( arg0, ); } - late final _srandomPtr = - _lookup>( - 'srandom'); - late final _srandom = _srandomPtr.asFunction(); + late final _sigholdPtr = + _lookup>('sighold'); + late final _sighold = _sigholdPtr.asFunction(); - int unlockpt( + int sigignore( int arg0, ) { - return _unlockpt( + return _sigignore( arg0, ); } - late final _unlockptPtr = - _lookup>('unlockpt'); - late final _unlockpt = _unlockptPtr.asFunction(); + late final _sigignorePtr = + _lookup>('sigignore'); + late final _sigignore = _sigignorePtr.asFunction(); - int unsetenv( - ffi.Pointer arg0, + int siginterrupt( + int arg0, + int arg1, ) { - return _unsetenv( + return _siginterrupt( arg0, + arg1, ); } - late final _unsetenvPtr = - _lookup)>>( - 'unsetenv'); - late final _unsetenv = - _unsetenvPtr.asFunction)>(); - - int arc4random() { - return _arc4random(); - } - - late final _arc4randomPtr = - _lookup>('arc4random'); - late final _arc4random = _arc4randomPtr.asFunction(); + late final _siginterruptPtr = + _lookup>( + 'siginterrupt'); + late final _siginterrupt = + _siginterruptPtr.asFunction(); - void arc4random_addrandom( - ffi.Pointer arg0, + int sigismember( + ffi.Pointer arg0, int arg1, ) { - return _arc4random_addrandom( + return _sigismember( 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 _sigismemberPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'sigismember'); + late final _sigismember = + _sigismemberPtr.asFunction, int)>(); - void arc4random_buf( - ffi.Pointer __buf, - int __nbytes, + int sigpause( + int arg0, ) { - return _arc4random_buf( - __buf, - __nbytes, + return _sigpause( + 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)>(); - - void arc4random_stir() { - return _arc4random_stir(); - } - - late final _arc4random_stirPtr = - _lookup>('arc4random_stir'); - late final _arc4random_stir = - _arc4random_stirPtr.asFunction(); + late final _sigpausePtr = + _lookup>('sigpause'); + late final _sigpause = _sigpausePtr.asFunction(); - int arc4random_uniform( - int __upper_bound, + int sigpending( + ffi.Pointer arg0, ) { - return _arc4random_uniform( - __upper_bound, + return _sigpending( + arg0, ); } - late final _arc4random_uniformPtr = - _lookup>( - 'arc4random_uniform'); - late final _arc4random_uniform = - _arc4random_uniformPtr.asFunction(); + late final _sigpendingPtr = + _lookup)>>( + 'sigpending'); + late final _sigpending = + _sigpendingPtr.asFunction)>(); - int atexit_b( - ffi.Pointer<_ObjCBlock> arg0, + int sigprocmask( + int arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, ) { - return _atexit_b( + return _sigprocmask( arg0, + arg1, + arg2, ); } - late final _atexit_bPtr = - _lookup)>>( - 'atexit_b'); - late final _atexit_b = - _atexit_bPtr.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)>(); - ffi.Pointer bsearch_b( - ffi.Pointer __key, - ffi.Pointer __base, - int __nel, - int __width, - ffi.Pointer<_ObjCBlock> __compar, + int sigrelse( + int arg0, ) { - return _bsearch_b( - __key, - __base, - __nel, - __width, - __compar, + return _sigrelse( + 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 _sigrelsePtr = + _lookup>('sigrelse'); + late final _sigrelse = _sigrelsePtr.asFunction(); - ffi.Pointer cgetcap( - ffi.Pointer arg0, - ffi.Pointer arg1, - int arg2, + ffi.Pointer> sigset( + int arg0, + ffi.Pointer> arg1, ) { - return _cgetcap( + return _sigset( arg0, arg1, - arg2, ); } - late final _cgetcapPtr = _lookup< + late final _sigsetPtr = _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)>(); + ffi.Pointer> Function( + ffi.Int, + ffi.Pointer< + ffi.NativeFunction>)>>('sigset'); + late final _sigset = _sigsetPtr.asFunction< + ffi.Pointer> Function( + int, ffi.Pointer>)>(); - int cgetclose() { - return _cgetclose(); + int sigsuspend( + ffi.Pointer arg0, + ) { + return _sigsuspend( + arg0, + ); } - late final _cgetclosePtr = - _lookup>('cgetclose'); - late final _cgetclose = _cgetclosePtr.asFunction(); + late final _sigsuspendPtr = + _lookup)>>( + 'sigsuspend'); + late final _sigsuspend = + _sigsuspendPtr.asFunction)>(); - int cgetent( - ffi.Pointer> arg0, - ffi.Pointer> arg1, - ffi.Pointer arg2, + int sigwait( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _cgetent( + return _sigwait( arg0, arg1, - arg2, ); } - late final _cgetentPtr = _lookup< + late final _sigwaitPtr = _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, ffi.Pointer)>>('sigwait'); + late final _sigwait = _sigwaitPtr + .asFunction, ffi.Pointer)>(); - int cgetfirst( - ffi.Pointer> arg0, - ffi.Pointer> arg1, + void psignal( + int arg0, + ffi.Pointer arg1, ) { - return _cgetfirst( + return _psignal( arg0, arg1, ); } - late final _cgetfirstPtr = _lookup< + late final _psignalPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer>, - ffi.Pointer>)>>('cgetfirst'); - late final _cgetfirst = _cgetfirstPtr.asFunction< - int Function(ffi.Pointer>, - ffi.Pointer>)>(); + ffi.Void Function( + ffi.UnsignedInt, ffi.Pointer)>>('psignal'); + late final _psignal = + _psignalPtr.asFunction)>(); - int cgetmatch( - ffi.Pointer arg0, - ffi.Pointer arg1, + int sigblock( + int arg0, ) { - return _cgetmatch( + return _sigblock( arg0, - arg1, ); } - late final _cgetmatchPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('cgetmatch'); - late final _cgetmatch = _cgetmatchPtr - .asFunction, ffi.Pointer)>(); + late final _sigblockPtr = + _lookup>('sigblock'); + late final _sigblock = _sigblockPtr.asFunction(); - int cgetnext( - ffi.Pointer> arg0, - ffi.Pointer> arg1, + int sigsetmask( + int arg0, ) { - return _cgetnext( + return _sigsetmask( 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 _sigsetmaskPtr = + _lookup>('sigsetmask'); + late final _sigsetmask = _sigsetmaskPtr.asFunction(); - int cgetnum( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, + int sigvec1( + int arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, ) { - return _cgetnum( + return _sigvec1( arg0, arg1, arg2, ); } - late final _cgetnumPtr = _lookup< + late final _sigvec1Ptr = _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.Int, ffi.Pointer, ffi.Pointer)>>('sigvec'); + late final _sigvec1 = _sigvec1Ptr.asFunction< + int Function(int, ffi.Pointer, ffi.Pointer)>(); - int cgetset( - ffi.Pointer arg0, + int renameat( + int arg0, + ffi.Pointer arg1, + int arg2, + ffi.Pointer arg3, ) { - return _cgetset( + return _renameat( arg0, + arg1, + arg2, + arg3, ); } - late final _cgetsetPtr = - _lookup)>>( - 'cgetset'); - late final _cgetset = - _cgetsetPtr.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 cgetstr( + int renamex_np( ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer> arg2, + int arg2, ) { - return _cgetstr( + return _renamex_np( arg0, arg1, arg2, ); } - late final _cgetstrPtr = _lookup< + late final _renamex_npPtr = _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.UnsignedInt)>>('renamex_np'); + late final _renamex_np = _renamex_npPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); - int cgetustr( - ffi.Pointer arg0, + int renameatx_np( + int arg0, ffi.Pointer arg1, - ffi.Pointer> arg2, + int arg2, + ffi.Pointer arg3, + int arg4, ) { - return _cgetustr( + return _renameatx_np( arg0, arg1, arg2, + arg3, + arg4, ); } - late final _cgetustrPtr = _lookup< + late final _renameatx_npPtr = _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.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)>(); - int daemon( - int arg0, - int 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 _daemon( + return _clearerr( arg0, - arg1, ); } - late final _daemonPtr = - _lookup>('daemon'); - late final _daemon = _daemonPtr.asFunction(); + late final _clearerrPtr = + _lookup)>>( + 'clearerr'); + late final _clearerr = + _clearerrPtr.asFunction)>(); - ffi.Pointer devname( - int arg0, - int arg1, + int fclose( + ffi.Pointer arg0, ) { - return _devname( + return _fclose( arg0, - arg1, ); } - late final _devnamePtr = _lookup< - ffi.NativeFunction Function(dev_t, mode_t)>>( - 'devname'); - late final _devname = - _devnamePtr.asFunction Function(int, int)>(); + late final _fclosePtr = + _lookup)>>( + 'fclose'); + late final _fclose = _fclosePtr.asFunction)>(); - ffi.Pointer devname_r( - int arg0, - int arg1, - ffi.Pointer buf, - int len, + int feof( + ffi.Pointer arg0, ) { - return _devname_r( + 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, - buf, - len, ); } - late final _devname_rPtr = _lookup< + late final _fgetposPtr = _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.Int Function(ffi.Pointer, ffi.Pointer)>>('fgetpos'); + late final _fgetpos = _fgetposPtr + .asFunction, ffi.Pointer)>(); - ffi.Pointer getbsize( - ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer fgets( + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2, ) { - return _getbsize( + return _fgets( arg0, arg1, + arg2, ); } - late final _getbsizePtr = _lookup< + late final _fgetsPtr = _lookup< ffi.NativeFunction< ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('getbsize'); - late final _getbsize = _getbsizePtr.asFunction< + ffi.Pointer, ffi.Int, ffi.Pointer)>>('fgets'); + late final _fgets = _fgetsPtr.asFunction< ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer, int, ffi.Pointer)>(); - int getloadavg( - ffi.Pointer arg0, - int arg1, + ffi.Pointer fopen( + ffi.Pointer __filename, + ffi.Pointer __mode, ) { - return _getloadavg( + 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 _getloadavgPtr = _lookup< + late final _fprintfPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int)>>('getloadavg'); - late final _getloadavg = - _getloadavgPtr.asFunction, int)>(); + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('fprintf'); + late final _fprintf = _fprintfPtr + .asFunction, ffi.Pointer)>(); - ffi.Pointer getprogname() { - return _getprogname(); + int fputc( + int arg0, + ffi.Pointer arg1, + ) { + return _fputc( + arg0, + arg1, + ); } - late final _getprognamePtr = - _lookup Function()>>( - 'getprogname'); - late final _getprogname = - _getprognamePtr.asFunction Function()>(); + late final _fputcPtr = + _lookup)>>( + 'fputc'); + late final _fputc = + _fputcPtr.asFunction)>(); - void setprogname( + int fputs( ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _setprogname( + return _fputs( arg0, + arg1, ); } - late final _setprognamePtr = - _lookup)>>( - 'setprogname'); - late final _setprogname = - _setprognamePtr.asFunction)>(); + late final _fputsPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer)>>('fputs'); + late final _fputs = _fputsPtr + .asFunction, ffi.Pointer)>(); - int heapsort( - ffi.Pointer __base, - int __nel, - int __width, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer)>> - __compar, + int fread( + ffi.Pointer __ptr, + int __size, + int __nitems, + ffi.Pointer __stream, ) { - return _heapsort( - __base, - __nel, - __width, - __compar, + return _fread( + __ptr, + __size, + __nitems, + __stream, ); } - late final _heapsortPtr = _lookup< + late final _freadPtr = _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.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 heapsort_b( - ffi.Pointer __base, - int __nel, - int __width, - ffi.Pointer<_ObjCBlock> __compar, + ffi.Pointer freopen( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, ) { - return _heapsort_b( - __base, - __nel, - __width, - __compar, + return _freopen( + arg0, + arg1, + arg2, ); } - late final _heapsort_bPtr = _lookup< + late final _freopenPtr = _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)>>('freopen'); + late final _freopen = _freopenPtr.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, + int fscanf( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _mergesort( - __base, - __nel, - __width, - __compar, + return _fscanf( + arg0, + arg1, ); } - late final _mergesortPtr = _lookup< + late final _fscanfPtr = _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, ffi.Pointer)>>('fscanf'); + late final _fscanf = _fscanfPtr + .asFunction, ffi.Pointer)>(); - int mergesort_b( - ffi.Pointer __base, - int __nel, - int __width, - ffi.Pointer<_ObjCBlock> __compar, + int fseek( + ffi.Pointer arg0, + int arg1, + int arg2, ) { - return _mergesort_b( - __base, - __nel, - __width, - __compar, + return _fseek( + arg0, + arg1, + arg2, ); } - late final _mergesort_bPtr = _lookup< + late final _fseekPtr = _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.Int Function(ffi.Pointer, ffi.Long, ffi.Int)>>('fseek'); + late final _fseek = + _fseekPtr.asFunction, int, int)>(); - void psort( - ffi.Pointer __base, - int __nel, - int __width, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer)>> - __compar, + int fsetpos( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _psort( - __base, - __nel, - __width, - __compar, + return _fsetpos( + arg0, + arg1, ); } - late final _psortPtr = _lookup< + late final _fsetposPtr = _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.Int Function(ffi.Pointer, ffi.Pointer)>>('fsetpos'); + late final _fsetpos = _fsetposPtr + .asFunction, ffi.Pointer)>(); - void psort_b( - ffi.Pointer __base, - int __nel, - int __width, - ffi.Pointer<_ObjCBlock> __compar, + int ftell( + ffi.Pointer arg0, ) { - return _psort_b( - __base, - __nel, - __width, - __compar, + return _ftell( + 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 _ftellPtr = + _lookup)>>( + 'ftell'); + late final _ftell = _ftellPtr.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 fwrite( + ffi.Pointer __ptr, + int __size, + int __nitems, + ffi.Pointer __stream, ) { - return _psort_r( - __base, - __nel, - __width, - arg3, - __compar, + return _fwrite( + __ptr, + __size, + __nitems, + __stream, ); } - late final _psort_rPtr = _lookup< + late final _fwritePtr = _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.UnsignedLong Function(ffi.Pointer, ffi.Size, ffi.Size, + ffi.Pointer)>>('fwrite'); + late final _fwrite = _fwritePtr.asFunction< + int Function(ffi.Pointer, int, int, ffi.Pointer)>(); - void qsort_b( - ffi.Pointer __base, - int __nel, - int __width, - ffi.Pointer<_ObjCBlock> __compar, + int getc( + ffi.Pointer arg0, ) { - return _qsort_b( - __base, - __nel, - __width, - __compar, + return _getc( + 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 _getcPtr = + _lookup)>>('getc'); + late final _getc = _getcPtr.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, - ) { - return _qsort_r( - __base, - __nel, - __width, - arg3, - __compar, - ); + int getchar() { + return _getchar(); } - 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)>>)>(); + late final _getcharPtr = + _lookup>('getchar'); + late final _getchar = _getcharPtr.asFunction(); - int radixsort( - ffi.Pointer> __base, - int __nel, - ffi.Pointer __table, - int __endbyte, + ffi.Pointer gets( + ffi.Pointer arg0, ) { - return _radixsort( - __base, - __nel, - __table, - __endbyte, + return _gets( + arg0, ); } - late final _radixsortPtr = _lookup< + late final _getsPtr = _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)>>('gets'); + late final _gets = _getsPtr + .asFunction Function(ffi.Pointer)>(); - int rpmatch( + void perror( ffi.Pointer arg0, ) { - return _rpmatch( + return _perror( arg0, ); } - late final _rpmatchPtr = - _lookup)>>( - 'rpmatch'); - late final _rpmatch = - _rpmatchPtr.asFunction)>(); + late final _perrorPtr = + _lookup)>>( + 'perror'); + late final _perror = + _perrorPtr.asFunction)>(); - int sradixsort( - ffi.Pointer> __base, - int __nel, - ffi.Pointer __table, - int __endbyte, + int printf( + ffi.Pointer arg0, ) { - return _sradixsort( - __base, - __nel, - __table, - __endbyte, + return _printf( + arg0, ); } - 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)>(); + late final _printfPtr = + _lookup)>>( + 'printf'); + late final _printf = + _printfPtr.asFunction)>(); - void sranddev() { - return _sranddev(); + int putc( + int arg0, + ffi.Pointer arg1, + ) { + return _putc( + arg0, + arg1, + ); } - late final _sranddevPtr = - _lookup>('sranddev'); - late final _sranddev = _sranddevPtr.asFunction(); + late final _putcPtr = + _lookup)>>( + 'putc'); + late final _putc = + _putcPtr.asFunction)>(); - void srandomdev() { - return _srandomdev(); + int putchar( + int arg0, + ) { + return _putchar( + arg0, + ); } - late final _srandomdevPtr = - _lookup>('srandomdev'); - late final _srandomdev = _srandomdevPtr.asFunction(); + late final _putcharPtr = + _lookup>('putchar'); + late final _putchar = _putcharPtr.asFunction(); - ffi.Pointer reallocf( - ffi.Pointer __ptr, - int __size, + int puts( + ffi.Pointer arg0, ) { - return _reallocf( - __ptr, - __size, + return _puts( + arg0, ); } - 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 _putsPtr = + _lookup)>>( + 'puts'); + late final _puts = _putsPtr.asFunction)>(); - int strtonum( - ffi.Pointer __numstr, - int __minval, - int __maxval, - ffi.Pointer> __errstrp, + int remove( + ffi.Pointer arg0, ) { - return _strtonum( - __numstr, - __minval, - __maxval, - __errstrp, + return _remove( + arg0, ); } - 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>)>(); + late final _removePtr = + _lookup)>>( + 'remove'); + late final _remove = + _removePtr.asFunction)>(); - int strtoq( - ffi.Pointer __str, - ffi.Pointer> __endptr, - int __base, + int rename( + ffi.Pointer __old, + ffi.Pointer __new, ) { - return _strtoq( - __str, - __endptr, - __base, + return _rename( + __old, + __new, ); } - late final _strtoqPtr = _lookup< + late final _renamePtr = _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)>(); + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('rename'); + late final _rename = _renamePtr + .asFunction, ffi.Pointer)>(); - int strtouq( - ffi.Pointer __str, - ffi.Pointer> __endptr, - int __base, + void rewind( + ffi.Pointer arg0, ) { - return _strtouq( - __str, - __endptr, - __base, + return _rewind( + arg0, ); } - 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; + late final _rewindPtr = + _lookup)>>( + 'rewind'); + late final _rewind = + _rewindPtr.asFunction)>(); - ffi.Pointer memchr( - ffi.Pointer __s, - int __c, - int __n, + int scanf( + ffi.Pointer arg0, ) { - return _memchr( - __s, - __c, - __n, + return _scanf( + arg0, ); } - 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 _scanfPtr = + _lookup)>>( + 'scanf'); + late final _scanf = + _scanfPtr.asFunction)>(); - int memcmp( - ffi.Pointer __s1, - ffi.Pointer __s2, - int __n, + void setbuf( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _memcmp( - __s1, - __s2, - __n, + return _setbuf( + arg0, + arg1, ); } - late final _memcmpPtr = _lookup< + late final _setbufPtr = _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.Void Function( + ffi.Pointer, ffi.Pointer)>>('setbuf'); + late final _setbuf = _setbufPtr + .asFunction, ffi.Pointer)>(); - ffi.Pointer memcpy( - ffi.Pointer __dst, - ffi.Pointer __src, - int __n, + int setvbuf( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, + int arg3, ) { - return _memcpy( - __dst, - __src, - __n, + return _setvbuf( + arg0, + arg1, + arg2, + arg3, ); } - late final _memcpyPtr = _lookup< + late final _setvbufPtr = _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.Int Function(ffi.Pointer, ffi.Pointer, ffi.Int, + ffi.Size)>>('setvbuf'); + late final _setvbuf = _setvbufPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int, int)>(); - ffi.Pointer memmove( - ffi.Pointer __dst, - ffi.Pointer __src, - int __len, + int sprintf( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _memmove( - __dst, - __src, - __len, + return _sprintf( + arg0, + arg1, ); } - late final _memmovePtr = _lookup< + late final _sprintfPtr = _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.Int Function( + ffi.Pointer, ffi.Pointer)>>('sprintf'); + late final _sprintf = _sprintfPtr + .asFunction, ffi.Pointer)>(); - ffi.Pointer memset( - ffi.Pointer __b, - int __c, - int __len, + int sscanf( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _memset( - __b, - __c, - __len, + return _sscanf( + arg0, + arg1, ); } - late final _memsetPtr = _lookup< + late final _sscanfPtr = _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.Int Function( + ffi.Pointer, ffi.Pointer)>>('sscanf'); + late final _sscanf = _sscanfPtr + .asFunction, ffi.Pointer)>(); - ffi.Pointer strcat( - ffi.Pointer __s1, - ffi.Pointer __s2, - ) { - return _strcat( - __s1, - __s2, - ); + ffi.Pointer tmpfile() { + return _tmpfile(); } - 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 _tmpfilePtr = + _lookup Function()>>('tmpfile'); + late final _tmpfile = _tmpfilePtr.asFunction Function()>(); - ffi.Pointer strchr( - ffi.Pointer __s, - int __c, + ffi.Pointer tmpnam( + ffi.Pointer arg0, ) { - return _strchr( - __s, - __c, + return _tmpnam( + arg0, ); } - late final _strchrPtr = _lookup< + late final _tmpnamPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Int)>>('strchr'); - late final _strchr = _strchrPtr - .asFunction Function(ffi.Pointer, int)>(); + ffi.Pointer Function(ffi.Pointer)>>('tmpnam'); + late final _tmpnam = _tmpnamPtr + .asFunction Function(ffi.Pointer)>(); - int strcmp( - ffi.Pointer __s1, - ffi.Pointer __s2, + int ungetc( + int arg0, + ffi.Pointer arg1, ) { - return _strcmp( - __s1, - __s2, + return _ungetc( + 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 _ungetcPtr = + _lookup)>>( + 'ungetc'); + late final _ungetc = + _ungetcPtr.asFunction)>(); - int strcoll( - ffi.Pointer __s1, - ffi.Pointer __s2, + int vfprintf( + ffi.Pointer arg0, + ffi.Pointer arg1, + va_list arg2, ) { - return _strcoll( - __s1, - __s2, + return _vfprintf( + arg0, + arg1, + arg2, ); } - late final _strcollPtr = _lookup< + late final _vfprintfPtr = _lookup< ffi.NativeFunction< ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('strcoll'); - late final _strcoll = _strcollPtr - .asFunction, ffi.Pointer)>(); + ffi.Pointer, ffi.Pointer, va_list)>>('vfprintf'); + late final _vfprintf = _vfprintfPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, va_list)>(); - ffi.Pointer strcpy( - ffi.Pointer __dst, - ffi.Pointer __src, + int vprintf( + ffi.Pointer arg0, + va_list arg1, ) { - return _strcpy( - __dst, - __src, + return _vprintf( + arg0, + arg1, ); } - 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 _vprintfPtr = _lookup< + ffi.NativeFunction, va_list)>>( + 'vprintf'); + late final _vprintf = + _vprintfPtr.asFunction, va_list)>(); - int strcspn( - ffi.Pointer __s, - ffi.Pointer __charset, + int vsprintf( + ffi.Pointer arg0, + ffi.Pointer arg1, + va_list arg2, ) { - return _strcspn( - __s, - __charset, + return _vsprintf( + arg0, + arg1, + arg2, ); } - late final _strcspnPtr = _lookup< + late final _vsprintfPtr = _lookup< ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, ffi.Pointer)>>('strcspn'); - late final _strcspn = _strcspnPtr - .asFunction, ffi.Pointer)>(); + 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 strerror( - int __errnum, + ffi.Pointer ctermid( + ffi.Pointer arg0, ) { - return _strerror( - __errnum, + return _ctermid( + arg0, ); } - late final _strerrorPtr = - _lookup Function(ffi.Int)>>( - 'strerror'); - late final _strerror = - _strerrorPtr.asFunction Function(int)>(); + late final _ctermidPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>>('ctermid'); + late final _ctermid = _ctermidPtr + .asFunction Function(ffi.Pointer)>(); - int strlen( - ffi.Pointer __s, + ffi.Pointer fdopen( + int arg0, + ffi.Pointer arg1, ) { - return _strlen( - __s, + return _fdopen( + arg0, + arg1, ); } - late final _strlenPtr = _lookup< - ffi.NativeFunction)>>( - 'strlen'); - late final _strlen = - _strlenPtr.asFunction)>(); + late final _fdopenPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Int, ffi.Pointer)>>('fdopen'); + late final _fdopen = _fdopenPtr + .asFunction Function(int, ffi.Pointer)>(); - ffi.Pointer strncat( - ffi.Pointer __s1, - ffi.Pointer __s2, - int __n, + int fileno( + ffi.Pointer arg0, ) { - return _strncat( - __s1, - __s2, - __n, + return _fileno( + 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 _filenoPtr = + _lookup)>>( + 'fileno'); + late final _fileno = _filenoPtr.asFunction)>(); - int strncmp( - ffi.Pointer __s1, - ffi.Pointer __s2, - int __n, + int pclose( + ffi.Pointer arg0, ) { - return _strncmp( - __s1, - __s2, - __n, + return _pclose( + 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 _pclosePtr = + _lookup)>>( + 'pclose'); + late final _pclose = _pclosePtr.asFunction)>(); - ffi.Pointer strncpy( - ffi.Pointer __dst, - ffi.Pointer __src, - int __n, + ffi.Pointer popen( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _strncpy( - __dst, - __src, - __n, + return _popen( + arg0, + arg1, ); } - late final _strncpyPtr = _lookup< + late final _popenPtr = _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 Function( + ffi.Pointer, ffi.Pointer)>>('popen'); + late final _popen = _popenPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer strpbrk( - ffi.Pointer __s, - ffi.Pointer __charset, + int __srget( + ffi.Pointer arg0, ) { - return _strpbrk( - __s, - __charset, + return ___srget( + arg0, ); } - 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 ___srgetPtr = + _lookup)>>( + '__srget'); + late final ___srget = + ___srgetPtr.asFunction)>(); - ffi.Pointer strrchr( - ffi.Pointer __s, - int __c, + int __svfscanf( + ffi.Pointer arg0, + ffi.Pointer arg1, + va_list arg2, ) { - return _strrchr( - __s, - __c, + return ___svfscanf( + arg0, + arg1, + arg2, ); } - late final _strrchrPtr = _lookup< + late final ___svfscanfPtr = _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, ffi.Pointer, + va_list)>>('__svfscanf'); + late final ___svfscanf = ___svfscanfPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, va_list)>(); - int strspn( - ffi.Pointer __s, - ffi.Pointer __charset, + int __swbuf( + int arg0, + ffi.Pointer arg1, ) { - return _strspn( - __s, - __charset, + return ___swbuf( + arg0, + arg1, ); } - late final _strspnPtr = _lookup< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, ffi.Pointer)>>('strspn'); - late final _strspn = _strspnPtr - .asFunction, ffi.Pointer)>(); + late final ___swbufPtr = + _lookup)>>( + '__swbuf'); + late final ___swbuf = + ___swbufPtr.asFunction)>(); - ffi.Pointer strstr( - ffi.Pointer __big, - ffi.Pointer __little, + void flockfile( + ffi.Pointer arg0, ) { - return _strstr( - __big, - __little, + return _flockfile( + arg0, ); } - 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 _flockfilePtr = + _lookup)>>( + 'flockfile'); + late final _flockfile = + _flockfilePtr.asFunction)>(); - ffi.Pointer strtok( - ffi.Pointer __str, - ffi.Pointer __sep, + int ftrylockfile( + ffi.Pointer arg0, ) { - return _strtok( - __str, - __sep, + return _ftrylockfile( + arg0, ); } - 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)>(); + late final _ftrylockfilePtr = + _lookup)>>( + 'ftrylockfile'); + late final _ftrylockfile = + _ftrylockfilePtr.asFunction)>(); - int strxfrm( - ffi.Pointer __s1, - ffi.Pointer __s2, - int __n, + void funlockfile( + ffi.Pointer arg0, ) { - return _strxfrm( - __s1, - __s2, - __n, + return _funlockfile( + arg0, ); } - 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 _funlockfilePtr = + _lookup)>>( + 'funlockfile'); + late final _funlockfile = + _funlockfilePtr.asFunction)>(); - ffi.Pointer strtok_r( - ffi.Pointer __str, - ffi.Pointer __sep, - ffi.Pointer> __lasts, + int getc_unlocked( + ffi.Pointer arg0, ) { - return _strtok_r( - __str, - __sep, - __lasts, + return _getc_unlocked( + arg0, ); } - 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>)>(); + late final _getc_unlockedPtr = + _lookup)>>( + 'getc_unlocked'); + late final _getc_unlocked = + _getc_unlockedPtr.asFunction)>(); - int strerror_r( - int __errnum, - ffi.Pointer __strerrbuf, - int __buflen, - ) { - return _strerror_r( - __errnum, - __strerrbuf, - __buflen, - ); + int getchar_unlocked() { + return _getchar_unlocked(); } - 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 _getchar_unlockedPtr = + _lookup>('getchar_unlocked'); + late final _getchar_unlocked = + _getchar_unlockedPtr.asFunction(); - ffi.Pointer strdup( - ffi.Pointer __s1, + int putc_unlocked( + int arg0, + ffi.Pointer arg1, ) { - return _strdup( - __s1, + return _putc_unlocked( + arg0, + arg1, ); } - late final _strdupPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('strdup'); - late final _strdup = _strdupPtr - .asFunction Function(ffi.Pointer)>(); + late final _putc_unlockedPtr = + _lookup)>>( + 'putc_unlocked'); + late final _putc_unlocked = + _putc_unlockedPtr.asFunction)>(); - ffi.Pointer memccpy( - ffi.Pointer __dst, - ffi.Pointer __src, - int __c, - int __n, + int putchar_unlocked( + int arg0, ) { - return _memccpy( - __dst, - __src, - __c, - __n, + return _putchar_unlocked( + arg0, ); } - 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)>(); + late final _putchar_unlockedPtr = + _lookup>( + 'putchar_unlocked'); + late final _putchar_unlocked = + _putchar_unlockedPtr.asFunction(); - ffi.Pointer stpcpy( - ffi.Pointer __dst, - ffi.Pointer __src, + int getw( + ffi.Pointer arg0, ) { - return _stpcpy( - __dst, - __src, + return _getw( + arg0, ); } - 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 _getwPtr = + _lookup)>>('getw'); + late final _getw = _getwPtr.asFunction)>(); - ffi.Pointer stpncpy( - ffi.Pointer __dst, - ffi.Pointer __src, - int __n, + int putw( + int arg0, + ffi.Pointer arg1, ) { - return _stpncpy( - __dst, - __src, - __n, + return _putw( + arg0, + arg1, ); } - 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 _putwPtr = + _lookup)>>( + 'putw'); + late final _putw = + _putwPtr.asFunction)>(); - ffi.Pointer strndup( - ffi.Pointer __s1, - int __n, + ffi.Pointer tempnam( + ffi.Pointer __dir, + ffi.Pointer __prefix, ) { - return _strndup( - __s1, - __n, + return _tempnam( + __dir, + __prefix, ); } - late final _strndupPtr = _lookup< + late final _tempnamPtr = _lookup< ffi.NativeFunction< ffi.Pointer Function( - ffi.Pointer, ffi.Size)>>('strndup'); - late final _strndup = _strndupPtr - .asFunction Function(ffi.Pointer, int)>(); + ffi.Pointer, ffi.Pointer)>>('tempnam'); + late final _tempnam = _tempnamPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - int strnlen( - ffi.Pointer __s1, - int __n, + int fseeko( + ffi.Pointer __stream, + int __offset, + int __whence, ) { - return _strnlen( - __s1, - __n, + return _fseeko( + __stream, + __offset, + __whence, ); } - late final _strnlenPtr = _lookup< - ffi.NativeFunction< - ffi.Size Function(ffi.Pointer, ffi.Size)>>('strnlen'); - late final _strnlen = - _strnlenPtr.asFunction, int)>(); + late final _fseekoPtr = _lookup< + ffi + .NativeFunction, off_t, ffi.Int)>>( + 'fseeko'); + late final _fseeko = + _fseekoPtr.asFunction, int, int)>(); - ffi.Pointer strsignal( - int __sig, + int ftello( + ffi.Pointer __stream, ) { - return _strsignal( - __sig, + return _ftello( + __stream, ); } - late final _strsignalPtr = - _lookup Function(ffi.Int)>>( - 'strsignal'); - late final _strsignal = - _strsignalPtr.asFunction Function(int)>(); + late final _ftelloPtr = + _lookup)>>('ftello'); + late final _ftello = _ftelloPtr.asFunction)>(); - int memset_s( - ffi.Pointer __s, - int __smax, - int __c, - int __n, + int snprintf( + ffi.Pointer __str, + int __size, + ffi.Pointer __format, ) { - return _memset_s( - __s, - __smax, - __c, - __n, + return _snprintf( + __str, + __size, + __format, ); } - late final _memset_sPtr = _lookup< + late final _snprintfPtr = _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.Int Function(ffi.Pointer, ffi.Size, + ffi.Pointer)>>('snprintf'); + late final _snprintf = _snprintfPtr.asFunction< + int Function(ffi.Pointer, int, ffi.Pointer)>(); - ffi.Pointer memmem( - ffi.Pointer __big, - int __big_len, - ffi.Pointer __little, - int __little_len, + int vfscanf( + ffi.Pointer __stream, + ffi.Pointer __format, + va_list arg2, ) { - return _memmem( - __big, - __big_len, - __little, - __little_len, + return _vfscanf( + __stream, + __format, + arg2, ); } - late final _memmemPtr = _lookup< + late final _vfscanfPtr = _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)>(); + ffi.Int Function( + ffi.Pointer, ffi.Pointer, va_list)>>('vfscanf'); + late final _vfscanf = _vfscanfPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, va_list)>(); - void memset_pattern4( - ffi.Pointer __b, - ffi.Pointer __pattern4, - int __len, + int vscanf( + ffi.Pointer __format, + va_list arg1, ) { - return _memset_pattern4( - __b, - __pattern4, - __len, + return _vscanf( + __format, + arg1, ); } - 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 _vscanfPtr = _lookup< + ffi.NativeFunction, va_list)>>( + 'vscanf'); + late final _vscanf = + _vscanfPtr.asFunction, va_list)>(); - void memset_pattern8( - ffi.Pointer __b, - ffi.Pointer __pattern8, - int __len, + int vsnprintf( + ffi.Pointer __str, + int __size, + ffi.Pointer __format, + va_list arg3, ) { - return _memset_pattern8( - __b, - __pattern8, - __len, + return _vsnprintf( + __str, + __size, + __format, + arg3, ); } - late final _memset_pattern8Ptr = _lookup< + late final _vsnprintfPtr = _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.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)>(); - void memset_pattern16( - ffi.Pointer __b, - ffi.Pointer __pattern16, - int __len, + int vsscanf( + ffi.Pointer __str, + ffi.Pointer __format, + va_list arg2, ) { - return _memset_pattern16( - __b, - __pattern16, - __len, + return _vsscanf( + __str, + __format, + arg2, ); } - late final _memset_pattern16Ptr = _lookup< + late final _vsscanfPtr = _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.Int Function(ffi.Pointer, ffi.Pointer, + va_list)>>('vsscanf'); + late final _vsscanf = _vsscanfPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, va_list)>(); - ffi.Pointer strcasestr( - ffi.Pointer __big, - ffi.Pointer __little, + int dprintf( + int arg0, + ffi.Pointer arg1, ) { - return _strcasestr( - __big, - __little, + return _dprintf( + arg0, + arg1, ); } - 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 _dprintfPtr = _lookup< + ffi.NativeFunction)>>( + 'dprintf'); + late final _dprintf = + _dprintfPtr.asFunction)>(); - ffi.Pointer strnstr( - ffi.Pointer __big, - ffi.Pointer __little, - int __len, + int vdprintf( + int arg0, + ffi.Pointer arg1, + va_list arg2, ) { - return _strnstr( - __big, - __little, - __len, + return _vdprintf( + arg0, + arg1, + arg2, ); } - late final _strnstrPtr = _lookup< + late final _vdprintfPtr = _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)>(); + ffi.Int Function( + ffi.Int, ffi.Pointer, va_list)>>('vdprintf'); + late final _vdprintf = _vdprintfPtr + .asFunction, va_list)>(); - int strlcat( - ffi.Pointer __dst, - ffi.Pointer __source, - int __size, + int getdelim( + ffi.Pointer> __linep, + ffi.Pointer __linecapp, + int __delimiter, + ffi.Pointer __stream, ) { - return _strlcat( - __dst, - __source, - __size, + return _getdelim( + __linep, + __linecapp, + __delimiter, + __stream, ); } - late final _strlcatPtr = _lookup< + late final _getdelimPtr = _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)>(); + 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 strlcpy( - ffi.Pointer __dst, - ffi.Pointer __source, - int __size, + int getline( + ffi.Pointer> __linep, + ffi.Pointer __linecapp, + ffi.Pointer __stream, ) { - return _strlcpy( - __dst, - __source, - __size, + return _getline( + __linep, + __linecapp, + __stream, ); } - late final _strlcpyPtr = _lookup< + late final _getlinePtr = _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)>(); + ssize_t Function(ffi.Pointer>, + ffi.Pointer, ffi.Pointer)>>('getline'); + late final _getline = _getlinePtr.asFunction< + int Function(ffi.Pointer>, ffi.Pointer, + ffi.Pointer)>(); - void strmode( - int __mode, - ffi.Pointer __bp, + ffi.Pointer fmemopen( + ffi.Pointer __buf, + int __size, + ffi.Pointer __mode, ) { - return _strmode( + return _fmemopen( + __buf, + __size, __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< + late final _fmemopenPtr = _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.Size, + ffi.Pointer)>>('fmemopen'); + late final _fmemopen = _fmemopenPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, int, ffi.Pointer)>(); - void swab( - ffi.Pointer arg0, - ffi.Pointer arg1, - int arg2, + ffi.Pointer open_memstream( + ffi.Pointer> __bufp, + ffi.Pointer __sizep, ) { - return _swab( - arg0, - arg1, - arg2, + return _open_memstream( + __bufp, + __sizep, ); } - late final _swabPtr = _lookup< + late final _open_memstreamPtr = _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)>(); + ffi.Pointer Function(ffi.Pointer>, + ffi.Pointer)>>('open_memstream'); + late final _open_memstream = _open_memstreamPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer>, ffi.Pointer)>(); - int timingsafe_bcmp( - ffi.Pointer __b1, - ffi.Pointer __b2, - int __len, - ) { - return _timingsafe_bcmp( - __b1, - __b2, - __len, - ); - } + late final ffi.Pointer _sys_nerr = _lookup('sys_nerr'); - 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 get sys_nerr => _sys_nerr.value; - int strsignal_r( - int __sig, - ffi.Pointer __strsignalbuf, - int __buflen, - ) { - return _strsignal_r( - __sig, - __strsignalbuf, - __buflen, - ); - } + set sys_nerr(int value) => _sys_nerr.value = value; - 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)>(); + late final ffi.Pointer>> _sys_errlist = + _lookup>>('sys_errlist'); - int bcmp( - ffi.Pointer arg0, - ffi.Pointer arg1, - int arg2, - ) { - return _bcmp( - arg0, - arg1, - arg2, - ); - } + ffi.Pointer> get sys_errlist => _sys_errlist.value; - 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)>(); + set sys_errlist(ffi.Pointer> value) => + _sys_errlist.value = value; - void bcopy( - ffi.Pointer arg0, - ffi.Pointer arg1, - int arg2, + int asprintf( + ffi.Pointer> arg0, + ffi.Pointer arg1, ) { - return _bcopy( + return _asprintf( arg0, arg1, - arg2, ); } - late final _bcopyPtr = _lookup< + late final _asprintfPtr = _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.Pointer)>>('asprintf'); + late final _asprintf = _asprintfPtr.asFunction< + int Function( + ffi.Pointer>, ffi.Pointer)>(); - void bzero( - ffi.Pointer arg0, - int arg1, + ffi.Pointer ctermid_r( + ffi.Pointer arg0, ) { - return _bzero( + return _ctermid_r( arg0, - arg1, ); } - late final _bzeroPtr = _lookup< + late final _ctermid_rPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Size)>>('bzero'); - late final _bzero = - _bzeroPtr.asFunction, int)>(); + ffi.Pointer Function(ffi.Pointer)>>('ctermid_r'); + late final _ctermid_r = _ctermid_rPtr + .asFunction Function(ffi.Pointer)>(); - ffi.Pointer index( - ffi.Pointer arg0, - int arg1, + ffi.Pointer fgetln( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _index( + return _fgetln( arg0, arg1, ); } - late final _indexPtr = _lookup< + late final _fgetlnPtr = _lookup< ffi.NativeFunction< ffi.Pointer Function( - ffi.Pointer, ffi.Int)>>('index'); - late final _index = _indexPtr - .asFunction Function(ffi.Pointer, int)>(); + ffi.Pointer, ffi.Pointer)>>('fgetln'); + late final _fgetln = _fgetlnPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer rindex( + ffi.Pointer fmtcheck( ffi.Pointer arg0, - int arg1, + ffi.Pointer arg1, ) { - return _rindex( + return _fmtcheck( arg0, arg1, ); } - late final _rindexPtr = _lookup< + late final _fmtcheckPtr = _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(); + ffi.Pointer, ffi.Pointer)>>('fmtcheck'); + late final _fmtcheck = _fmtcheckPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - int strcasecmp( - ffi.Pointer arg0, - ffi.Pointer arg1, + int fpurge( + ffi.Pointer arg0, ) { - return _strcasecmp( + return _fpurge( arg0, - arg1, ); } - late final _strcasecmpPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('strcasecmp'); - late final _strcasecmp = _strcasecmpPtr - .asFunction, ffi.Pointer)>(); + late final _fpurgePtr = + _lookup)>>( + 'fpurge'); + late final _fpurge = _fpurgePtr.asFunction)>(); - int strncasecmp( - ffi.Pointer arg0, + void setbuffer( + ffi.Pointer arg0, ffi.Pointer arg1, int arg2, ) { - return _strncasecmp( + return _setbuffer( arg0, arg1, arg2, ); } - late final _strncasecmpPtr = _lookup< + late final _setbufferPtr = _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.Void Function( + ffi.Pointer, ffi.Pointer, ffi.Int)>>('setbuffer'); + late final _setbuffer = _setbufferPtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - int ffsl( - int arg0, + int setlinebuf( + ffi.Pointer arg0, ) { - return _ffsl( + return _setlinebuf( arg0, ); } - late final _ffslPtr = - _lookup>('ffsl'); - late final _ffsl = _ffslPtr.asFunction(); + late final _setlinebufPtr = + _lookup)>>( + 'setlinebuf'); + late final _setlinebuf = + _setlinebufPtr.asFunction)>(); - int ffsll( - int arg0, + int vasprintf( + ffi.Pointer> arg0, + ffi.Pointer arg1, + va_list arg2, ) { - return _ffsll( + return _vasprintf( arg0, + arg1, + arg2, ); } - late final _ffsllPtr = - _lookup>('ffsll'); - late final _ffsll = _ffsllPtr.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)>(); - int fls( - int arg0, + 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 _fls( + return _funopen( arg0, + arg1, + arg2, + arg3, + arg4, ); } - 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(); + 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 flsll( - int arg0, + int __sprintf_chk( + ffi.Pointer arg0, + int arg1, + int arg2, + ffi.Pointer arg3, ) { - return _flsll( + return ___sprintf_chk( arg0, + arg1, + arg2, + arg3, ); } - 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 ___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)>(); - ffi.Pointer asctime( - ffi.Pointer arg0, + int __snprintf_chk( + ffi.Pointer arg0, + int arg1, + int arg2, + int arg3, + ffi.Pointer arg4, ) { - return _asctime( + return ___snprintf_chk( arg0, + arg1, + arg2, + arg3, + arg4, ); } - 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 ___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)>(); - ffi.Pointer ctime( - ffi.Pointer arg0, + int __vsprintf_chk( + ffi.Pointer arg0, + int arg1, + int arg2, + ffi.Pointer arg3, + va_list arg4, ) { - return _ctime( + return ___vsprintf_chk( arg0, + arg1, + arg2, + arg3, + arg4, ); } - late final _ctimePtr = _lookup< + late final ___vsprintf_chkPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('ctime'); - late final _ctime = _ctimePtr - .asFunction Function(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)>(); - double difftime( - int arg0, + int __vsnprintf_chk( + ffi.Pointer arg0, int arg1, + int arg2, + int arg3, + ffi.Pointer arg4, + va_list arg5, ) { - return _difftime( + return ___vsnprintf_chk( arg0, arg1, + arg2, + arg3, + arg4, + arg5, ); } - late final _difftimePtr = - _lookup>( - 'difftime'); - late final _difftime = _difftimePtr.asFunction(); + 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)>(); - ffi.Pointer getdate( - ffi.Pointer arg0, + ffi.Pointer memchr( + ffi.Pointer __s, + int __c, + int __n, ) { - return _getdate( - arg0, + return _memchr( + __s, + __c, + __n, ); } - late final _getdatePtr = _lookup< - ffi.NativeFunction Function(ffi.Pointer)>>( - 'getdate'); - late final _getdate = - _getdatePtr.asFunction Function(ffi.Pointer)>(); + 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)>(); - ffi.Pointer gmtime( - ffi.Pointer arg0, + int memcmp( + ffi.Pointer __s1, + ffi.Pointer __s2, + int __n, ) { - return _gmtime( - arg0, + return _memcmp( + __s1, + __s2, + __n, ); } - late final _gmtimePtr = _lookup< - ffi.NativeFunction Function(ffi.Pointer)>>( - 'gmtime'); - late final _gmtime = - _gmtimePtr.asFunction Function(ffi.Pointer)>(); + 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 localtime( - ffi.Pointer arg0, + ffi.Pointer memcpy( + ffi.Pointer __dst, + ffi.Pointer __src, + int __n, ) { - return _localtime( - arg0, + return _memcpy( + __dst, + __src, + __n, ); } - late final _localtimePtr = _lookup< - ffi.NativeFunction Function(ffi.Pointer)>>( - 'localtime'); - late final _localtime = - _localtimePtr.asFunction Function(ffi.Pointer)>(); + 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 mktime( - ffi.Pointer arg0, + ffi.Pointer memmove( + ffi.Pointer __dst, + ffi.Pointer __src, + int __len, ) { - return _mktime( - arg0, + return _memmove( + __dst, + __src, + __len, ); } - late final _mktimePtr = - _lookup)>>('mktime'); - late final _mktime = _mktimePtr.asFunction)>(); + 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)>(); - int strftime( - ffi.Pointer arg0, - int arg1, - ffi.Pointer arg2, - ffi.Pointer arg3, + ffi.Pointer memset( + ffi.Pointer __b, + int __c, + int __len, ) { - return _strftime( - arg0, - arg1, - arg2, - arg3, + return _memset( + __b, + __c, + __len, ); } - late final _strftimePtr = _lookup< + late final _memsetPtr = _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.Int, ffi.Size)>>('memset'); + late final _memset = _memsetPtr.asFunction< + ffi.Pointer Function(ffi.Pointer, int, int)>(); - ffi.Pointer strptime( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, + ffi.Pointer strcat( + ffi.Pointer __s1, + ffi.Pointer __s2, ) { - return _strptime( - arg0, - arg1, - arg2, + return _strcat( + __s1, + __s2, ); } - late final _strptimePtr = _lookup< + late final _strcatPtr = _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)>>('strcat'); + late final _strcat = _strcatPtr.asFunction< ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer, ffi.Pointer)>(); - int time( - ffi.Pointer arg0, + ffi.Pointer strchr( + ffi.Pointer __s, + int __c, ) { - return _time( - arg0, + return _strchr( + __s, + __c, ); } - 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 _strchrPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Int)>>('strchr'); + late final _strchr = _strchrPtr + .asFunction Function(ffi.Pointer, int)>(); - ffi.Pointer asctime_r( - ffi.Pointer arg0, - ffi.Pointer arg1, + int strcmp( + ffi.Pointer __s1, + ffi.Pointer __s2, ) { - return _asctime_r( - arg0, - arg1, + return _strcmp( + __s1, + __s2, ); } - late final _asctime_rPtr = _lookup< + late final _strcmpPtr = _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.Int Function( + ffi.Pointer, ffi.Pointer)>>('strcmp'); + late final _strcmp = _strcmpPtr + .asFunction, ffi.Pointer)>(); - ffi.Pointer ctime_r( - ffi.Pointer arg0, - ffi.Pointer arg1, + int strcoll( + ffi.Pointer __s1, + ffi.Pointer __s2, ) { - return _ctime_r( - arg0, - arg1, + return _strcoll( + __s1, + __s2, ); } - late final _ctime_rPtr = _lookup< + late final _strcollPtr = _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.Int Function( + ffi.Pointer, ffi.Pointer)>>('strcoll'); + late final _strcoll = _strcollPtr + .asFunction, ffi.Pointer)>(); - ffi.Pointer gmtime_r( - ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer strcpy( + ffi.Pointer __dst, + ffi.Pointer __src, ) { - return _gmtime_r( - arg0, - arg1, + return _strcpy( + __dst, + __src, ); } - late final _gmtime_rPtr = _lookup< + late final _strcpyPtr = _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 Function( + ffi.Pointer, ffi.Pointer)>>('strcpy'); + late final _strcpy = _strcpyPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer localtime_r( - ffi.Pointer arg0, - ffi.Pointer arg1, + int strcspn( + ffi.Pointer __s, + ffi.Pointer __charset, ) { - return _localtime_r( - arg0, - arg1, + return _strcspn( + __s, + __charset, ); } - late final _localtime_rPtr = _lookup< + late final _strcspnPtr = _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.UnsignedLong Function( + ffi.Pointer, ffi.Pointer)>>('strcspn'); + late final _strcspn = _strcspnPtr + .asFunction, ffi.Pointer)>(); - int posix2time( - int arg0, + ffi.Pointer strerror( + int __errnum, ) { - return _posix2time( - arg0, + return _strerror( + __errnum, ); } - 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 _strerrorPtr = + _lookup Function(ffi.Int)>>( + 'strerror'); + late final _strerror = + _strerrorPtr.asFunction Function(int)>(); - int time2posix( - int arg0, + int strlen( + ffi.Pointer __s, ) { - return _time2posix( - arg0, + return _strlen( + __s, ); } - late final _time2posixPtr = - _lookup>('time2posix'); - late final _time2posix = _time2posixPtr.asFunction(); + late final _strlenPtr = _lookup< + ffi.NativeFunction)>>( + 'strlen'); + late final _strlen = + _strlenPtr.asFunction)>(); - int timelocal( - ffi.Pointer arg0, + ffi.Pointer strncat( + ffi.Pointer __s1, + ffi.Pointer __s2, + int __n, ) { - return _timelocal( - arg0, + return _strncat( + __s1, + __s2, + __n, ); } - late final _timelocalPtr = - _lookup)>>( - 'timelocal'); - late final _timelocal = - _timelocalPtr.asFunction)>(); + 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 timegm( - ffi.Pointer arg0, + int strncmp( + ffi.Pointer __s1, + ffi.Pointer __s2, + int __n, ) { - return _timegm( - arg0, + return _strncmp( + __s1, + __s2, + __n, ); } - late final _timegmPtr = - _lookup)>>('timegm'); - late final _timegm = _timegmPtr.asFunction)>(); + 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 nanosleep( - ffi.Pointer __rqtp, - ffi.Pointer __rmtp, + ffi.Pointer strncpy( + ffi.Pointer __dst, + ffi.Pointer __src, + int __n, ) { - return _nanosleep( - __rqtp, - __rmtp, + return _strncpy( + __dst, + __src, + __n, ); } - late final _nanosleepPtr = _lookup< + late final _strncpyPtr = _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)>>('strncpy'); + late final _strncpy = _strncpyPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - int clock_getres( - int __clock_id, - ffi.Pointer __res, + ffi.Pointer strpbrk( + ffi.Pointer __s, + ffi.Pointer __charset, ) { - return _clock_getres( - __clock_id, - __res, + return _strpbrk( + __s, + __charset, ); } - late final _clock_getresPtr = _lookup< + late final _strpbrkPtr = _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.Pointer)>>('strpbrk'); + late final _strpbrk = _strpbrkPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - int clock_gettime( - int __clock_id, - ffi.Pointer __tp, + ffi.Pointer strrchr( + ffi.Pointer __s, + int __c, ) { - return _clock_gettime( - __clock_id, - __tp, + return _strrchr( + __s, + __c, ); } - late final _clock_gettimePtr = _lookup< + late final _strrchrPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Int32, ffi.Pointer)>>('clock_gettime'); - late final _clock_gettime = - _clock_gettimePtr.asFunction)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Int)>>('strrchr'); + late final _strrchr = _strrchrPtr + .asFunction Function(ffi.Pointer, int)>(); - int clock_gettime_nsec_np( - int __clock_id, + int strspn( + ffi.Pointer __s, + ffi.Pointer __charset, ) { - return _clock_gettime_nsec_np( - __clock_id, + return _strspn( + __s, + __charset, ); } - late final _clock_gettime_nsec_npPtr = - _lookup>( - 'clock_gettime_nsec_np'); - late final _clock_gettime_nsec_np = - _clock_gettime_nsec_npPtr.asFunction(); + late final _strspnPtr = _lookup< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, ffi.Pointer)>>('strspn'); + late final _strspn = _strspnPtr + .asFunction, ffi.Pointer)>(); - int clock_settime( - int __clock_id, - ffi.Pointer __tp, + ffi.Pointer strstr( + ffi.Pointer __big, + ffi.Pointer __little, ) { - return _clock_settime( - __clock_id, - __tp, + return _strstr( + __big, + __little, ); } - late final _clock_settimePtr = _lookup< + late final _strstrPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Int32, ffi.Pointer)>>('clock_settime'); - late final _clock_settime = - _clock_settimePtr.asFunction)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('strstr'); + late final _strstr = _strstrPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - int timespec_get( - ffi.Pointer ts, - int base, + ffi.Pointer strtok( + ffi.Pointer __str, + ffi.Pointer __sep, ) { - return _timespec_get( - ts, - base, + return _strtok( + __str, + __sep, ); } - late final _timespec_getPtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - 'timespec_get'); - late final _timespec_get = - _timespec_getPtr.asFunction, int)>(); + 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 imaxabs( - int j, + int strxfrm( + ffi.Pointer __s1, + ffi.Pointer __s2, + int __n, ) { - return _imaxabs( - j, + return _strxfrm( + __s1, + __s2, + __n, ); } - late final _imaxabsPtr = - _lookup>('imaxabs'); - late final _imaxabs = _imaxabsPtr.asFunction(); + 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)>(); - imaxdiv_t imaxdiv( - int __numer, - int __denom, + ffi.Pointer strtok_r( + ffi.Pointer __str, + ffi.Pointer __sep, + ffi.Pointer> __lasts, ) { - return _imaxdiv( - __numer, - __denom, + return _strtok_r( + __str, + __sep, + __lasts, ); } - late final _imaxdivPtr = - _lookup>( - 'imaxdiv'); - late final _imaxdiv = _imaxdivPtr.asFunction(); + 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 strtoimax( - ffi.Pointer __nptr, - ffi.Pointer> __endptr, - int __base, + int strerror_r( + int __errnum, + ffi.Pointer __strerrbuf, + int __buflen, ) { - return _strtoimax( - __nptr, - __endptr, - __base, + return _strerror_r( + __errnum, + __strerrbuf, + __buflen, ); } - late final _strtoimaxPtr = _lookup< + late final _strerror_rPtr = _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.Int Function( + ffi.Int, ffi.Pointer, ffi.Size)>>('strerror_r'); + late final _strerror_r = _strerror_rPtr + .asFunction, int)>(); - int strtoumax( - ffi.Pointer __nptr, - ffi.Pointer> __endptr, - int __base, + ffi.Pointer strdup( + ffi.Pointer __s1, ) { - return _strtoumax( - __nptr, - __endptr, - __base, + return _strdup( + __s1, ); } - late final _strtoumaxPtr = _lookup< + late final _strdupPtr = _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)>>('strdup'); + late final _strdup = _strdupPtr + .asFunction Function(ffi.Pointer)>(); - int wcstoimax( - ffi.Pointer __nptr, - ffi.Pointer> __endptr, - int __base, + ffi.Pointer memccpy( + ffi.Pointer __dst, + ffi.Pointer __src, + int __c, + int __n, ) { - return _wcstoimax( - __nptr, - __endptr, - __base, + return _memccpy( + __dst, + __src, + __c, + __n, ); } - late final _wcstoimaxPtr = _lookup< + late final _memccpyPtr = _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.Int, ffi.Size)>>('memccpy'); + late final _memccpy = _memccpyPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int, int)>(); - int wcstoumax( - ffi.Pointer __nptr, - ffi.Pointer> __endptr, - int __base, + ffi.Pointer stpcpy( + ffi.Pointer __dst, + ffi.Pointer __src, ) { - return _wcstoumax( - __nptr, - __endptr, - __base, + return _stpcpy( + __dst, + __src, ); } - late final _wcstoumaxPtr = _lookup< + late final _stpcpyPtr = _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; + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('stpcpy'); + late final _stpcpy = _stpcpyPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - int CFBagGetTypeID() { - return _CFBagGetTypeID(); + ffi.Pointer stpncpy( + ffi.Pointer __dst, + ffi.Pointer __src, + int __n, + ) { + return _stpncpy( + __dst, + __src, + __n, + ); } - late final _CFBagGetTypeIDPtr = - _lookup>('CFBagGetTypeID'); - late final _CFBagGetTypeID = _CFBagGetTypeIDPtr.asFunction(); + 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)>(); - CFBagRef CFBagCreate( - CFAllocatorRef allocator, - ffi.Pointer> values, - int numValues, - ffi.Pointer callBacks, + ffi.Pointer strndup( + ffi.Pointer __s1, + int __n, ) { - return _CFBagCreate( - allocator, - values, - numValues, - callBacks, + return _strndup( + __s1, + __n, ); } - late final _CFBagCreatePtr = _lookup< + late final _strndupPtr = _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.Pointer Function( + ffi.Pointer, ffi.Size)>>('strndup'); + late final _strndup = _strndupPtr + .asFunction Function(ffi.Pointer, int)>(); - CFBagRef CFBagCreateCopy( - CFAllocatorRef allocator, - CFBagRef theBag, + int strnlen( + ffi.Pointer __s1, + int __n, ) { - return _CFBagCreateCopy( - allocator, - theBag, + return _strnlen( + __s1, + __n, ); } - late final _CFBagCreateCopyPtr = - _lookup>( - 'CFBagCreateCopy'); - late final _CFBagCreateCopy = _CFBagCreateCopyPtr.asFunction< - CFBagRef Function(CFAllocatorRef, CFBagRef)>(); + late final _strnlenPtr = _lookup< + ffi + .NativeFunction, ffi.Size)>>( + 'strnlen'); + late final _strnlen = + _strnlenPtr.asFunction, int)>(); - CFMutableBagRef CFBagCreateMutable( - CFAllocatorRef allocator, - int capacity, - ffi.Pointer callBacks, + ffi.Pointer strsignal( + int __sig, ) { - return _CFBagCreateMutable( - allocator, - capacity, - callBacks, + return _strsignal( + __sig, ); } - late final _CFBagCreateMutablePtr = _lookup< - ffi.NativeFunction< - CFMutableBagRef Function(CFAllocatorRef, CFIndex, - ffi.Pointer)>>('CFBagCreateMutable'); - late final _CFBagCreateMutable = _CFBagCreateMutablePtr.asFunction< - CFMutableBagRef Function( - CFAllocatorRef, int, ffi.Pointer)>(); + late final _strsignalPtr = + _lookup Function(ffi.Int)>>( + 'strsignal'); + late final _strsignal = + _strsignalPtr.asFunction Function(int)>(); - CFMutableBagRef CFBagCreateMutableCopy( - CFAllocatorRef allocator, - int capacity, - CFBagRef theBag, + int memset_s( + ffi.Pointer __s, + int __smax, + int __c, + int __n, ) { - return _CFBagCreateMutableCopy( - allocator, - capacity, - theBag, + return _memset_s( + __s, + __smax, + __c, + __n, ); } - late final _CFBagCreateMutableCopyPtr = _lookup< + late final _memset_sPtr = _lookup< ffi.NativeFunction< - CFMutableBagRef Function( - CFAllocatorRef, CFIndex, CFBagRef)>>('CFBagCreateMutableCopy'); - late final _CFBagCreateMutableCopy = _CFBagCreateMutableCopyPtr.asFunction< - CFMutableBagRef Function(CFAllocatorRef, int, CFBagRef)>(); + errno_t Function( + ffi.Pointer, rsize_t, ffi.Int, rsize_t)>>('memset_s'); + late final _memset_s = _memset_sPtr + .asFunction, int, int, int)>(); - int CFBagGetCount( - CFBagRef theBag, + ffi.Pointer memmem( + ffi.Pointer __big, + int __big_len, + ffi.Pointer __little, + int __little_len, ) { - return _CFBagGetCount( - theBag, + return _memmem( + __big, + __big_len, + __little, + __little_len, ); } - late final _CFBagGetCountPtr = - _lookup>('CFBagGetCount'); - late final _CFBagGetCount = - _CFBagGetCountPtr.asFunction(); + 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 CFBagGetCountOfValue( - CFBagRef theBag, - ffi.Pointer value, + void memset_pattern4( + ffi.Pointer __b, + ffi.Pointer __pattern4, + int __len, ) { - return _CFBagGetCountOfValue( - theBag, - value, + return _memset_pattern4( + __b, + __pattern4, + __len, ); } - late final _CFBagGetCountOfValuePtr = _lookup< + late final _memset_pattern4Ptr = _lookup< ffi.NativeFunction< - CFIndex Function( - CFBagRef, ffi.Pointer)>>('CFBagGetCountOfValue'); - late final _CFBagGetCountOfValue = _CFBagGetCountOfValuePtr.asFunction< - int Function(CFBagRef, ffi.Pointer)>(); + 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)>(); - int CFBagContainsValue( - CFBagRef theBag, - ffi.Pointer value, + void memset_pattern8( + ffi.Pointer __b, + ffi.Pointer __pattern8, + int __len, ) { - return _CFBagContainsValue( - theBag, - value, + return _memset_pattern8( + __b, + __pattern8, + __len, ); } - late final _CFBagContainsValuePtr = _lookup< + late final _memset_pattern8Ptr = _lookup< ffi.NativeFunction< - Boolean Function( - CFBagRef, ffi.Pointer)>>('CFBagContainsValue'); - late final _CFBagContainsValue = _CFBagContainsValuePtr.asFunction< - int Function(CFBagRef, ffi.Pointer)>(); + 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 CFBagGetValue( - CFBagRef theBag, - ffi.Pointer value, + void memset_pattern16( + ffi.Pointer __b, + ffi.Pointer __pattern16, + int __len, ) { - return _CFBagGetValue( - theBag, - value, + return _memset_pattern16( + __b, + __pattern16, + __len, ); } - late final _CFBagGetValuePtr = _lookup< + late final _memset_pattern16Ptr = _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)>>('memset_pattern16'); + late final _memset_pattern16 = _memset_pattern16Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - int CFBagGetValueIfPresent( - CFBagRef theBag, - ffi.Pointer candidate, - ffi.Pointer> value, + ffi.Pointer strcasestr( + ffi.Pointer __big, + ffi.Pointer __little, ) { - return _CFBagGetValueIfPresent( - theBag, - candidate, - value, + return _strcasestr( + __big, + __little, ); } - late final _CFBagGetValueIfPresentPtr = _lookup< + late final _strcasestrPtr = _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 Function( + ffi.Pointer, ffi.Pointer)>>('strcasestr'); + late final _strcasestr = _strcasestrPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - void CFBagGetValues( - CFBagRef theBag, - ffi.Pointer> values, + ffi.Pointer strnstr( + ffi.Pointer __big, + ffi.Pointer __little, + int __len, ) { - return _CFBagGetValues( - theBag, - values, + return _strnstr( + __big, + __little, + __len, ); } - late final _CFBagGetValuesPtr = _lookup< + late final _strnstrPtr = _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.Pointer, ffi.Size)>>('strnstr'); + late final _strnstr = _strnstrPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - void CFBagApplyFunction( - CFBagRef theBag, - CFBagApplierFunction applier, - ffi.Pointer context, + int strlcat( + ffi.Pointer __dst, + ffi.Pointer __source, + int __size, ) { - return _CFBagApplyFunction( - theBag, - applier, - context, + return _strlcat( + __dst, + __source, + __size, ); } - late final _CFBagApplyFunctionPtr = _lookup< + late final _strlcatPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFBagRef, CFBagApplierFunction, - ffi.Pointer)>>('CFBagApplyFunction'); - late final _CFBagApplyFunction = _CFBagApplyFunctionPtr.asFunction< - void Function(CFBagRef, CFBagApplierFunction, ffi.Pointer)>(); + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer, ffi.Size)>>('strlcat'); + late final _strlcat = _strlcatPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); - void CFBagAddValue( - CFMutableBagRef theBag, - ffi.Pointer value, + int strlcpy( + ffi.Pointer __dst, + ffi.Pointer __source, + int __size, ) { - return _CFBagAddValue( - theBag, - value, + return _strlcpy( + __dst, + __source, + __size, ); } - late final _CFBagAddValuePtr = _lookup< + late final _strlcpyPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - CFMutableBagRef, ffi.Pointer)>>('CFBagAddValue'); - late final _CFBagAddValue = _CFBagAddValuePtr.asFunction< - void Function(CFMutableBagRef, ffi.Pointer)>(); + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer, ffi.Size)>>('strlcpy'); + late final _strlcpy = _strlcpyPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); - void CFBagReplaceValue( - CFMutableBagRef theBag, - ffi.Pointer value, + void strmode( + int __mode, + ffi.Pointer __bp, ) { - return _CFBagReplaceValue( - theBag, - value, + return _strmode( + __mode, + __bp, ); } - late final _CFBagReplaceValuePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFMutableBagRef, ffi.Pointer)>>('CFBagReplaceValue'); - late final _CFBagReplaceValue = _CFBagReplaceValuePtr.asFunction< - void Function(CFMutableBagRef, ffi.Pointer)>(); + late final _strmodePtr = _lookup< + ffi + .NativeFunction)>>( + 'strmode'); + late final _strmode = + _strmodePtr.asFunction)>(); - void CFBagSetValue( - CFMutableBagRef theBag, - ffi.Pointer value, + ffi.Pointer strsep( + ffi.Pointer> __stringp, + ffi.Pointer __delim, ) { - return _CFBagSetValue( - theBag, - value, + return _strsep( + __stringp, + __delim, ); } - late final _CFBagSetValuePtr = _lookup< + late final _strsepPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - CFMutableBagRef, ffi.Pointer)>>('CFBagSetValue'); - late final _CFBagSetValue = _CFBagSetValuePtr.asFunction< - void Function(CFMutableBagRef, ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer>, + ffi.Pointer)>>('strsep'); + late final _strsep = _strsepPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer>, ffi.Pointer)>(); - void CFBagRemoveValue( - CFMutableBagRef theBag, - ffi.Pointer value, + void swab( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, ) { - return _CFBagRemoveValue( - theBag, - value, + return _swab( + arg0, + arg1, + arg2, ); } - late final _CFBagRemoveValuePtr = _lookup< + late final _swabPtr = _lookup< ffi.NativeFunction< ffi.Void Function( - CFMutableBagRef, ffi.Pointer)>>('CFBagRemoveValue'); - late final _CFBagRemoveValue = _CFBagRemoveValuePtr.asFunction< - void Function(CFMutableBagRef, ffi.Pointer)>(); + ffi.Pointer, ffi.Pointer, ssize_t)>>('swab'); + late final _swab = _swabPtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - void CFBagRemoveAllValues( - CFMutableBagRef theBag, + int timingsafe_bcmp( + ffi.Pointer __b1, + ffi.Pointer __b2, + int __len, ) { - return _CFBagRemoveAllValues( - theBag, + return _timingsafe_bcmp( + __b1, + __b2, + __len, ); } - 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(); + 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)>(); - CFBinaryHeapRef CFBinaryHeapCreate( - CFAllocatorRef allocator, - int capacity, - ffi.Pointer callBacks, - ffi.Pointer compareContext, + int strsignal_r( + int __sig, + ffi.Pointer __strsignalbuf, + int __buflen, ) { - return _CFBinaryHeapCreate( - allocator, - capacity, - callBacks, - compareContext, + return _strsignal_r( + __sig, + __strsignalbuf, + __buflen, ); } - late final _CFBinaryHeapCreatePtr = _lookup< + late final _strsignal_rPtr = _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)>(); + ffi.Int Function( + ffi.Int, ffi.Pointer, ffi.Size)>>('strsignal_r'); + late final _strsignal_r = _strsignal_rPtr + .asFunction, int)>(); - CFBinaryHeapRef CFBinaryHeapCreateCopy( - CFAllocatorRef allocator, - int capacity, - CFBinaryHeapRef heap, + int bcmp( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, ) { - return _CFBinaryHeapCreateCopy( - allocator, - capacity, - heap, + return _bcmp( + arg0, + arg1, + arg2, ); } - late final _CFBinaryHeapCreateCopyPtr = _lookup< + late final _bcmpPtr = _lookup< ffi.NativeFunction< - CFBinaryHeapRef Function(CFAllocatorRef, CFIndex, - CFBinaryHeapRef)>>('CFBinaryHeapCreateCopy'); - late final _CFBinaryHeapCreateCopy = _CFBinaryHeapCreateCopyPtr.asFunction< - CFBinaryHeapRef Function(CFAllocatorRef, int, CFBinaryHeapRef)>(); + ffi.Int Function( + ffi.Pointer, ffi.Pointer, ffi.Size)>>('bcmp'); + late final _bcmp = _bcmpPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); - int CFBinaryHeapGetCount( - CFBinaryHeapRef heap, + void bcopy( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, ) { - return _CFBinaryHeapGetCount( - heap, + return _bcopy( + arg0, + arg1, + arg2, ); } - late final _CFBinaryHeapGetCountPtr = - _lookup>( - 'CFBinaryHeapGetCount'); - late final _CFBinaryHeapGetCount = - _CFBinaryHeapGetCountPtr.asFunction(); + 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)>(); - int CFBinaryHeapGetCountOfValue( - CFBinaryHeapRef heap, - ffi.Pointer value, + void bzero( + ffi.Pointer arg0, + int arg1, ) { - return _CFBinaryHeapGetCountOfValue( - heap, - value, + return _bzero( + arg0, + arg1, ); } - late final _CFBinaryHeapGetCountOfValuePtr = _lookup< - ffi.NativeFunction< - CFIndex Function(CFBinaryHeapRef, - ffi.Pointer)>>('CFBinaryHeapGetCountOfValue'); - late final _CFBinaryHeapGetCountOfValue = _CFBinaryHeapGetCountOfValuePtr - .asFunction)>(); + late final _bzeroPtr = _lookup< + ffi + .NativeFunction, ffi.Size)>>( + 'bzero'); + late final _bzero = + _bzeroPtr.asFunction, int)>(); - int CFBinaryHeapContainsValue( - CFBinaryHeapRef heap, - ffi.Pointer value, + ffi.Pointer index( + ffi.Pointer arg0, + int arg1, ) { - return _CFBinaryHeapContainsValue( - heap, - value, + return _index( + arg0, + arg1, ); } - late final _CFBinaryHeapContainsValuePtr = _lookup< + late final _indexPtr = _lookup< ffi.NativeFunction< - Boolean Function(CFBinaryHeapRef, - ffi.Pointer)>>('CFBinaryHeapContainsValue'); - late final _CFBinaryHeapContainsValue = _CFBinaryHeapContainsValuePtr - .asFunction)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Int)>>('index'); + late final _index = _indexPtr + .asFunction Function(ffi.Pointer, int)>(); - ffi.Pointer CFBinaryHeapGetMinimum( - CFBinaryHeapRef heap, + ffi.Pointer rindex( + ffi.Pointer arg0, + int arg1, ) { - return _CFBinaryHeapGetMinimum( - heap, + return _rindex( + arg0, + arg1, ); } - late final _CFBinaryHeapGetMinimumPtr = _lookup< - ffi.NativeFunction Function(CFBinaryHeapRef)>>( - 'CFBinaryHeapGetMinimum'); - late final _CFBinaryHeapGetMinimum = _CFBinaryHeapGetMinimumPtr.asFunction< - ffi.Pointer Function(CFBinaryHeapRef)>(); + late final _rindexPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Int)>>('rindex'); + late final _rindex = _rindexPtr + .asFunction Function(ffi.Pointer, int)>(); - int CFBinaryHeapGetMinimumIfPresent( - CFBinaryHeapRef heap, - ffi.Pointer> value, + int ffs( + int arg0, ) { - return _CFBinaryHeapGetMinimumIfPresent( - heap, - value, + return _ffs( + 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 _ffsPtr = + _lookup>('ffs'); + late final _ffs = _ffsPtr.asFunction(); - void CFBinaryHeapGetValues( - CFBinaryHeapRef heap, - ffi.Pointer> values, + int strcasecmp( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _CFBinaryHeapGetValues( - heap, - values, + return _strcasecmp( + arg0, + arg1, ); } - late final _CFBinaryHeapGetValuesPtr = _lookup< + late final _strcasecmpPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFBinaryHeapRef, - ffi.Pointer>)>>('CFBinaryHeapGetValues'); - late final _CFBinaryHeapGetValues = _CFBinaryHeapGetValuesPtr.asFunction< - void Function(CFBinaryHeapRef, ffi.Pointer>)>(); + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('strcasecmp'); + late final _strcasecmp = _strcasecmpPtr + .asFunction, ffi.Pointer)>(); - void CFBinaryHeapApplyFunction( - CFBinaryHeapRef heap, - CFBinaryHeapApplierFunction applier, - ffi.Pointer context, + int strncasecmp( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, ) { - return _CFBinaryHeapApplyFunction( - heap, - applier, - context, + return _strncasecmp( + arg0, + arg1, + arg2, ); } - late final _CFBinaryHeapApplyFunctionPtr = _lookup< + late final _strncasecmpPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFBinaryHeapRef, CFBinaryHeapApplierFunction, - ffi.Pointer)>>('CFBinaryHeapApplyFunction'); - late final _CFBinaryHeapApplyFunction = - _CFBinaryHeapApplyFunctionPtr.asFunction< - void Function(CFBinaryHeapRef, CFBinaryHeapApplierFunction, - 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 CFBinaryHeapAddValue( - CFBinaryHeapRef heap, - ffi.Pointer value, + int ffsl( + int arg0, ) { - return _CFBinaryHeapAddValue( - heap, - value, + return _ffsl( + arg0, ); } - late final _CFBinaryHeapAddValuePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFBinaryHeapRef, ffi.Pointer)>>('CFBinaryHeapAddValue'); - late final _CFBinaryHeapAddValue = _CFBinaryHeapAddValuePtr.asFunction< - void Function(CFBinaryHeapRef, ffi.Pointer)>(); + late final _ffslPtr = + _lookup>('ffsl'); + late final _ffsl = _ffslPtr.asFunction(); - void CFBinaryHeapRemoveMinimumValue( - CFBinaryHeapRef heap, + int ffsll( + int arg0, ) { - return _CFBinaryHeapRemoveMinimumValue( - heap, + return _ffsll( + arg0, ); } - late final _CFBinaryHeapRemoveMinimumValuePtr = - _lookup>( - 'CFBinaryHeapRemoveMinimumValue'); - late final _CFBinaryHeapRemoveMinimumValue = - _CFBinaryHeapRemoveMinimumValuePtr.asFunction< - void Function(CFBinaryHeapRef)>(); + late final _ffsllPtr = + _lookup>('ffsll'); + late final _ffsll = _ffsllPtr.asFunction(); - void CFBinaryHeapRemoveAllValues( - CFBinaryHeapRef heap, + int fls( + int arg0, ) { - return _CFBinaryHeapRemoveAllValues( - heap, + return _fls( + arg0, ); } - late final _CFBinaryHeapRemoveAllValuesPtr = - _lookup>( - 'CFBinaryHeapRemoveAllValues'); - late final _CFBinaryHeapRemoveAllValues = _CFBinaryHeapRemoveAllValuesPtr - .asFunction(); + late final _flsPtr = + _lookup>('fls'); + late final _fls = _flsPtr.asFunction(); - int CFBitVectorGetTypeID() { - return _CFBitVectorGetTypeID(); + int flsl( + int arg0, + ) { + return _flsl( + arg0, + ); } - late final _CFBitVectorGetTypeIDPtr = - _lookup>('CFBitVectorGetTypeID'); - late final _CFBitVectorGetTypeID = - _CFBitVectorGetTypeIDPtr.asFunction(); + late final _flslPtr = + _lookup>('flsl'); + late final _flsl = _flslPtr.asFunction(); - CFBitVectorRef CFBitVectorCreate( - CFAllocatorRef allocator, - ffi.Pointer bytes, - int numBits, + int flsll( + int arg0, ) { - return _CFBitVectorCreate( - allocator, - bytes, - numBits, + return _flsll( + arg0, ); } - 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 _flsllPtr = + _lookup>('flsll'); + late final _flsll = _flsllPtr.asFunction(); - CFBitVectorRef CFBitVectorCreateCopy( - CFAllocatorRef allocator, - CFBitVectorRef bv, + 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 _CFBitVectorCreateCopy( - allocator, - bv, + return _asctime( + arg0, ); } - late final _CFBitVectorCreateCopyPtr = _lookup< - ffi.NativeFunction< - CFBitVectorRef Function( - CFAllocatorRef, CFBitVectorRef)>>('CFBitVectorCreateCopy'); - late final _CFBitVectorCreateCopy = _CFBitVectorCreateCopyPtr.asFunction< - CFBitVectorRef Function(CFAllocatorRef, CFBitVectorRef)>(); + late final _asctimePtr = _lookup< + ffi.NativeFunction Function(ffi.Pointer)>>( + 'asctime'); + late final _asctime = + _asctimePtr.asFunction Function(ffi.Pointer)>(); - CFMutableBitVectorRef CFBitVectorCreateMutable( - CFAllocatorRef allocator, - int capacity, + int clock() { + return _clock(); + } + + late final _clockPtr = + _lookup>('clock'); + late final _clock = _clockPtr.asFunction(); + + ffi.Pointer ctime( + ffi.Pointer arg0, ) { - return _CFBitVectorCreateMutable( - allocator, - capacity, + return _ctime( + arg0, ); } - late final _CFBitVectorCreateMutablePtr = _lookup< - ffi.NativeFunction< - CFMutableBitVectorRef Function( - CFAllocatorRef, CFIndex)>>('CFBitVectorCreateMutable'); - late final _CFBitVectorCreateMutable = _CFBitVectorCreateMutablePtr - .asFunction(); + late final _ctimePtr = _lookup< + ffi + .NativeFunction Function(ffi.Pointer)>>( + 'ctime'); + late final _ctime = _ctimePtr + .asFunction Function(ffi.Pointer)>(); - CFMutableBitVectorRef CFBitVectorCreateMutableCopy( - CFAllocatorRef allocator, - int capacity, - CFBitVectorRef bv, + double difftime( + int arg0, + int arg1, ) { - return _CFBitVectorCreateMutableCopy( - allocator, - capacity, - bv, + return _difftime( + arg0, + arg1, ); } - late final _CFBitVectorCreateMutableCopyPtr = _lookup< - ffi.NativeFunction< - CFMutableBitVectorRef Function(CFAllocatorRef, CFIndex, - CFBitVectorRef)>>('CFBitVectorCreateMutableCopy'); - late final _CFBitVectorCreateMutableCopy = - _CFBitVectorCreateMutableCopyPtr.asFunction< - CFMutableBitVectorRef Function( - CFAllocatorRef, int, CFBitVectorRef)>(); + late final _difftimePtr = + _lookup>( + 'difftime'); + late final _difftime = _difftimePtr.asFunction(); - int CFBitVectorGetCount( - CFBitVectorRef bv, + ffi.Pointer getdate( + ffi.Pointer arg0, ) { - return _CFBitVectorGetCount( - bv, + return _getdate( + arg0, ); } - late final _CFBitVectorGetCountPtr = - _lookup>( - 'CFBitVectorGetCount'); - late final _CFBitVectorGetCount = - _CFBitVectorGetCountPtr.asFunction(); + late final _getdatePtr = _lookup< + ffi.NativeFunction Function(ffi.Pointer)>>( + 'getdate'); + late final _getdate = + _getdatePtr.asFunction Function(ffi.Pointer)>(); - int CFBitVectorGetCountOfBit( - CFBitVectorRef bv, - CFRange range, - int value, + ffi.Pointer gmtime( + ffi.Pointer arg0, ) { - return _CFBitVectorGetCountOfBit( - bv, - range, - value, + return _gmtime( + arg0, ); } - late final _CFBitVectorGetCountOfBitPtr = _lookup< - ffi.NativeFunction>( - 'CFBitVectorGetCountOfBit'); - late final _CFBitVectorGetCountOfBit = _CFBitVectorGetCountOfBitPtr - .asFunction(); + late final _gmtimePtr = _lookup< + ffi + .NativeFunction Function(ffi.Pointer)>>('gmtime'); + late final _gmtime = + _gmtimePtr.asFunction Function(ffi.Pointer)>(); - int CFBitVectorContainsBit( - CFBitVectorRef bv, - CFRange range, - int value, + ffi.Pointer localtime( + ffi.Pointer arg0, ) { - return _CFBitVectorContainsBit( - bv, - range, - value, + return _localtime( + arg0, ); } - late final _CFBitVectorContainsBitPtr = _lookup< - ffi.NativeFunction>( - 'CFBitVectorContainsBit'); - late final _CFBitVectorContainsBit = _CFBitVectorContainsBitPtr.asFunction< - int Function(CFBitVectorRef, CFRange, int)>(); + late final _localtimePtr = _lookup< + ffi.NativeFunction Function(ffi.Pointer)>>( + 'localtime'); + late final _localtime = + _localtimePtr.asFunction Function(ffi.Pointer)>(); - int CFBitVectorGetBitAtIndex( - CFBitVectorRef bv, - int idx, + int mktime( + ffi.Pointer arg0, ) { - return _CFBitVectorGetBitAtIndex( - bv, - idx, + return _mktime( + arg0, ); } - late final _CFBitVectorGetBitAtIndexPtr = - _lookup>( - 'CFBitVectorGetBitAtIndex'); - late final _CFBitVectorGetBitAtIndex = _CFBitVectorGetBitAtIndexPtr - .asFunction(); + late final _mktimePtr = + _lookup)>>('mktime'); + late final _mktime = _mktimePtr.asFunction)>(); - void CFBitVectorGetBits( - CFBitVectorRef bv, - CFRange range, - ffi.Pointer bytes, + int strftime( + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, ) { - return _CFBitVectorGetBits( - bv, - range, - bytes, + return _strftime( + arg0, + arg1, + arg2, + arg3, ); } - late final _CFBitVectorGetBitsPtr = _lookup< + late final _strftimePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFBitVectorRef, CFRange, - ffi.Pointer)>>('CFBitVectorGetBits'); - late final _CFBitVectorGetBits = _CFBitVectorGetBitsPtr.asFunction< - void Function(CFBitVectorRef, CFRange, 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)>(); - int CFBitVectorGetFirstIndexOfBit( - CFBitVectorRef bv, - CFRange range, - int value, + ffi.Pointer strptime( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, ) { - return _CFBitVectorGetFirstIndexOfBit( - bv, - range, - value, + return _strptime( + arg0, + arg1, + arg2, ); } - late final _CFBitVectorGetFirstIndexOfBitPtr = _lookup< - ffi.NativeFunction>( - 'CFBitVectorGetFirstIndexOfBit'); - late final _CFBitVectorGetFirstIndexOfBit = _CFBitVectorGetFirstIndexOfBitPtr - .asFunction(); + 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 CFBitVectorGetLastIndexOfBit( - CFBitVectorRef bv, - CFRange range, - int value, + int time( + ffi.Pointer arg0, ) { - return _CFBitVectorGetLastIndexOfBit( - bv, - range, - value, + return _time( + arg0, ); } - late final _CFBitVectorGetLastIndexOfBitPtr = _lookup< - ffi.NativeFunction>( - 'CFBitVectorGetLastIndexOfBit'); - late final _CFBitVectorGetLastIndexOfBit = _CFBitVectorGetLastIndexOfBitPtr - .asFunction(); + late final _timePtr = + _lookup)>>('time'); + late final _time = _timePtr.asFunction)>(); - void CFBitVectorSetCount( - CFMutableBitVectorRef bv, - int count, - ) { - return _CFBitVectorSetCount( - bv, - count, - ); + void tzset() { + return _tzset(); } - late final _CFBitVectorSetCountPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFMutableBitVectorRef, CFIndex)>>('CFBitVectorSetCount'); - late final _CFBitVectorSetCount = _CFBitVectorSetCountPtr.asFunction< - void Function(CFMutableBitVectorRef, int)>(); + late final _tzsetPtr = + _lookup>('tzset'); + late final _tzset = _tzsetPtr.asFunction(); - void CFBitVectorFlipBitAtIndex( - CFMutableBitVectorRef bv, - int idx, + ffi.Pointer asctime_r( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _CFBitVectorFlipBitAtIndex( - bv, - idx, + return _asctime_r( + arg0, + arg1, ); } - late final _CFBitVectorFlipBitAtIndexPtr = _lookup< + late final _asctime_rPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - CFMutableBitVectorRef, CFIndex)>>('CFBitVectorFlipBitAtIndex'); - late final _CFBitVectorFlipBitAtIndex = _CFBitVectorFlipBitAtIndexPtr - .asFunction(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('asctime_r'); + late final _asctime_r = _asctime_rPtr.asFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>(); - void CFBitVectorFlipBits( - CFMutableBitVectorRef bv, - CFRange range, + ffi.Pointer ctime_r( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _CFBitVectorFlipBits( - bv, - range, + return _ctime_r( + arg0, + arg1, ); } - late final _CFBitVectorFlipBitsPtr = _lookup< + late final _ctime_rPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - CFMutableBitVectorRef, CFRange)>>('CFBitVectorFlipBits'); - late final _CFBitVectorFlipBits = _CFBitVectorFlipBitsPtr.asFunction< - void Function(CFMutableBitVectorRef, CFRange)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('ctime_r'); + late final _ctime_r = _ctime_rPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - void CFBitVectorSetBitAtIndex( - CFMutableBitVectorRef bv, - int idx, - int value, + ffi.Pointer gmtime_r( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _CFBitVectorSetBitAtIndex( - bv, - idx, - value, + return _gmtime_r( + arg0, + arg1, ); } - late final _CFBitVectorSetBitAtIndexPtr = _lookup< + late final _gmtime_rPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFMutableBitVectorRef, CFIndex, - CFBit)>>('CFBitVectorSetBitAtIndex'); - late final _CFBitVectorSetBitAtIndex = _CFBitVectorSetBitAtIndexPtr - .asFunction(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('gmtime_r'); + late final _gmtime_r = _gmtime_rPtr.asFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>(); - void CFBitVectorSetBits( - CFMutableBitVectorRef bv, - CFRange range, - int value, + ffi.Pointer localtime_r( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _CFBitVectorSetBits( - bv, - range, - value, + return _localtime_r( + arg0, + arg1, ); } - late final _CFBitVectorSetBitsPtr = _lookup< + late final _localtime_rPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - CFMutableBitVectorRef, CFRange, CFBit)>>('CFBitVectorSetBits'); - late final _CFBitVectorSetBits = _CFBitVectorSetBitsPtr.asFunction< - void Function(CFMutableBitVectorRef, CFRange, int)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('localtime_r'); + late final _localtime_r = _localtime_rPtr.asFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>(); - void CFBitVectorSetAllBits( - CFMutableBitVectorRef bv, - int value, + int posix2time( + int arg0, ) { - return _CFBitVectorSetAllBits( - bv, - value, + return _posix2time( + arg0, ); } - late final _CFBitVectorSetAllBitsPtr = _lookup< - ffi.NativeFunction>( - 'CFBitVectorSetAllBits'); - late final _CFBitVectorSetAllBits = _CFBitVectorSetAllBitsPtr.asFunction< - void Function(CFMutableBitVectorRef, int)>(); + late final _posix2timePtr = + _lookup>('posix2time'); + late final _posix2time = _posix2timePtr.asFunction(); - late final ffi.Pointer - _kCFTypeDictionaryKeyCallBacks = - _lookup('kCFTypeDictionaryKeyCallBacks'); + void tzsetwall() { + return _tzsetwall(); + } - CFDictionaryKeyCallBacks get kCFTypeDictionaryKeyCallBacks => - _kCFTypeDictionaryKeyCallBacks.ref; + late final _tzsetwallPtr = + _lookup>('tzsetwall'); + late final _tzsetwall = _tzsetwallPtr.asFunction(); - late final ffi.Pointer - _kCFCopyStringDictionaryKeyCallBacks = - _lookup('kCFCopyStringDictionaryKeyCallBacks'); + int time2posix( + int arg0, + ) { + return _time2posix( + arg0, + ); + } - CFDictionaryKeyCallBacks get kCFCopyStringDictionaryKeyCallBacks => - _kCFCopyStringDictionaryKeyCallBacks.ref; + late final _time2posixPtr = + _lookup>('time2posix'); + late final _time2posix = _time2posixPtr.asFunction(); - late final ffi.Pointer - _kCFTypeDictionaryValueCallBacks = - _lookup('kCFTypeDictionaryValueCallBacks'); + int timelocal( + ffi.Pointer arg0, + ) { + return _timelocal( + arg0, + ); + } - CFDictionaryValueCallBacks get kCFTypeDictionaryValueCallBacks => - _kCFTypeDictionaryValueCallBacks.ref; + late final _timelocalPtr = + _lookup)>>( + 'timelocal'); + late final _timelocal = + _timelocalPtr.asFunction)>(); - int CFDictionaryGetTypeID() { - return _CFDictionaryGetTypeID(); + int timegm( + ffi.Pointer arg0, + ) { + return _timegm( + arg0, + ); } - late final _CFDictionaryGetTypeIDPtr = - _lookup>('CFDictionaryGetTypeID'); - late final _CFDictionaryGetTypeID = - _CFDictionaryGetTypeIDPtr.asFunction(); + late final _timegmPtr = + _lookup)>>('timegm'); + late final _timegm = _timegmPtr.asFunction)>(); - CFDictionaryRef CFDictionaryCreate( - CFAllocatorRef allocator, - ffi.Pointer> keys, - ffi.Pointer> values, - int numValues, - ffi.Pointer keyCallBacks, - ffi.Pointer valueCallBacks, + int nanosleep( + ffi.Pointer __rqtp, + ffi.Pointer __rmtp, ) { - return _CFDictionaryCreate( - allocator, - keys, - values, - numValues, - keyCallBacks, - valueCallBacks, + return _nanosleep( + __rqtp, + __rmtp, ); } - late final _CFDictionaryCreatePtr = _lookup< + late final _nanosleepPtr = _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)>(); + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('nanosleep'); + late final _nanosleep = _nanosleepPtr + .asFunction, ffi.Pointer)>(); - CFDictionaryRef CFDictionaryCreateCopy( - CFAllocatorRef allocator, - CFDictionaryRef theDict, + int clock_getres( + int __clock_id, + ffi.Pointer __res, ) { - return _CFDictionaryCreateCopy( - allocator, - theDict, + return _clock_getres( + __clock_id, + __res, ); } - late final _CFDictionaryCreateCopyPtr = _lookup< - ffi.NativeFunction< - CFDictionaryRef Function( - CFAllocatorRef, CFDictionaryRef)>>('CFDictionaryCreateCopy'); - late final _CFDictionaryCreateCopy = _CFDictionaryCreateCopyPtr.asFunction< - CFDictionaryRef Function(CFAllocatorRef, CFDictionaryRef)>(); + late final _clock_getresPtr = _lookup< + ffi + .NativeFunction)>>( + 'clock_getres'); + late final _clock_getres = + _clock_getresPtr.asFunction)>(); - CFMutableDictionaryRef CFDictionaryCreateMutable( - CFAllocatorRef allocator, - int capacity, - ffi.Pointer keyCallBacks, - ffi.Pointer valueCallBacks, + int clock_gettime( + int __clock_id, + ffi.Pointer __tp, ) { - return _CFDictionaryCreateMutable( - allocator, - capacity, - keyCallBacks, - valueCallBacks, + return _clock_gettime( + __clock_id, + __tp, ); } - 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 _clock_gettimePtr = _lookup< + ffi + .NativeFunction)>>( + 'clock_gettime'); + late final _clock_gettime = + _clock_gettimePtr.asFunction)>(); - CFMutableDictionaryRef CFDictionaryCreateMutableCopy( - CFAllocatorRef allocator, - int capacity, - CFDictionaryRef theDict, + int clock_gettime_nsec_np( + int __clock_id, ) { - return _CFDictionaryCreateMutableCopy( - allocator, - capacity, - theDict, + return _clock_gettime_nsec_np( + __clock_id, ); } - late final _CFDictionaryCreateMutableCopyPtr = _lookup< - ffi.NativeFunction< - CFMutableDictionaryRef Function(CFAllocatorRef, CFIndex, - CFDictionaryRef)>>('CFDictionaryCreateMutableCopy'); - late final _CFDictionaryCreateMutableCopy = - _CFDictionaryCreateMutableCopyPtr.asFunction< - CFMutableDictionaryRef Function( - CFAllocatorRef, int, CFDictionaryRef)>(); + late final _clock_gettime_nsec_npPtr = + _lookup>( + 'clock_gettime_nsec_np'); + late final _clock_gettime_nsec_np = + _clock_gettime_nsec_npPtr.asFunction(); - int CFDictionaryGetCount( - CFDictionaryRef theDict, + int clock_settime( + int __clock_id, + ffi.Pointer __tp, ) { - return _CFDictionaryGetCount( - theDict, + return _clock_settime( + __clock_id, + __tp, ); } - late final _CFDictionaryGetCountPtr = - _lookup>( - 'CFDictionaryGetCount'); - late final _CFDictionaryGetCount = - _CFDictionaryGetCountPtr.asFunction(); + late final _clock_settimePtr = _lookup< + ffi + .NativeFunction)>>( + 'clock_settime'); + late final _clock_settime = + _clock_settimePtr.asFunction)>(); - int CFDictionaryGetCountOfKey( - CFDictionaryRef theDict, - ffi.Pointer key, + int timespec_get( + ffi.Pointer ts, + int base, ) { - return _CFDictionaryGetCountOfKey( - theDict, - key, + return _timespec_get( + ts, + base, ); } - late final _CFDictionaryGetCountOfKeyPtr = _lookup< - ffi.NativeFunction< - CFIndex Function(CFDictionaryRef, - ffi.Pointer)>>('CFDictionaryGetCountOfKey'); - late final _CFDictionaryGetCountOfKey = _CFDictionaryGetCountOfKeyPtr - .asFunction)>(); + late final _timespec_getPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'timespec_get'); + late final _timespec_get = + _timespec_getPtr.asFunction, int)>(); - int CFDictionaryGetCountOfValue( - CFDictionaryRef theDict, - ffi.Pointer value, + int imaxabs( + int j, ) { - return _CFDictionaryGetCountOfValue( - theDict, - value, + return _imaxabs( + j, ); } - late final _CFDictionaryGetCountOfValuePtr = _lookup< - ffi.NativeFunction< - CFIndex Function(CFDictionaryRef, - ffi.Pointer)>>('CFDictionaryGetCountOfValue'); - late final _CFDictionaryGetCountOfValue = _CFDictionaryGetCountOfValuePtr - .asFunction)>(); + late final _imaxabsPtr = + _lookup>('imaxabs'); + late final _imaxabs = _imaxabsPtr.asFunction(); - int CFDictionaryContainsKey( - CFDictionaryRef theDict, - ffi.Pointer key, + imaxdiv_t imaxdiv( + int __numer, + int __denom, ) { - return _CFDictionaryContainsKey( - theDict, - key, + return _imaxdiv( + __numer, + __denom, ); } - late final _CFDictionaryContainsKeyPtr = _lookup< + 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< - Boolean Function(CFDictionaryRef, - ffi.Pointer)>>('CFDictionaryContainsKey'); - late final _CFDictionaryContainsKey = _CFDictionaryContainsKeyPtr.asFunction< - int Function(CFDictionaryRef, ffi.Pointer)>(); + intmax_t Function(ffi.Pointer, + ffi.Pointer>, ffi.Int)>>('strtoimax'); + late final _strtoimax = _strtoimaxPtr.asFunction< + int Function( + ffi.Pointer, ffi.Pointer>, int)>(); - int CFDictionaryContainsValue( - CFDictionaryRef theDict, - ffi.Pointer value, + int strtoumax( + ffi.Pointer __nptr, + ffi.Pointer> __endptr, + int __base, ) { - return _CFDictionaryContainsValue( - theDict, - value, + return _strtoumax( + __nptr, + __endptr, + __base, ); } - late final _CFDictionaryContainsValuePtr = _lookup< + late final _strtoumaxPtr = _lookup< ffi.NativeFunction< - Boolean Function(CFDictionaryRef, - ffi.Pointer)>>('CFDictionaryContainsValue'); - late final _CFDictionaryContainsValue = _CFDictionaryContainsValuePtr - .asFunction)>(); + uintmax_t Function(ffi.Pointer, + ffi.Pointer>, ffi.Int)>>('strtoumax'); + late final _strtoumax = _strtoumaxPtr.asFunction< + int Function( + ffi.Pointer, ffi.Pointer>, int)>(); - ffi.Pointer CFDictionaryGetValue( - CFDictionaryRef theDict, - ffi.Pointer key, + int wcstoimax( + ffi.Pointer __nptr, + ffi.Pointer> __endptr, + int __base, ) { - return _CFDictionaryGetValue( - theDict, - key, + return _wcstoimax( + __nptr, + __endptr, + __base, ); } - late final _CFDictionaryGetValuePtr = _lookup< + late final _wcstoimaxPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - CFDictionaryRef, ffi.Pointer)>>('CFDictionaryGetValue'); - late final _CFDictionaryGetValue = _CFDictionaryGetValuePtr.asFunction< - ffi.Pointer Function(CFDictionaryRef, ffi.Pointer)>(); + intmax_t Function(ffi.Pointer, + ffi.Pointer>, ffi.Int)>>('wcstoimax'); + late final _wcstoimax = _wcstoimaxPtr.asFunction< + int Function( + ffi.Pointer, ffi.Pointer>, int)>(); - int CFDictionaryGetValueIfPresent( - CFDictionaryRef theDict, - ffi.Pointer key, - ffi.Pointer> value, + int wcstoumax( + ffi.Pointer __nptr, + ffi.Pointer> __endptr, + int __base, ) { - return _CFDictionaryGetValueIfPresent( - theDict, - key, - value, + return _wcstoumax( + __nptr, + __endptr, + __base, ); } - 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 _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)>(); - void CFDictionaryGetKeysAndValues( - CFDictionaryRef theDict, - ffi.Pointer> keys, + 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 _CFDictionaryGetKeysAndValues( - theDict, - keys, + return _CFBagCreate( + allocator, values, + numValues, + callBacks, ); } - 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 _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)>(); - void CFDictionaryApplyFunction( - CFDictionaryRef theDict, - CFDictionaryApplierFunction applier, - ffi.Pointer context, + CFBagRef CFBagCreateCopy( + CFAllocatorRef allocator, + CFBagRef theBag, ) { - return _CFDictionaryApplyFunction( - theDict, - applier, - context, + return _CFBagCreateCopy( + allocator, + theBag, ); } - late final _CFDictionaryApplyFunctionPtr = _lookup< + 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< - ffi.Void Function(CFDictionaryRef, CFDictionaryApplierFunction, - ffi.Pointer)>>('CFDictionaryApplyFunction'); - late final _CFDictionaryApplyFunction = - _CFDictionaryApplyFunctionPtr.asFunction< - void Function(CFDictionaryRef, CFDictionaryApplierFunction, - ffi.Pointer)>(); + CFMutableBagRef Function(CFAllocatorRef, CFIndex, + ffi.Pointer)>>('CFBagCreateMutable'); + late final _CFBagCreateMutable = _CFBagCreateMutablePtr.asFunction< + CFMutableBagRef Function( + CFAllocatorRef, int, ffi.Pointer)>(); - void CFDictionaryAddValue( - CFMutableDictionaryRef theDict, - ffi.Pointer key, + 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 _CFDictionaryAddValue( - theDict, - key, + return _CFBagGetCountOfValue( + theBag, 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)>(); + late final _CFBagGetCountOfValuePtr = _lookup< + ffi + .NativeFunction)>>( + 'CFBagGetCountOfValue'); + late final _CFBagGetCountOfValue = _CFBagGetCountOfValuePtr.asFunction< + int Function(CFBagRef, ffi.Pointer)>(); - void CFDictionarySetValue( - CFMutableDictionaryRef theDict, - ffi.Pointer key, + int CFBagContainsValue( + CFBagRef theBag, ffi.Pointer value, ) { - return _CFDictionarySetValue( - theDict, - key, + return _CFBagContainsValue( + theBag, 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)>(); + late final _CFBagContainsValuePtr = _lookup< + ffi + .NativeFunction)>>( + 'CFBagContainsValue'); + late final _CFBagContainsValue = _CFBagContainsValuePtr.asFunction< + int Function(CFBagRef, ffi.Pointer)>(); - void CFDictionaryReplaceValue( - CFMutableDictionaryRef theDict, - ffi.Pointer key, + ffi.Pointer CFBagGetValue( + CFBagRef theBag, ffi.Pointer value, ) { - return _CFDictionaryReplaceValue( - theDict, - key, + return _CFBagGetValue( + theBag, value, ); } - late final _CFDictionaryReplaceValuePtr = _lookup< + late final _CFBagGetValuePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFMutableDictionaryRef, ffi.Pointer, - ffi.Pointer)>>('CFDictionaryReplaceValue'); - late final _CFDictionaryReplaceValue = - _CFDictionaryReplaceValuePtr.asFunction< - void Function(CFMutableDictionaryRef, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function( + CFBagRef, ffi.Pointer)>>('CFBagGetValue'); + late final _CFBagGetValue = _CFBagGetValuePtr.asFunction< + ffi.Pointer Function(CFBagRef, ffi.Pointer)>(); - void CFDictionaryRemoveValue( - CFMutableDictionaryRef theDict, - ffi.Pointer key, + int CFBagGetValueIfPresent( + CFBagRef theBag, + ffi.Pointer candidate, + ffi.Pointer> value, ) { - return _CFDictionaryRemoveValue( - theDict, - key, + return _CFBagGetValueIfPresent( + theBag, + candidate, + value, ); } - late final _CFDictionaryRemoveValuePtr = _lookup< + late final _CFBagGetValueIfPresentPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFMutableDictionaryRef, - ffi.Pointer)>>('CFDictionaryRemoveValue'); - late final _CFDictionaryRemoveValue = _CFDictionaryRemoveValuePtr.asFunction< - void Function(CFMutableDictionaryRef, ffi.Pointer)>(); + Boolean Function(CFBagRef, ffi.Pointer, + ffi.Pointer>)>>('CFBagGetValueIfPresent'); + late final _CFBagGetValueIfPresent = _CFBagGetValueIfPresentPtr.asFunction< + int Function(CFBagRef, ffi.Pointer, + ffi.Pointer>)>(); - void CFDictionaryRemoveAllValues( - CFMutableDictionaryRef theDict, + void CFBagGetValues( + CFBagRef theBag, + ffi.Pointer> values, ) { - return _CFDictionaryRemoveAllValues( - theDict, + return _CFBagGetValues( + theBag, + values, ); } - late final _CFDictionaryRemoveAllValuesPtr = - _lookup>( - 'CFDictionaryRemoveAllValues'); - late final _CFDictionaryRemoveAllValues = _CFDictionaryRemoveAllValuesPtr - .asFunction(); + late final _CFBagGetValuesPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFBagRef, ffi.Pointer>)>>('CFBagGetValues'); + late final _CFBagGetValues = _CFBagGetValuesPtr.asFunction< + void Function(CFBagRef, ffi.Pointer>)>(); - int CFNotificationCenterGetTypeID() { - return _CFNotificationCenterGetTypeID(); + void CFBagApplyFunction( + CFBagRef theBag, + CFBagApplierFunction applier, + ffi.Pointer context, + ) { + return _CFBagApplyFunction( + theBag, + applier, + context, + ); } - late final _CFNotificationCenterGetTypeIDPtr = - _lookup>( - 'CFNotificationCenterGetTypeID'); - late final _CFNotificationCenterGetTypeID = - _CFNotificationCenterGetTypeIDPtr.asFunction(); + 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)>(); - CFNotificationCenterRef CFNotificationCenterGetLocalCenter() { - return _CFNotificationCenterGetLocalCenter(); + void CFBagAddValue( + CFMutableBagRef theBag, + ffi.Pointer value, + ) { + return _CFBagAddValue( + theBag, + value, + ); } - 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()>(); + late final _CFBagAddValuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMutableBagRef, ffi.Pointer)>>('CFBagAddValue'); + late final _CFBagAddValue = _CFBagAddValuePtr.asFunction< + void Function(CFMutableBagRef, ffi.Pointer)>(); - CFNotificationCenterRef CFNotificationCenterGetDarwinNotifyCenter() { - return _CFNotificationCenterGetDarwinNotifyCenter(); + void CFBagReplaceValue( + CFMutableBagRef theBag, + ffi.Pointer value, + ) { + return _CFBagReplaceValue( + theBag, + value, + ); } - late final _CFNotificationCenterGetDarwinNotifyCenterPtr = - _lookup>( - 'CFNotificationCenterGetDarwinNotifyCenter'); - late final _CFNotificationCenterGetDarwinNotifyCenter = - _CFNotificationCenterGetDarwinNotifyCenterPtr.asFunction< - CFNotificationCenterRef Function()>(); + late final _CFBagReplaceValuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMutableBagRef, ffi.Pointer)>>('CFBagReplaceValue'); + late final _CFBagReplaceValue = _CFBagReplaceValuePtr.asFunction< + void Function(CFMutableBagRef, ffi.Pointer)>(); - void CFNotificationCenterAddObserver( - CFNotificationCenterRef center, - ffi.Pointer observer, - CFNotificationCallback callBack, - CFStringRef name, - ffi.Pointer object, - int suspensionBehavior, + void CFBagSetValue( + CFMutableBagRef theBag, + ffi.Pointer value, ) { - return _CFNotificationCenterAddObserver( - center, - observer, - callBack, - name, - object, - suspensionBehavior, + return _CFBagSetValue( + theBag, + value, ); } - late final _CFNotificationCenterAddObserverPtr = _lookup< + late final _CFBagSetValuePtr = _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)>(); + CFMutableBagRef, ffi.Pointer)>>('CFBagSetValue'); + late final _CFBagSetValue = _CFBagSetValuePtr.asFunction< + void Function(CFMutableBagRef, ffi.Pointer)>(); - void CFNotificationCenterRemoveObserver( - CFNotificationCenterRef center, - ffi.Pointer observer, - CFNotificationName name, - ffi.Pointer object, + void CFBagRemoveValue( + CFMutableBagRef theBag, + ffi.Pointer value, ) { - return _CFNotificationCenterRemoveObserver( - center, - observer, - name, - object, + return _CFBagRemoveValue( + theBag, + value, ); } - late final _CFNotificationCenterRemoveObserverPtr = _lookup< + late final _CFBagRemoveValuePtr = _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)>(); + CFMutableBagRef, ffi.Pointer)>>('CFBagRemoveValue'); + late final _CFBagRemoveValue = _CFBagRemoveValuePtr.asFunction< + void Function(CFMutableBagRef, ffi.Pointer)>(); - void CFNotificationCenterRemoveEveryObserver( - CFNotificationCenterRef center, - ffi.Pointer observer, + void CFBagRemoveAllValues( + CFMutableBagRef theBag, ) { - return _CFNotificationCenterRemoveEveryObserver( - center, - observer, + return _CFBagRemoveAllValues( + theBag, ); } - 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 _CFBagRemoveAllValuesPtr = + _lookup>( + 'CFBagRemoveAllValues'); + late final _CFBagRemoveAllValues = + _CFBagRemoveAllValuesPtr.asFunction(); - void CFNotificationCenterPostNotification( - CFNotificationCenterRef center, - CFNotificationName name, - ffi.Pointer object, - CFDictionaryRef userInfo, - int deliverImmediately, + 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 _CFNotificationCenterPostNotification( - center, - name, - object, - userInfo, - deliverImmediately, + return _CFBinaryHeapCreate( + allocator, + capacity, + callBacks, + compareContext, ); } - late final _CFNotificationCenterPostNotificationPtr = _lookup< + late final _CFBinaryHeapCreatePtr = _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 Function( + CFAllocatorRef, + CFIndex, + ffi.Pointer, + ffi.Pointer)>>('CFBinaryHeapCreate'); + late final _CFBinaryHeapCreate = _CFBinaryHeapCreatePtr.asFunction< + CFBinaryHeapRef Function( + CFAllocatorRef, + int, + ffi.Pointer, + ffi.Pointer)>(); - void CFNotificationCenterPostNotificationWithOptions( - CFNotificationCenterRef center, - CFNotificationName name, - ffi.Pointer object, - CFDictionaryRef userInfo, - int options, + CFBinaryHeapRef CFBinaryHeapCreateCopy( + CFAllocatorRef allocator, + int capacity, + CFBinaryHeapRef heap, ) { - return _CFNotificationCenterPostNotificationWithOptions( - center, - name, - object, - userInfo, - options, + return _CFBinaryHeapCreateCopy( + allocator, + capacity, + 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 _CFBinaryHeapCreateCopyPtr = _lookup< + ffi.NativeFunction< + CFBinaryHeapRef Function(CFAllocatorRef, CFIndex, + CFBinaryHeapRef)>>('CFBinaryHeapCreateCopy'); + late final _CFBinaryHeapCreateCopy = _CFBinaryHeapCreateCopyPtr.asFunction< + CFBinaryHeapRef Function(CFAllocatorRef, int, CFBinaryHeapRef)>(); - int CFLocaleGetTypeID() { - return _CFLocaleGetTypeID(); + int CFBinaryHeapGetCount( + CFBinaryHeapRef heap, + ) { + return _CFBinaryHeapGetCount( + heap, + ); } - late final _CFLocaleGetTypeIDPtr = - _lookup>('CFLocaleGetTypeID'); - late final _CFLocaleGetTypeID = - _CFLocaleGetTypeIDPtr.asFunction(); + late final _CFBinaryHeapGetCountPtr = + _lookup>( + 'CFBinaryHeapGetCount'); + late final _CFBinaryHeapGetCount = + _CFBinaryHeapGetCountPtr.asFunction(); - CFLocaleRef CFLocaleGetSystem() { - return _CFLocaleGetSystem(); + int CFBinaryHeapGetCountOfValue( + CFBinaryHeapRef heap, + ffi.Pointer value, + ) { + return _CFBinaryHeapGetCountOfValue( + heap, + value, + ); } - late final _CFLocaleGetSystemPtr = - _lookup>('CFLocaleGetSystem'); - late final _CFLocaleGetSystem = - _CFLocaleGetSystemPtr.asFunction(); + late final _CFBinaryHeapGetCountOfValuePtr = _lookup< + ffi.NativeFunction< + CFIndex Function(CFBinaryHeapRef, + ffi.Pointer)>>('CFBinaryHeapGetCountOfValue'); + late final _CFBinaryHeapGetCountOfValue = _CFBinaryHeapGetCountOfValuePtr + .asFunction)>(); - CFLocaleRef CFLocaleCopyCurrent() { - return _CFLocaleCopyCurrent(); + int CFBinaryHeapContainsValue( + CFBinaryHeapRef heap, + ffi.Pointer value, + ) { + return _CFBinaryHeapContainsValue( + heap, + value, + ); } - late final _CFLocaleCopyCurrentPtr = - _lookup>( - 'CFLocaleCopyCurrent'); - late final _CFLocaleCopyCurrent = - _CFLocaleCopyCurrentPtr.asFunction(); + late final _CFBinaryHeapContainsValuePtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFBinaryHeapRef, + ffi.Pointer)>>('CFBinaryHeapContainsValue'); + late final _CFBinaryHeapContainsValue = _CFBinaryHeapContainsValuePtr + .asFunction)>(); - CFArrayRef CFLocaleCopyAvailableLocaleIdentifiers() { - return _CFLocaleCopyAvailableLocaleIdentifiers(); + ffi.Pointer CFBinaryHeapGetMinimum( + CFBinaryHeapRef heap, + ) { + return _CFBinaryHeapGetMinimum( + heap, + ); } - late final _CFLocaleCopyAvailableLocaleIdentifiersPtr = - _lookup>( - 'CFLocaleCopyAvailableLocaleIdentifiers'); - late final _CFLocaleCopyAvailableLocaleIdentifiers = - _CFLocaleCopyAvailableLocaleIdentifiersPtr.asFunction< - CFArrayRef Function()>(); + late final _CFBinaryHeapGetMinimumPtr = _lookup< + ffi.NativeFunction Function(CFBinaryHeapRef)>>( + 'CFBinaryHeapGetMinimum'); + late final _CFBinaryHeapGetMinimum = _CFBinaryHeapGetMinimumPtr.asFunction< + ffi.Pointer Function(CFBinaryHeapRef)>(); - CFArrayRef CFLocaleCopyISOLanguageCodes() { - return _CFLocaleCopyISOLanguageCodes(); + int CFBinaryHeapGetMinimumIfPresent( + CFBinaryHeapRef heap, + ffi.Pointer> value, + ) { + return _CFBinaryHeapGetMinimumIfPresent( + heap, + value, + ); } - late final _CFLocaleCopyISOLanguageCodesPtr = - _lookup>( - 'CFLocaleCopyISOLanguageCodes'); - late final _CFLocaleCopyISOLanguageCodes = - _CFLocaleCopyISOLanguageCodesPtr.asFunction(); + late final _CFBinaryHeapGetMinimumIfPresentPtr = _lookup< + ffi.NativeFunction< + Boolean Function( + CFBinaryHeapRef, ffi.Pointer>)>>( + 'CFBinaryHeapGetMinimumIfPresent'); + late final _CFBinaryHeapGetMinimumIfPresent = + _CFBinaryHeapGetMinimumIfPresentPtr.asFunction< + int Function(CFBinaryHeapRef, ffi.Pointer>)>(); - CFArrayRef CFLocaleCopyISOCountryCodes() { - return _CFLocaleCopyISOCountryCodes(); + void CFBinaryHeapGetValues( + CFBinaryHeapRef heap, + ffi.Pointer> values, + ) { + return _CFBinaryHeapGetValues( + heap, + values, + ); } - late final _CFLocaleCopyISOCountryCodesPtr = - _lookup>( - 'CFLocaleCopyISOCountryCodes'); - late final _CFLocaleCopyISOCountryCodes = - _CFLocaleCopyISOCountryCodesPtr.asFunction(); + late final _CFBinaryHeapGetValuesPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFBinaryHeapRef, + ffi.Pointer>)>>('CFBinaryHeapGetValues'); + late final _CFBinaryHeapGetValues = _CFBinaryHeapGetValuesPtr.asFunction< + void Function(CFBinaryHeapRef, ffi.Pointer>)>(); - CFArrayRef CFLocaleCopyISOCurrencyCodes() { - return _CFLocaleCopyISOCurrencyCodes(); + void CFBinaryHeapApplyFunction( + CFBinaryHeapRef heap, + CFBinaryHeapApplierFunction applier, + ffi.Pointer context, + ) { + return _CFBinaryHeapApplyFunction( + heap, + applier, + context, + ); } - late final _CFLocaleCopyISOCurrencyCodesPtr = - _lookup>( - 'CFLocaleCopyISOCurrencyCodes'); - late final _CFLocaleCopyISOCurrencyCodes = - _CFLocaleCopyISOCurrencyCodesPtr.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)>(); - CFArrayRef CFLocaleCopyCommonISOCurrencyCodes() { - return _CFLocaleCopyCommonISOCurrencyCodes(); + void CFBinaryHeapAddValue( + CFBinaryHeapRef heap, + ffi.Pointer value, + ) { + return _CFBinaryHeapAddValue( + heap, + value, + ); } - late final _CFLocaleCopyCommonISOCurrencyCodesPtr = - _lookup>( - 'CFLocaleCopyCommonISOCurrencyCodes'); - late final _CFLocaleCopyCommonISOCurrencyCodes = - _CFLocaleCopyCommonISOCurrencyCodesPtr.asFunction< - CFArrayRef Function()>(); + late final _CFBinaryHeapAddValuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFBinaryHeapRef, ffi.Pointer)>>('CFBinaryHeapAddValue'); + late final _CFBinaryHeapAddValue = _CFBinaryHeapAddValuePtr.asFunction< + void Function(CFBinaryHeapRef, ffi.Pointer)>(); - CFArrayRef CFLocaleCopyPreferredLanguages() { - return _CFLocaleCopyPreferredLanguages(); + void CFBinaryHeapRemoveMinimumValue( + CFBinaryHeapRef heap, + ) { + return _CFBinaryHeapRemoveMinimumValue( + heap, + ); } - late final _CFLocaleCopyPreferredLanguagesPtr = - _lookup>( - 'CFLocaleCopyPreferredLanguages'); - late final _CFLocaleCopyPreferredLanguages = - _CFLocaleCopyPreferredLanguagesPtr.asFunction(); + late final _CFBinaryHeapRemoveMinimumValuePtr = + _lookup>( + 'CFBinaryHeapRemoveMinimumValue'); + late final _CFBinaryHeapRemoveMinimumValue = + _CFBinaryHeapRemoveMinimumValuePtr.asFunction< + void Function(CFBinaryHeapRef)>(); - CFLocaleIdentifier CFLocaleCreateCanonicalLanguageIdentifierFromString( - CFAllocatorRef allocator, - CFStringRef localeIdentifier, + void CFBinaryHeapRemoveAllValues( + CFBinaryHeapRef heap, ) { - return _CFLocaleCreateCanonicalLanguageIdentifierFromString( - allocator, - localeIdentifier, + return _CFBinaryHeapRemoveAllValues( + heap, ); } - late final _CFLocaleCreateCanonicalLanguageIdentifierFromStringPtr = _lookup< - ffi.NativeFunction< - CFLocaleIdentifier Function(CFAllocatorRef, CFStringRef)>>( - 'CFLocaleCreateCanonicalLanguageIdentifierFromString'); - late final _CFLocaleCreateCanonicalLanguageIdentifierFromString = - _CFLocaleCreateCanonicalLanguageIdentifierFromStringPtr.asFunction< - CFLocaleIdentifier Function(CFAllocatorRef, CFStringRef)>(); + late final _CFBinaryHeapRemoveAllValuesPtr = + _lookup>( + 'CFBinaryHeapRemoveAllValues'); + late final _CFBinaryHeapRemoveAllValues = _CFBinaryHeapRemoveAllValuesPtr + .asFunction(); - CFLocaleIdentifier CFLocaleCreateCanonicalLocaleIdentifierFromString( + int CFBitVectorGetTypeID() { + return _CFBitVectorGetTypeID(); + } + + late final _CFBitVectorGetTypeIDPtr = + _lookup>('CFBitVectorGetTypeID'); + late final _CFBitVectorGetTypeID = + _CFBitVectorGetTypeIDPtr.asFunction(); + + CFBitVectorRef CFBitVectorCreate( CFAllocatorRef allocator, - CFStringRef localeIdentifier, + ffi.Pointer bytes, + int numBits, ) { - return _CFLocaleCreateCanonicalLocaleIdentifierFromString( + return _CFBitVectorCreate( allocator, - localeIdentifier, + bytes, + numBits, ); } - late final _CFLocaleCreateCanonicalLocaleIdentifierFromStringPtr = _lookup< - ffi.NativeFunction< - CFLocaleIdentifier Function(CFAllocatorRef, CFStringRef)>>( - 'CFLocaleCreateCanonicalLocaleIdentifierFromString'); - late final _CFLocaleCreateCanonicalLocaleIdentifierFromString = - _CFLocaleCreateCanonicalLocaleIdentifierFromStringPtr.asFunction< - CFLocaleIdentifier Function(CFAllocatorRef, CFStringRef)>(); + late final _CFBitVectorCreatePtr = _lookup< + ffi.NativeFunction< + CFBitVectorRef Function(CFAllocatorRef, ffi.Pointer, + CFIndex)>>('CFBitVectorCreate'); + late final _CFBitVectorCreate = _CFBitVectorCreatePtr.asFunction< + CFBitVectorRef Function(CFAllocatorRef, ffi.Pointer, int)>(); - CFLocaleIdentifier - CFLocaleCreateCanonicalLocaleIdentifierFromScriptManagerCodes( + CFBitVectorRef CFBitVectorCreateCopy( CFAllocatorRef allocator, - int lcode, - int rcode, + CFBitVectorRef bv, ) { - return _CFLocaleCreateCanonicalLocaleIdentifierFromScriptManagerCodes( + return _CFBitVectorCreateCopy( allocator, - lcode, - rcode, + bv, ); } - late final _CFLocaleCreateCanonicalLocaleIdentifierFromScriptManagerCodesPtr = - _lookup< - ffi.NativeFunction< - CFLocaleIdentifier Function( - CFAllocatorRef, LangCode, RegionCode)>>( - 'CFLocaleCreateCanonicalLocaleIdentifierFromScriptManagerCodes'); - late final _CFLocaleCreateCanonicalLocaleIdentifierFromScriptManagerCodes = - _CFLocaleCreateCanonicalLocaleIdentifierFromScriptManagerCodesPtr - .asFunction(); + late final _CFBitVectorCreateCopyPtr = _lookup< + ffi.NativeFunction< + CFBitVectorRef Function( + CFAllocatorRef, CFBitVectorRef)>>('CFBitVectorCreateCopy'); + late final _CFBitVectorCreateCopy = _CFBitVectorCreateCopyPtr.asFunction< + CFBitVectorRef Function(CFAllocatorRef, CFBitVectorRef)>(); - CFLocaleIdentifier CFLocaleCreateLocaleIdentifierFromWindowsLocaleCode( + CFMutableBitVectorRef CFBitVectorCreateMutable( CFAllocatorRef allocator, - int lcid, + int capacity, ) { - return _CFLocaleCreateLocaleIdentifierFromWindowsLocaleCode( + return _CFBitVectorCreateMutable( allocator, - lcid, + capacity, ); } - 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, + 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 _CFLocaleGetWindowsLocaleCodeFromLocaleIdentifier( - localeIdentifier, + return _CFBitVectorCreateMutableCopy( + allocator, + capacity, + bv, ); } - late final _CFLocaleGetWindowsLocaleCodeFromLocaleIdentifierPtr = - _lookup>( - 'CFLocaleGetWindowsLocaleCodeFromLocaleIdentifier'); - late final _CFLocaleGetWindowsLocaleCodeFromLocaleIdentifier = - _CFLocaleGetWindowsLocaleCodeFromLocaleIdentifierPtr.asFunction< - int Function(CFLocaleIdentifier)>(); + late final _CFBitVectorCreateMutableCopyPtr = _lookup< + ffi.NativeFunction< + CFMutableBitVectorRef Function(CFAllocatorRef, CFIndex, + CFBitVectorRef)>>('CFBitVectorCreateMutableCopy'); + late final _CFBitVectorCreateMutableCopy = + _CFBitVectorCreateMutableCopyPtr.asFunction< + CFMutableBitVectorRef Function( + CFAllocatorRef, int, CFBitVectorRef)>(); - int CFLocaleGetLanguageCharacterDirection( - CFStringRef isoLangCode, + int CFBitVectorGetCount( + CFBitVectorRef bv, ) { - return _CFLocaleGetLanguageCharacterDirection( - isoLangCode, + return _CFBitVectorGetCount( + bv, ); } - late final _CFLocaleGetLanguageCharacterDirectionPtr = - _lookup>( - 'CFLocaleGetLanguageCharacterDirection'); - late final _CFLocaleGetLanguageCharacterDirection = - _CFLocaleGetLanguageCharacterDirectionPtr.asFunction< - int Function(CFStringRef)>(); + late final _CFBitVectorGetCountPtr = + _lookup>( + 'CFBitVectorGetCount'); + late final _CFBitVectorGetCount = + _CFBitVectorGetCountPtr.asFunction(); - int CFLocaleGetLanguageLineDirection( - CFStringRef isoLangCode, + int CFBitVectorGetCountOfBit( + CFBitVectorRef bv, + CFRange range, + int value, ) { - return _CFLocaleGetLanguageLineDirection( - isoLangCode, + return _CFBitVectorGetCountOfBit( + bv, + range, + value, ); } - late final _CFLocaleGetLanguageLineDirectionPtr = - _lookup>( - 'CFLocaleGetLanguageLineDirection'); - late final _CFLocaleGetLanguageLineDirection = - _CFLocaleGetLanguageLineDirectionPtr.asFunction< - int Function(CFStringRef)>(); + late final _CFBitVectorGetCountOfBitPtr = _lookup< + ffi.NativeFunction>( + 'CFBitVectorGetCountOfBit'); + late final _CFBitVectorGetCountOfBit = _CFBitVectorGetCountOfBitPtr + .asFunction(); - CFDictionaryRef CFLocaleCreateComponentsFromLocaleIdentifier( - CFAllocatorRef allocator, - CFLocaleIdentifier localeID, + int CFBitVectorContainsBit( + CFBitVectorRef bv, + CFRange range, + int value, ) { - return _CFLocaleCreateComponentsFromLocaleIdentifier( - allocator, - localeID, + return _CFBitVectorContainsBit( + 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 _CFBitVectorContainsBitPtr = _lookup< + ffi.NativeFunction>( + 'CFBitVectorContainsBit'); + late final _CFBitVectorContainsBit = _CFBitVectorContainsBitPtr.asFunction< + int Function(CFBitVectorRef, CFRange, int)>(); - CFLocaleIdentifier CFLocaleCreateLocaleIdentifierFromComponents( - CFAllocatorRef allocator, - CFDictionaryRef dictionary, + int CFBitVectorGetBitAtIndex( + CFBitVectorRef bv, + int idx, ) { - return _CFLocaleCreateLocaleIdentifierFromComponents( - allocator, - dictionary, + return _CFBitVectorGetBitAtIndex( + bv, + idx, ); } - late final _CFLocaleCreateLocaleIdentifierFromComponentsPtr = _lookup< - ffi.NativeFunction< - CFLocaleIdentifier Function(CFAllocatorRef, CFDictionaryRef)>>( - 'CFLocaleCreateLocaleIdentifierFromComponents'); - late final _CFLocaleCreateLocaleIdentifierFromComponents = - _CFLocaleCreateLocaleIdentifierFromComponentsPtr.asFunction< - CFLocaleIdentifier Function(CFAllocatorRef, CFDictionaryRef)>(); + late final _CFBitVectorGetBitAtIndexPtr = + _lookup>( + 'CFBitVectorGetBitAtIndex'); + late final _CFBitVectorGetBitAtIndex = _CFBitVectorGetBitAtIndexPtr + .asFunction(); - CFLocaleRef CFLocaleCreate( - CFAllocatorRef allocator, - CFLocaleIdentifier localeIdentifier, + void CFBitVectorGetBits( + CFBitVectorRef bv, + CFRange range, + ffi.Pointer bytes, ) { - return _CFLocaleCreate( - allocator, - localeIdentifier, + return _CFBitVectorGetBits( + bv, + range, + bytes, ); } - late final _CFLocaleCreatePtr = _lookup< + late final _CFBitVectorGetBitsPtr = _lookup< ffi.NativeFunction< - CFLocaleRef Function( - CFAllocatorRef, CFLocaleIdentifier)>>('CFLocaleCreate'); - late final _CFLocaleCreate = _CFLocaleCreatePtr.asFunction< - CFLocaleRef Function(CFAllocatorRef, CFLocaleIdentifier)>(); + ffi.Void Function(CFBitVectorRef, CFRange, + ffi.Pointer)>>('CFBitVectorGetBits'); + late final _CFBitVectorGetBits = _CFBitVectorGetBitsPtr.asFunction< + void Function(CFBitVectorRef, CFRange, ffi.Pointer)>(); - CFLocaleRef CFLocaleCreateCopy( - CFAllocatorRef allocator, - CFLocaleRef locale, + int CFBitVectorGetFirstIndexOfBit( + CFBitVectorRef bv, + CFRange range, + int value, ) { - return _CFLocaleCreateCopy( - allocator, - locale, + return _CFBitVectorGetFirstIndexOfBit( + bv, + range, + value, ); } - late final _CFLocaleCreateCopyPtr = _lookup< - ffi.NativeFunction< - CFLocaleRef Function( - CFAllocatorRef, CFLocaleRef)>>('CFLocaleCreateCopy'); - late final _CFLocaleCreateCopy = _CFLocaleCreateCopyPtr.asFunction< - CFLocaleRef Function(CFAllocatorRef, CFLocaleRef)>(); + late final _CFBitVectorGetFirstIndexOfBitPtr = _lookup< + ffi.NativeFunction>( + 'CFBitVectorGetFirstIndexOfBit'); + late final _CFBitVectorGetFirstIndexOfBit = _CFBitVectorGetFirstIndexOfBitPtr + .asFunction(); - CFLocaleIdentifier CFLocaleGetIdentifier( - CFLocaleRef locale, + int CFBitVectorGetLastIndexOfBit( + CFBitVectorRef bv, + CFRange range, + int value, ) { - return _CFLocaleGetIdentifier( - locale, + return _CFBitVectorGetLastIndexOfBit( + bv, + range, + value, ); } - late final _CFLocaleGetIdentifierPtr = - _lookup>( - 'CFLocaleGetIdentifier'); - late final _CFLocaleGetIdentifier = _CFLocaleGetIdentifierPtr.asFunction< - CFLocaleIdentifier Function(CFLocaleRef)>(); + late final _CFBitVectorGetLastIndexOfBitPtr = _lookup< + ffi.NativeFunction>( + 'CFBitVectorGetLastIndexOfBit'); + late final _CFBitVectorGetLastIndexOfBit = _CFBitVectorGetLastIndexOfBitPtr + .asFunction(); - CFTypeRef CFLocaleGetValue( - CFLocaleRef locale, - CFLocaleKey key, + void CFBitVectorSetCount( + CFMutableBitVectorRef bv, + int count, ) { - return _CFLocaleGetValue( - locale, - key, + return _CFBitVectorSetCount( + bv, + count, ); } - late final _CFLocaleGetValuePtr = - _lookup>( - 'CFLocaleGetValue'); - late final _CFLocaleGetValue = _CFLocaleGetValuePtr.asFunction< - CFTypeRef Function(CFLocaleRef, CFLocaleKey)>(); + late final _CFBitVectorSetCountPtr = _lookup< + ffi + .NativeFunction>( + 'CFBitVectorSetCount'); + late final _CFBitVectorSetCount = _CFBitVectorSetCountPtr.asFunction< + void Function(CFMutableBitVectorRef, int)>(); - CFStringRef CFLocaleCopyDisplayNameForPropertyValue( - CFLocaleRef displayLocale, - CFLocaleKey key, - CFStringRef value, + void CFBitVectorFlipBitAtIndex( + CFMutableBitVectorRef bv, + int idx, ) { - return _CFLocaleCopyDisplayNameForPropertyValue( - displayLocale, - key, - value, + return _CFBitVectorFlipBitAtIndex( + bv, + idx, ); } - 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; + late final _CFBitVectorFlipBitAtIndexPtr = _lookup< + ffi + .NativeFunction>( + 'CFBitVectorFlipBitAtIndex'); + late final _CFBitVectorFlipBitAtIndex = _CFBitVectorFlipBitAtIndexPtr + .asFunction(); - set kCFLocaleCurrentLocaleDidChangeNotification(CFNotificationName value) => - _kCFLocaleCurrentLocaleDidChangeNotification.value = value; + void CFBitVectorFlipBits( + CFMutableBitVectorRef bv, + CFRange range, + ) { + return _CFBitVectorFlipBits( + bv, + range, + ); + } - late final ffi.Pointer _kCFLocaleIdentifier = - _lookup('kCFLocaleIdentifier'); + late final _CFBitVectorFlipBitsPtr = _lookup< + ffi + .NativeFunction>( + 'CFBitVectorFlipBits'); + late final _CFBitVectorFlipBits = _CFBitVectorFlipBitsPtr.asFunction< + void Function(CFMutableBitVectorRef, CFRange)>(); - CFLocaleKey get kCFLocaleIdentifier => _kCFLocaleIdentifier.value; + void CFBitVectorSetBitAtIndex( + CFMutableBitVectorRef bv, + int idx, + int value, + ) { + return _CFBitVectorSetBitAtIndex( + bv, + idx, + value, + ); + } - set kCFLocaleIdentifier(CFLocaleKey value) => - _kCFLocaleIdentifier.value = value; + late final _CFBitVectorSetBitAtIndexPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableBitVectorRef, CFIndex, + CFBit)>>('CFBitVectorSetBitAtIndex'); + late final _CFBitVectorSetBitAtIndex = _CFBitVectorSetBitAtIndexPtr + .asFunction(); - late final ffi.Pointer _kCFLocaleLanguageCode = - _lookup('kCFLocaleLanguageCode'); + void CFBitVectorSetBits( + CFMutableBitVectorRef bv, + CFRange range, + int value, + ) { + return _CFBitVectorSetBits( + bv, + range, + value, + ); + } - CFLocaleKey get kCFLocaleLanguageCode => _kCFLocaleLanguageCode.value; + late final _CFBitVectorSetBitsPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMutableBitVectorRef, CFRange, CFBit)>>('CFBitVectorSetBits'); + late final _CFBitVectorSetBits = _CFBitVectorSetBitsPtr.asFunction< + void Function(CFMutableBitVectorRef, CFRange, int)>(); - set kCFLocaleLanguageCode(CFLocaleKey value) => - _kCFLocaleLanguageCode.value = value; + void CFBitVectorSetAllBits( + CFMutableBitVectorRef bv, + int value, + ) { + return _CFBitVectorSetAllBits( + bv, + value, + ); + } - late final ffi.Pointer _kCFLocaleCountryCode = - _lookup('kCFLocaleCountryCode'); + late final _CFBitVectorSetAllBitsPtr = _lookup< + ffi.NativeFunction>( + 'CFBitVectorSetAllBits'); + late final _CFBitVectorSetAllBits = _CFBitVectorSetAllBitsPtr.asFunction< + void Function(CFMutableBitVectorRef, int)>(); - CFLocaleKey get kCFLocaleCountryCode => _kCFLocaleCountryCode.value; + late final ffi.Pointer + _kCFTypeDictionaryKeyCallBacks = + _lookup('kCFTypeDictionaryKeyCallBacks'); - set kCFLocaleCountryCode(CFLocaleKey value) => - _kCFLocaleCountryCode.value = value; + CFDictionaryKeyCallBacks get kCFTypeDictionaryKeyCallBacks => + _kCFTypeDictionaryKeyCallBacks.ref; - late final ffi.Pointer _kCFLocaleScriptCode = - _lookup('kCFLocaleScriptCode'); + late final ffi.Pointer + _kCFCopyStringDictionaryKeyCallBacks = + _lookup('kCFCopyStringDictionaryKeyCallBacks'); - CFLocaleKey get kCFLocaleScriptCode => _kCFLocaleScriptCode.value; + CFDictionaryKeyCallBacks get kCFCopyStringDictionaryKeyCallBacks => + _kCFCopyStringDictionaryKeyCallBacks.ref; - set kCFLocaleScriptCode(CFLocaleKey value) => - _kCFLocaleScriptCode.value = value; + late final ffi.Pointer + _kCFTypeDictionaryValueCallBacks = + _lookup('kCFTypeDictionaryValueCallBacks'); - late final ffi.Pointer _kCFLocaleVariantCode = - _lookup('kCFLocaleVariantCode'); + CFDictionaryValueCallBacks get kCFTypeDictionaryValueCallBacks => + _kCFTypeDictionaryValueCallBacks.ref; - CFLocaleKey get kCFLocaleVariantCode => _kCFLocaleVariantCode.value; + int CFDictionaryGetTypeID() { + return _CFDictionaryGetTypeID(); + } - set kCFLocaleVariantCode(CFLocaleKey value) => - _kCFLocaleVariantCode.value = value; + late final _CFDictionaryGetTypeIDPtr = + _lookup>('CFDictionaryGetTypeID'); + late final _CFDictionaryGetTypeID = + _CFDictionaryGetTypeIDPtr.asFunction(); - late final ffi.Pointer _kCFLocaleExemplarCharacterSet = - _lookup('kCFLocaleExemplarCharacterSet'); + 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, + ); + } - CFLocaleKey get kCFLocaleExemplarCharacterSet => - _kCFLocaleExemplarCharacterSet.value; + 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)>(); - set kCFLocaleExemplarCharacterSet(CFLocaleKey value) => - _kCFLocaleExemplarCharacterSet.value = value; + CFDictionaryRef CFDictionaryCreateCopy( + CFAllocatorRef allocator, + CFDictionaryRef theDict, + ) { + return _CFDictionaryCreateCopy( + allocator, + theDict, + ); + } - late final ffi.Pointer _kCFLocaleCalendarIdentifier = - _lookup('kCFLocaleCalendarIdentifier'); + late final _CFDictionaryCreateCopyPtr = _lookup< + ffi.NativeFunction< + CFDictionaryRef Function( + CFAllocatorRef, CFDictionaryRef)>>('CFDictionaryCreateCopy'); + late final _CFDictionaryCreateCopy = _CFDictionaryCreateCopyPtr.asFunction< + CFDictionaryRef Function(CFAllocatorRef, CFDictionaryRef)>(); - CFLocaleKey get kCFLocaleCalendarIdentifier => - _kCFLocaleCalendarIdentifier.value; + CFMutableDictionaryRef CFDictionaryCreateMutable( + CFAllocatorRef allocator, + int capacity, + ffi.Pointer keyCallBacks, + ffi.Pointer valueCallBacks, + ) { + return _CFDictionaryCreateMutable( + allocator, + capacity, + keyCallBacks, + valueCallBacks, + ); + } - set kCFLocaleCalendarIdentifier(CFLocaleKey value) => - _kCFLocaleCalendarIdentifier.value = value; + 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 ffi.Pointer _kCFLocaleCalendar = - _lookup('kCFLocaleCalendar'); + CFMutableDictionaryRef CFDictionaryCreateMutableCopy( + CFAllocatorRef allocator, + int capacity, + CFDictionaryRef theDict, + ) { + return _CFDictionaryCreateMutableCopy( + allocator, + capacity, + theDict, + ); + } - CFLocaleKey get kCFLocaleCalendar => _kCFLocaleCalendar.value; + late final _CFDictionaryCreateMutableCopyPtr = _lookup< + ffi.NativeFunction< + CFMutableDictionaryRef Function(CFAllocatorRef, CFIndex, + CFDictionaryRef)>>('CFDictionaryCreateMutableCopy'); + late final _CFDictionaryCreateMutableCopy = + _CFDictionaryCreateMutableCopyPtr.asFunction< + CFMutableDictionaryRef Function( + CFAllocatorRef, int, CFDictionaryRef)>(); - set kCFLocaleCalendar(CFLocaleKey value) => _kCFLocaleCalendar.value = value; + int CFDictionaryGetCount( + CFDictionaryRef theDict, + ) { + return _CFDictionaryGetCount( + theDict, + ); + } - late final ffi.Pointer _kCFLocaleCollationIdentifier = - _lookup('kCFLocaleCollationIdentifier'); + late final _CFDictionaryGetCountPtr = + _lookup>( + 'CFDictionaryGetCount'); + late final _CFDictionaryGetCount = + _CFDictionaryGetCountPtr.asFunction(); - CFLocaleKey get kCFLocaleCollationIdentifier => - _kCFLocaleCollationIdentifier.value; + int CFDictionaryGetCountOfKey( + CFDictionaryRef theDict, + ffi.Pointer key, + ) { + return _CFDictionaryGetCountOfKey( + theDict, + key, + ); + } - set kCFLocaleCollationIdentifier(CFLocaleKey value) => - _kCFLocaleCollationIdentifier.value = value; + late final _CFDictionaryGetCountOfKeyPtr = _lookup< + ffi.NativeFunction< + CFIndex Function(CFDictionaryRef, + ffi.Pointer)>>('CFDictionaryGetCountOfKey'); + late final _CFDictionaryGetCountOfKey = _CFDictionaryGetCountOfKeyPtr + .asFunction)>(); - late final ffi.Pointer _kCFLocaleUsesMetricSystem = - _lookup('kCFLocaleUsesMetricSystem'); + int CFDictionaryGetCountOfValue( + CFDictionaryRef theDict, + ffi.Pointer value, + ) { + return _CFDictionaryGetCountOfValue( + theDict, + value, + ); + } - 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; + late final _CFDictionaryGetCountOfValuePtr = _lookup< + ffi.NativeFunction< + CFIndex Function(CFDictionaryRef, + ffi.Pointer)>>('CFDictionaryGetCountOfValue'); + late final _CFDictionaryGetCountOfValue = _CFDictionaryGetCountOfValuePtr + .asFunction)>(); - double CFAbsoluteTimeGetCurrent() { - return _CFAbsoluteTimeGetCurrent(); + int CFDictionaryContainsKey( + CFDictionaryRef theDict, + ffi.Pointer key, + ) { + return _CFDictionaryContainsKey( + theDict, + key, + ); } - 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; + late final _CFDictionaryContainsKeyPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFDictionaryRef, + ffi.Pointer)>>('CFDictionaryContainsKey'); + late final _CFDictionaryContainsKey = _CFDictionaryContainsKeyPtr.asFunction< + int Function(CFDictionaryRef, ffi.Pointer)>(); - int CFDateGetTypeID() { - return _CFDateGetTypeID(); + int CFDictionaryContainsValue( + CFDictionaryRef theDict, + ffi.Pointer value, + ) { + return _CFDictionaryContainsValue( + theDict, + value, + ); } - late final _CFDateGetTypeIDPtr = - _lookup>('CFDateGetTypeID'); - late final _CFDateGetTypeID = - _CFDateGetTypeIDPtr.asFunction(); + late final _CFDictionaryContainsValuePtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFDictionaryRef, + ffi.Pointer)>>('CFDictionaryContainsValue'); + late final _CFDictionaryContainsValue = _CFDictionaryContainsValuePtr + .asFunction)>(); - CFDateRef CFDateCreate( - CFAllocatorRef allocator, - double at, + ffi.Pointer CFDictionaryGetValue( + CFDictionaryRef theDict, + ffi.Pointer key, ) { - return _CFDateCreate( - allocator, - at, + return _CFDictionaryGetValue( + theDict, + key, ); } - late final _CFDateCreatePtr = _lookup< + late final _CFDictionaryGetValuePtr = _lookup< ffi.NativeFunction< - CFDateRef Function(CFAllocatorRef, CFAbsoluteTime)>>('CFDateCreate'); - late final _CFDateCreate = - _CFDateCreatePtr.asFunction(); + ffi.Pointer Function( + CFDictionaryRef, ffi.Pointer)>>('CFDictionaryGetValue'); + late final _CFDictionaryGetValue = _CFDictionaryGetValuePtr.asFunction< + ffi.Pointer Function(CFDictionaryRef, ffi.Pointer)>(); - double CFDateGetAbsoluteTime( - CFDateRef theDate, + int CFDictionaryGetValueIfPresent( + CFDictionaryRef theDict, + ffi.Pointer key, + ffi.Pointer> value, ) { - return _CFDateGetAbsoluteTime( - theDate, + return _CFDictionaryGetValueIfPresent( + theDict, + key, + value, ); } - late final _CFDateGetAbsoluteTimePtr = - _lookup>( - 'CFDateGetAbsoluteTime'); - late final _CFDateGetAbsoluteTime = - _CFDateGetAbsoluteTimePtr.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 CFDateGetTimeIntervalSinceDate( - CFDateRef theDate, - CFDateRef otherDate, + void CFDictionaryGetKeysAndValues( + CFDictionaryRef theDict, + ffi.Pointer> keys, + ffi.Pointer> values, ) { - return _CFDateGetTimeIntervalSinceDate( - theDate, - otherDate, + return _CFDictionaryGetKeysAndValues( + theDict, + keys, + values, ); } - late final _CFDateGetTimeIntervalSinceDatePtr = _lookup< - ffi.NativeFunction>( - 'CFDateGetTimeIntervalSinceDate'); - late final _CFDateGetTimeIntervalSinceDate = - _CFDateGetTimeIntervalSinceDatePtr.asFunction< - double Function(CFDateRef, CFDateRef)>(); + 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 CFDateCompare( - CFDateRef theDate, - CFDateRef otherDate, + void CFDictionaryApplyFunction( + CFDictionaryRef theDict, + CFDictionaryApplierFunction applier, ffi.Pointer context, ) { - return _CFDateCompare( - theDate, - otherDate, + return _CFDictionaryApplyFunction( + theDict, + applier, context, ); } - late final _CFDateComparePtr = _lookup< + late final _CFDictionaryApplyFunctionPtr = _lookup< ffi.NativeFunction< - ffi.Int32 Function( - CFDateRef, CFDateRef, ffi.Pointer)>>('CFDateCompare'); - late final _CFDateCompare = _CFDateComparePtr.asFunction< - int Function(CFDateRef, CFDateRef, ffi.Pointer)>(); + ffi.Void Function(CFDictionaryRef, CFDictionaryApplierFunction, + ffi.Pointer)>>('CFDictionaryApplyFunction'); + late final _CFDictionaryApplyFunction = + _CFDictionaryApplyFunctionPtr.asFunction< + void Function(CFDictionaryRef, CFDictionaryApplierFunction, + ffi.Pointer)>(); - int CFGregorianDateIsValid( - CFGregorianDate gdate, - int unitFlags, + void CFDictionaryAddValue( + CFMutableDictionaryRef theDict, + ffi.Pointer key, + ffi.Pointer value, ) { - return _CFGregorianDateIsValid( - gdate, - unitFlags, + return _CFDictionaryAddValue( + theDict, + key, + value, ); } - late final _CFGregorianDateIsValidPtr = _lookup< - ffi.NativeFunction>( - 'CFGregorianDateIsValid'); - late final _CFGregorianDateIsValid = _CFGregorianDateIsValidPtr.asFunction< - int Function(CFGregorianDate, int)>(); + 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)>(); - double CFGregorianDateGetAbsoluteTime( - CFGregorianDate gdate, - CFTimeZoneRef tz, + void CFDictionarySetValue( + CFMutableDictionaryRef theDict, + ffi.Pointer key, + ffi.Pointer value, ) { - return _CFGregorianDateGetAbsoluteTime( - gdate, - tz, + return _CFDictionarySetValue( + theDict, + key, + value, ); } - late final _CFGregorianDateGetAbsoluteTimePtr = _lookup< + late final _CFDictionarySetValuePtr = _lookup< ffi.NativeFunction< - CFAbsoluteTime Function(CFGregorianDate, - CFTimeZoneRef)>>('CFGregorianDateGetAbsoluteTime'); - late final _CFGregorianDateGetAbsoluteTime = - _CFGregorianDateGetAbsoluteTimePtr.asFunction< - double Function(CFGregorianDate, CFTimeZoneRef)>(); + ffi.Void Function(CFMutableDictionaryRef, ffi.Pointer, + ffi.Pointer)>>('CFDictionarySetValue'); + late final _CFDictionarySetValue = _CFDictionarySetValuePtr.asFunction< + void Function(CFMutableDictionaryRef, ffi.Pointer, + ffi.Pointer)>(); - CFGregorianDate CFAbsoluteTimeGetGregorianDate( - double at, - CFTimeZoneRef tz, + void CFDictionaryReplaceValue( + CFMutableDictionaryRef theDict, + ffi.Pointer key, + ffi.Pointer value, ) { - return _CFAbsoluteTimeGetGregorianDate( - at, - tz, + return _CFDictionaryReplaceValue( + theDict, + key, + value, ); } - late final _CFAbsoluteTimeGetGregorianDatePtr = _lookup< + late final _CFDictionaryReplaceValuePtr = _lookup< ffi.NativeFunction< - CFGregorianDate Function(CFAbsoluteTime, - CFTimeZoneRef)>>('CFAbsoluteTimeGetGregorianDate'); - late final _CFAbsoluteTimeGetGregorianDate = - _CFAbsoluteTimeGetGregorianDatePtr.asFunction< - CFGregorianDate Function(double, CFTimeZoneRef)>(); + ffi.Void Function(CFMutableDictionaryRef, ffi.Pointer, + ffi.Pointer)>>('CFDictionaryReplaceValue'); + late final _CFDictionaryReplaceValue = + _CFDictionaryReplaceValuePtr.asFunction< + void Function(CFMutableDictionaryRef, ffi.Pointer, + ffi.Pointer)>(); - double CFAbsoluteTimeAddGregorianUnits( - double at, - CFTimeZoneRef tz, - CFGregorianUnits units, + void CFDictionaryRemoveValue( + CFMutableDictionaryRef theDict, + ffi.Pointer key, ) { - return _CFAbsoluteTimeAddGregorianUnits( - at, - tz, - units, + return _CFDictionaryRemoveValue( + theDict, + key, ); } - late final _CFAbsoluteTimeAddGregorianUnitsPtr = _lookup< + late final _CFDictionaryRemoveValuePtr = _lookup< ffi.NativeFunction< - CFAbsoluteTime Function(CFAbsoluteTime, CFTimeZoneRef, - CFGregorianUnits)>>('CFAbsoluteTimeAddGregorianUnits'); - late final _CFAbsoluteTimeAddGregorianUnits = - _CFAbsoluteTimeAddGregorianUnitsPtr.asFunction< - double Function(double, CFTimeZoneRef, CFGregorianUnits)>(); + ffi.Void Function(CFMutableDictionaryRef, + ffi.Pointer)>>('CFDictionaryRemoveValue'); + late final _CFDictionaryRemoveValue = _CFDictionaryRemoveValuePtr.asFunction< + void Function(CFMutableDictionaryRef, ffi.Pointer)>(); - CFGregorianUnits CFAbsoluteTimeGetDifferenceAsGregorianUnits( - double at1, - double at2, - CFTimeZoneRef tz, - int unitFlags, + void CFDictionaryRemoveAllValues( + CFMutableDictionaryRef theDict, ) { - return _CFAbsoluteTimeGetDifferenceAsGregorianUnits( - at1, - at2, - tz, - unitFlags, + return _CFDictionaryRemoveAllValues( + theDict, ); } - 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 _CFDictionaryRemoveAllValuesPtr = + _lookup>( + 'CFDictionaryRemoveAllValues'); + late final _CFDictionaryRemoveAllValues = _CFDictionaryRemoveAllValuesPtr + .asFunction(); - int CFAbsoluteTimeGetDayOfWeek( - double at, - CFTimeZoneRef tz, - ) { - return _CFAbsoluteTimeGetDayOfWeek( - at, - tz, - ); + int CFNotificationCenterGetTypeID() { + return _CFNotificationCenterGetTypeID(); } - late final _CFAbsoluteTimeGetDayOfWeekPtr = _lookup< - ffi.NativeFunction>( - 'CFAbsoluteTimeGetDayOfWeek'); - late final _CFAbsoluteTimeGetDayOfWeek = _CFAbsoluteTimeGetDayOfWeekPtr - .asFunction(); + late final _CFNotificationCenterGetTypeIDPtr = + _lookup>( + 'CFNotificationCenterGetTypeID'); + late final _CFNotificationCenterGetTypeID = + _CFNotificationCenterGetTypeIDPtr.asFunction(); - int CFAbsoluteTimeGetDayOfYear( - double at, - CFTimeZoneRef tz, - ) { - return _CFAbsoluteTimeGetDayOfYear( - at, - tz, - ); + CFNotificationCenterRef CFNotificationCenterGetLocalCenter() { + return _CFNotificationCenterGetLocalCenter(); } - late final _CFAbsoluteTimeGetDayOfYearPtr = _lookup< - ffi.NativeFunction>( - 'CFAbsoluteTimeGetDayOfYear'); - late final _CFAbsoluteTimeGetDayOfYear = _CFAbsoluteTimeGetDayOfYearPtr - .asFunction(); + late final _CFNotificationCenterGetLocalCenterPtr = + _lookup>( + 'CFNotificationCenterGetLocalCenter'); + late final _CFNotificationCenterGetLocalCenter = + _CFNotificationCenterGetLocalCenterPtr.asFunction< + CFNotificationCenterRef Function()>(); - int CFAbsoluteTimeGetWeekOfYear( - double at, - CFTimeZoneRef tz, - ) { - return _CFAbsoluteTimeGetWeekOfYear( - at, - tz, - ); + CFNotificationCenterRef CFNotificationCenterGetDistributedCenter() { + return _CFNotificationCenterGetDistributedCenter(); } - late final _CFAbsoluteTimeGetWeekOfYearPtr = _lookup< - ffi.NativeFunction>( - 'CFAbsoluteTimeGetWeekOfYear'); - late final _CFAbsoluteTimeGetWeekOfYear = _CFAbsoluteTimeGetWeekOfYearPtr - .asFunction(); + late final _CFNotificationCenterGetDistributedCenterPtr = + _lookup>( + 'CFNotificationCenterGetDistributedCenter'); + late final _CFNotificationCenterGetDistributedCenter = + _CFNotificationCenterGetDistributedCenterPtr.asFunction< + CFNotificationCenterRef Function()>(); - int CFDataGetTypeID() { - return _CFDataGetTypeID(); + CFNotificationCenterRef CFNotificationCenterGetDarwinNotifyCenter() { + return _CFNotificationCenterGetDarwinNotifyCenter(); } - late final _CFDataGetTypeIDPtr = - _lookup>('CFDataGetTypeID'); - late final _CFDataGetTypeID = - _CFDataGetTypeIDPtr.asFunction(); + late final _CFNotificationCenterGetDarwinNotifyCenterPtr = + _lookup>( + 'CFNotificationCenterGetDarwinNotifyCenter'); + late final _CFNotificationCenterGetDarwinNotifyCenter = + _CFNotificationCenterGetDarwinNotifyCenterPtr.asFunction< + CFNotificationCenterRef Function()>(); - CFDataRef CFDataCreate( - CFAllocatorRef allocator, - ffi.Pointer bytes, - int length, + void CFNotificationCenterAddObserver( + CFNotificationCenterRef center, + ffi.Pointer observer, + CFNotificationCallback callBack, + CFStringRef name, + ffi.Pointer object, + int suspensionBehavior, ) { - return _CFDataCreate( - allocator, - bytes, - length, + return _CFNotificationCenterAddObserver( + center, + observer, + callBack, + name, + object, + suspensionBehavior, ); } - late final _CFDataCreatePtr = _lookup< + late final _CFNotificationCenterAddObserverPtr = _lookup< ffi.NativeFunction< - CFDataRef Function( - CFAllocatorRef, ffi.Pointer, CFIndex)>>('CFDataCreate'); - late final _CFDataCreate = _CFDataCreatePtr.asFunction< - CFDataRef Function(CFAllocatorRef, ffi.Pointer, int)>(); + 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)>(); - CFDataRef CFDataCreateWithBytesNoCopy( - CFAllocatorRef allocator, - ffi.Pointer bytes, - int length, - CFAllocatorRef bytesDeallocator, + void CFNotificationCenterRemoveObserver( + CFNotificationCenterRef center, + ffi.Pointer observer, + CFNotificationName name, + ffi.Pointer object, ) { - return _CFDataCreateWithBytesNoCopy( - allocator, - bytes, - length, - bytesDeallocator, + return _CFNotificationCenterRemoveObserver( + center, + observer, + name, + object, ); } - late final _CFDataCreateWithBytesNoCopyPtr = _lookup< + late final _CFNotificationCenterRemoveObserverPtr = _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( + CFNotificationCenterRef, + ffi.Pointer, + CFNotificationName, + ffi.Pointer)>>('CFNotificationCenterRemoveObserver'); + late final _CFNotificationCenterRemoveObserver = + _CFNotificationCenterRemoveObserverPtr.asFunction< + void Function(CFNotificationCenterRef, ffi.Pointer, + CFNotificationName, ffi.Pointer)>(); - CFDataRef CFDataCreateCopy( - CFAllocatorRef allocator, - CFDataRef theData, + void CFNotificationCenterRemoveEveryObserver( + CFNotificationCenterRef center, + ffi.Pointer observer, ) { - return _CFDataCreateCopy( - allocator, - theData, + return _CFNotificationCenterRemoveEveryObserver( + center, + observer, ); } - late final _CFDataCreateCopyPtr = _lookup< - ffi.NativeFunction>( - 'CFDataCreateCopy'); - late final _CFDataCreateCopy = _CFDataCreateCopyPtr.asFunction< - CFDataRef Function(CFAllocatorRef, CFDataRef)>(); + late final _CFNotificationCenterRemoveEveryObserverPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFNotificationCenterRef, ffi.Pointer)>>( + 'CFNotificationCenterRemoveEveryObserver'); + late final _CFNotificationCenterRemoveEveryObserver = + _CFNotificationCenterRemoveEveryObserverPtr.asFunction< + void Function(CFNotificationCenterRef, ffi.Pointer)>(); - CFMutableDataRef CFDataCreateMutable( - CFAllocatorRef allocator, - int capacity, + void CFNotificationCenterPostNotification( + CFNotificationCenterRef center, + CFNotificationName name, + ffi.Pointer object, + CFDictionaryRef userInfo, + int deliverImmediately, ) { - return _CFDataCreateMutable( - allocator, - capacity, + return _CFNotificationCenterPostNotification( + center, + name, + object, + userInfo, + deliverImmediately, ); } - late final _CFDataCreateMutablePtr = _lookup< + late final _CFNotificationCenterPostNotificationPtr = _lookup< ffi.NativeFunction< - CFMutableDataRef Function( - CFAllocatorRef, CFIndex)>>('CFDataCreateMutable'); - late final _CFDataCreateMutable = _CFDataCreateMutablePtr.asFunction< - CFMutableDataRef Function(CFAllocatorRef, int)>(); + ffi.Void Function( + CFNotificationCenterRef, + CFNotificationName, + ffi.Pointer, + CFDictionaryRef, + Boolean)>>('CFNotificationCenterPostNotification'); + late final _CFNotificationCenterPostNotification = + _CFNotificationCenterPostNotificationPtr.asFunction< + void Function(CFNotificationCenterRef, CFNotificationName, + ffi.Pointer, CFDictionaryRef, int)>(); - CFMutableDataRef CFDataCreateMutableCopy( - CFAllocatorRef allocator, - int capacity, - CFDataRef theData, + void CFNotificationCenterPostNotificationWithOptions( + CFNotificationCenterRef center, + CFNotificationName name, + ffi.Pointer object, + CFDictionaryRef userInfo, + int options, ) { - return _CFDataCreateMutableCopy( - allocator, - capacity, - theData, + return _CFNotificationCenterPostNotificationWithOptions( + center, + name, + object, + userInfo, + options, ); } - late final _CFDataCreateMutableCopyPtr = _lookup< - ffi.NativeFunction< - CFMutableDataRef Function( - CFAllocatorRef, CFIndex, CFDataRef)>>('CFDataCreateMutableCopy'); - late final _CFDataCreateMutableCopy = _CFDataCreateMutableCopyPtr.asFunction< - CFMutableDataRef Function(CFAllocatorRef, int, CFDataRef)>(); + 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 CFDataGetLength( - CFDataRef theData, - ) { - return _CFDataGetLength( - theData, - ); + int CFLocaleGetTypeID() { + return _CFLocaleGetTypeID(); } - late final _CFDataGetLengthPtr = - _lookup>( - 'CFDataGetLength'); - late final _CFDataGetLength = - _CFDataGetLengthPtr.asFunction(); + late final _CFLocaleGetTypeIDPtr = + _lookup>('CFLocaleGetTypeID'); + late final _CFLocaleGetTypeID = + _CFLocaleGetTypeIDPtr.asFunction(); - ffi.Pointer CFDataGetBytePtr( - CFDataRef theData, - ) { - return _CFDataGetBytePtr( - theData, - ); + CFLocaleRef CFLocaleGetSystem() { + return _CFLocaleGetSystem(); } - late final _CFDataGetBytePtrPtr = - _lookup Function(CFDataRef)>>( - 'CFDataGetBytePtr'); - late final _CFDataGetBytePtr = - _CFDataGetBytePtrPtr.asFunction Function(CFDataRef)>(); + late final _CFLocaleGetSystemPtr = + _lookup>('CFLocaleGetSystem'); + late final _CFLocaleGetSystem = + _CFLocaleGetSystemPtr.asFunction(); - ffi.Pointer CFDataGetMutableBytePtr( - CFMutableDataRef theData, - ) { - return _CFDataGetMutableBytePtr( - theData, - ); + CFLocaleRef CFLocaleCopyCurrent() { + return _CFLocaleCopyCurrent(); } - late final _CFDataGetMutableBytePtrPtr = _lookup< - ffi.NativeFunction Function(CFMutableDataRef)>>( - 'CFDataGetMutableBytePtr'); - late final _CFDataGetMutableBytePtr = _CFDataGetMutableBytePtrPtr.asFunction< - ffi.Pointer Function(CFMutableDataRef)>(); + late final _CFLocaleCopyCurrentPtr = + _lookup>( + 'CFLocaleCopyCurrent'); + late final _CFLocaleCopyCurrent = + _CFLocaleCopyCurrentPtr.asFunction(); - void CFDataGetBytes( - CFDataRef theData, - CFRange range, - ffi.Pointer buffer, - ) { - return _CFDataGetBytes( - theData, - range, - buffer, - ); + CFArrayRef CFLocaleCopyAvailableLocaleIdentifiers() { + return _CFLocaleCopyAvailableLocaleIdentifiers(); } - 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 _CFLocaleCopyAvailableLocaleIdentifiersPtr = + _lookup>( + 'CFLocaleCopyAvailableLocaleIdentifiers'); + late final _CFLocaleCopyAvailableLocaleIdentifiers = + _CFLocaleCopyAvailableLocaleIdentifiersPtr.asFunction< + CFArrayRef Function()>(); - void CFDataSetLength( - CFMutableDataRef theData, - int length, - ) { - return _CFDataSetLength( - theData, - length, - ); + CFArrayRef CFLocaleCopyISOLanguageCodes() { + return _CFLocaleCopyISOLanguageCodes(); } - late final _CFDataSetLengthPtr = - _lookup>( - 'CFDataSetLength'); - late final _CFDataSetLength = - _CFDataSetLengthPtr.asFunction(); + late final _CFLocaleCopyISOLanguageCodesPtr = + _lookup>( + 'CFLocaleCopyISOLanguageCodes'); + late final _CFLocaleCopyISOLanguageCodes = + _CFLocaleCopyISOLanguageCodesPtr.asFunction(); - void CFDataIncreaseLength( - CFMutableDataRef theData, - int extraLength, - ) { - return _CFDataIncreaseLength( - theData, - extraLength, - ); + CFArrayRef CFLocaleCopyISOCountryCodes() { + return _CFLocaleCopyISOCountryCodes(); } - late final _CFDataIncreaseLengthPtr = - _lookup>( - 'CFDataIncreaseLength'); - late final _CFDataIncreaseLength = _CFDataIncreaseLengthPtr.asFunction< - void Function(CFMutableDataRef, int)>(); + late final _CFLocaleCopyISOCountryCodesPtr = + _lookup>( + 'CFLocaleCopyISOCountryCodes'); + late final _CFLocaleCopyISOCountryCodes = + _CFLocaleCopyISOCountryCodesPtr.asFunction(); - void CFDataAppendBytes( - CFMutableDataRef theData, - ffi.Pointer bytes, - int length, - ) { - return _CFDataAppendBytes( - theData, - bytes, - length, - ); + CFArrayRef CFLocaleCopyISOCurrencyCodes() { + return _CFLocaleCopyISOCurrencyCodes(); } - 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 _CFLocaleCopyISOCurrencyCodesPtr = + _lookup>( + 'CFLocaleCopyISOCurrencyCodes'); + late final _CFLocaleCopyISOCurrencyCodes = + _CFLocaleCopyISOCurrencyCodesPtr.asFunction(); - void CFDataReplaceBytes( - CFMutableDataRef theData, - CFRange range, - ffi.Pointer newBytes, - int newLength, - ) { - return _CFDataReplaceBytes( - theData, - range, - newBytes, - newLength, - ); + CFArrayRef CFLocaleCopyCommonISOCurrencyCodes() { + return _CFLocaleCopyCommonISOCurrencyCodes(); } - 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 _CFLocaleCopyCommonISOCurrencyCodesPtr = + _lookup>( + 'CFLocaleCopyCommonISOCurrencyCodes'); + late final _CFLocaleCopyCommonISOCurrencyCodes = + _CFLocaleCopyCommonISOCurrencyCodesPtr.asFunction< + CFArrayRef Function()>(); - void CFDataDeleteBytes( - CFMutableDataRef theData, - CFRange range, - ) { - return _CFDataDeleteBytes( - theData, - range, - ); + CFArrayRef CFLocaleCopyPreferredLanguages() { + return _CFLocaleCopyPreferredLanguages(); } - late final _CFDataDeleteBytesPtr = - _lookup>( - 'CFDataDeleteBytes'); - late final _CFDataDeleteBytes = _CFDataDeleteBytesPtr.asFunction< - void Function(CFMutableDataRef, CFRange)>(); + late final _CFLocaleCopyPreferredLanguagesPtr = + _lookup>( + 'CFLocaleCopyPreferredLanguages'); + late final _CFLocaleCopyPreferredLanguages = + _CFLocaleCopyPreferredLanguagesPtr.asFunction(); - CFRange CFDataFind( - CFDataRef theData, - CFDataRef dataToFind, - CFRange searchRange, - int compareOptions, + CFLocaleIdentifier CFLocaleCreateCanonicalLanguageIdentifierFromString( + CFAllocatorRef allocator, + CFStringRef localeIdentifier, ) { - return _CFDataFind( - theData, - dataToFind, - searchRange, - compareOptions, + return _CFLocaleCreateCanonicalLanguageIdentifierFromString( + allocator, + localeIdentifier, ); } - 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(); + late final _CFLocaleCreateCanonicalLanguageIdentifierFromStringPtr = _lookup< + ffi.NativeFunction< + CFLocaleIdentifier Function(CFAllocatorRef, CFStringRef)>>( + 'CFLocaleCreateCanonicalLanguageIdentifierFromString'); + late final _CFLocaleCreateCanonicalLanguageIdentifierFromString = + _CFLocaleCreateCanonicalLanguageIdentifierFromStringPtr.asFunction< + CFLocaleIdentifier Function(CFAllocatorRef, CFStringRef)>(); - CFCharacterSetRef CFCharacterSetGetPredefined( - int theSetIdentifier, + CFLocaleIdentifier CFLocaleCreateCanonicalLocaleIdentifierFromString( + CFAllocatorRef allocator, + CFStringRef localeIdentifier, ) { - return _CFCharacterSetGetPredefined( - theSetIdentifier, + return _CFLocaleCreateCanonicalLocaleIdentifierFromString( + allocator, + localeIdentifier, ); } - late final _CFCharacterSetGetPredefinedPtr = - _lookup>( - 'CFCharacterSetGetPredefined'); - late final _CFCharacterSetGetPredefined = _CFCharacterSetGetPredefinedPtr - .asFunction(); + late final _CFLocaleCreateCanonicalLocaleIdentifierFromStringPtr = _lookup< + ffi.NativeFunction< + CFLocaleIdentifier Function(CFAllocatorRef, CFStringRef)>>( + 'CFLocaleCreateCanonicalLocaleIdentifierFromString'); + late final _CFLocaleCreateCanonicalLocaleIdentifierFromString = + _CFLocaleCreateCanonicalLocaleIdentifierFromStringPtr.asFunction< + CFLocaleIdentifier Function(CFAllocatorRef, CFStringRef)>(); - CFCharacterSetRef CFCharacterSetCreateWithCharactersInRange( - CFAllocatorRef alloc, - CFRange theRange, + CFLocaleIdentifier + CFLocaleCreateCanonicalLocaleIdentifierFromScriptManagerCodes( + CFAllocatorRef allocator, + int lcode, + int rcode, ) { - return _CFCharacterSetCreateWithCharactersInRange( - alloc, - theRange, + return _CFLocaleCreateCanonicalLocaleIdentifierFromScriptManagerCodes( + allocator, + lcode, + rcode, ); } - 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)>(); + late final _CFLocaleCreateCanonicalLocaleIdentifierFromScriptManagerCodesPtr = + _lookup< + ffi.NativeFunction< + CFLocaleIdentifier Function( + CFAllocatorRef, LangCode, RegionCode)>>( + 'CFLocaleCreateCanonicalLocaleIdentifierFromScriptManagerCodes'); + late final _CFLocaleCreateCanonicalLocaleIdentifierFromScriptManagerCodes = + _CFLocaleCreateCanonicalLocaleIdentifierFromScriptManagerCodesPtr + .asFunction(); - CFCharacterSetRef CFCharacterSetCreateWithBitmapRepresentation( - CFAllocatorRef alloc, - CFDataRef theData, + CFLocaleIdentifier CFLocaleCreateLocaleIdentifierFromWindowsLocaleCode( + CFAllocatorRef allocator, + int lcid, ) { - return _CFCharacterSetCreateWithBitmapRepresentation( - alloc, - theData, + return _CFLocaleCreateLocaleIdentifierFromWindowsLocaleCode( + allocator, + lcid, ); } - late final _CFCharacterSetCreateWithBitmapRepresentationPtr = _lookup< - ffi.NativeFunction< - CFCharacterSetRef Function(CFAllocatorRef, - CFDataRef)>>('CFCharacterSetCreateWithBitmapRepresentation'); - late final _CFCharacterSetCreateWithBitmapRepresentation = - _CFCharacterSetCreateWithBitmapRepresentationPtr.asFunction< - CFCharacterSetRef Function(CFAllocatorRef, CFDataRef)>(); + late final _CFLocaleCreateLocaleIdentifierFromWindowsLocaleCodePtr = _lookup< + ffi.NativeFunction< + CFLocaleIdentifier Function(CFAllocatorRef, ffi.Uint32)>>( + 'CFLocaleCreateLocaleIdentifierFromWindowsLocaleCode'); + late final _CFLocaleCreateLocaleIdentifierFromWindowsLocaleCode = + _CFLocaleCreateLocaleIdentifierFromWindowsLocaleCodePtr.asFunction< + CFLocaleIdentifier Function(CFAllocatorRef, int)>(); - CFCharacterSetRef CFCharacterSetCreateInvertedSet( - CFAllocatorRef alloc, - CFCharacterSetRef theSet, + int CFLocaleGetWindowsLocaleCodeFromLocaleIdentifier( + CFLocaleIdentifier localeIdentifier, ) { - return _CFCharacterSetCreateInvertedSet( - alloc, - theSet, + return _CFLocaleGetWindowsLocaleCodeFromLocaleIdentifier( + localeIdentifier, ); } - late final _CFCharacterSetCreateInvertedSetPtr = _lookup< - ffi.NativeFunction< - CFCharacterSetRef Function(CFAllocatorRef, - CFCharacterSetRef)>>('CFCharacterSetCreateInvertedSet'); - late final _CFCharacterSetCreateInvertedSet = - _CFCharacterSetCreateInvertedSetPtr.asFunction< - CFCharacterSetRef Function(CFAllocatorRef, CFCharacterSetRef)>(); + late final _CFLocaleGetWindowsLocaleCodeFromLocaleIdentifierPtr = + _lookup>( + 'CFLocaleGetWindowsLocaleCodeFromLocaleIdentifier'); + late final _CFLocaleGetWindowsLocaleCodeFromLocaleIdentifier = + _CFLocaleGetWindowsLocaleCodeFromLocaleIdentifierPtr.asFunction< + int Function(CFLocaleIdentifier)>(); - int CFCharacterSetIsSupersetOfSet( - CFCharacterSetRef theSet, - CFCharacterSetRef theOtherset, + int CFLocaleGetLanguageCharacterDirection( + CFStringRef isoLangCode, ) { - return _CFCharacterSetIsSupersetOfSet( - theSet, - theOtherset, + return _CFLocaleGetLanguageCharacterDirection( + isoLangCode, ); } - late final _CFCharacterSetIsSupersetOfSetPtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFCharacterSetRef, - CFCharacterSetRef)>>('CFCharacterSetIsSupersetOfSet'); - late final _CFCharacterSetIsSupersetOfSet = _CFCharacterSetIsSupersetOfSetPtr - .asFunction(); + late final _CFLocaleGetLanguageCharacterDirectionPtr = + _lookup>( + 'CFLocaleGetLanguageCharacterDirection'); + late final _CFLocaleGetLanguageCharacterDirection = + _CFLocaleGetLanguageCharacterDirectionPtr.asFunction< + int Function(CFStringRef)>(); - int CFCharacterSetHasMemberInPlane( - CFCharacterSetRef theSet, - int thePlane, + int CFLocaleGetLanguageLineDirection( + CFStringRef isoLangCode, ) { - return _CFCharacterSetHasMemberInPlane( - theSet, - thePlane, + return _CFLocaleGetLanguageLineDirection( + isoLangCode, ); } - late final _CFCharacterSetHasMemberInPlanePtr = - _lookup>( - 'CFCharacterSetHasMemberInPlane'); - late final _CFCharacterSetHasMemberInPlane = - _CFCharacterSetHasMemberInPlanePtr.asFunction< - int Function(CFCharacterSetRef, int)>(); + late final _CFLocaleGetLanguageLineDirectionPtr = + _lookup>( + 'CFLocaleGetLanguageLineDirection'); + late final _CFLocaleGetLanguageLineDirection = + _CFLocaleGetLanguageLineDirectionPtr.asFunction< + int Function(CFStringRef)>(); - CFMutableCharacterSetRef CFCharacterSetCreateMutable( - CFAllocatorRef alloc, + CFDictionaryRef CFLocaleCreateComponentsFromLocaleIdentifier( + CFAllocatorRef allocator, + CFLocaleIdentifier localeID, ) { - return _CFCharacterSetCreateMutable( - alloc, + return _CFLocaleCreateComponentsFromLocaleIdentifier( + allocator, + localeID, ); } - late final _CFCharacterSetCreateMutablePtr = _lookup< - ffi.NativeFunction< - CFMutableCharacterSetRef Function( - CFAllocatorRef)>>('CFCharacterSetCreateMutable'); - late final _CFCharacterSetCreateMutable = _CFCharacterSetCreateMutablePtr - .asFunction(); + late final _CFLocaleCreateComponentsFromLocaleIdentifierPtr = _lookup< + ffi.NativeFunction< + CFDictionaryRef Function(CFAllocatorRef, CFLocaleIdentifier)>>( + 'CFLocaleCreateComponentsFromLocaleIdentifier'); + late final _CFLocaleCreateComponentsFromLocaleIdentifier = + _CFLocaleCreateComponentsFromLocaleIdentifierPtr.asFunction< + CFDictionaryRef Function(CFAllocatorRef, CFLocaleIdentifier)>(); - CFCharacterSetRef CFCharacterSetCreateCopy( - CFAllocatorRef alloc, - CFCharacterSetRef theSet, + CFLocaleIdentifier CFLocaleCreateLocaleIdentifierFromComponents( + CFAllocatorRef allocator, + CFDictionaryRef dictionary, ) { - return _CFCharacterSetCreateCopy( - alloc, - theSet, + return _CFLocaleCreateLocaleIdentifierFromComponents( + allocator, + dictionary, ); } - late final _CFCharacterSetCreateCopyPtr = _lookup< - ffi.NativeFunction< - CFCharacterSetRef Function( - CFAllocatorRef, CFCharacterSetRef)>>('CFCharacterSetCreateCopy'); - late final _CFCharacterSetCreateCopy = - _CFCharacterSetCreateCopyPtr.asFunction< - CFCharacterSetRef Function(CFAllocatorRef, CFCharacterSetRef)>(); + late final _CFLocaleCreateLocaleIdentifierFromComponentsPtr = _lookup< + ffi.NativeFunction< + CFLocaleIdentifier Function(CFAllocatorRef, CFDictionaryRef)>>( + 'CFLocaleCreateLocaleIdentifierFromComponents'); + late final _CFLocaleCreateLocaleIdentifierFromComponents = + _CFLocaleCreateLocaleIdentifierFromComponentsPtr.asFunction< + CFLocaleIdentifier Function(CFAllocatorRef, CFDictionaryRef)>(); - CFMutableCharacterSetRef CFCharacterSetCreateMutableCopy( - CFAllocatorRef alloc, - CFCharacterSetRef theSet, + CFLocaleRef CFLocaleCreate( + CFAllocatorRef allocator, + CFLocaleIdentifier localeIdentifier, ) { - return _CFCharacterSetCreateMutableCopy( - alloc, - theSet, + return _CFLocaleCreate( + allocator, + localeIdentifier, ); } - late final _CFCharacterSetCreateMutableCopyPtr = _lookup< + late final _CFLocaleCreatePtr = _lookup< ffi.NativeFunction< - CFMutableCharacterSetRef Function(CFAllocatorRef, - CFCharacterSetRef)>>('CFCharacterSetCreateMutableCopy'); - late final _CFCharacterSetCreateMutableCopy = - _CFCharacterSetCreateMutableCopyPtr.asFunction< - CFMutableCharacterSetRef Function( - CFAllocatorRef, CFCharacterSetRef)>(); + CFLocaleRef Function( + CFAllocatorRef, CFLocaleIdentifier)>>('CFLocaleCreate'); + late final _CFLocaleCreate = _CFLocaleCreatePtr.asFunction< + CFLocaleRef Function(CFAllocatorRef, CFLocaleIdentifier)>(); - int CFCharacterSetIsCharacterMember( - CFCharacterSetRef theSet, - int theChar, + CFLocaleRef CFLocaleCreateCopy( + CFAllocatorRef allocator, + CFLocaleRef locale, ) { - return _CFCharacterSetIsCharacterMember( - theSet, - theChar, + return _CFLocaleCreateCopy( + allocator, + locale, ); } - late final _CFCharacterSetIsCharacterMemberPtr = - _lookup>( - 'CFCharacterSetIsCharacterMember'); - late final _CFCharacterSetIsCharacterMember = - _CFCharacterSetIsCharacterMemberPtr.asFunction< - int Function(CFCharacterSetRef, int)>(); + late final _CFLocaleCreateCopyPtr = _lookup< + ffi + .NativeFunction>( + 'CFLocaleCreateCopy'); + late final _CFLocaleCreateCopy = _CFLocaleCreateCopyPtr.asFunction< + CFLocaleRef Function(CFAllocatorRef, CFLocaleRef)>(); - int CFCharacterSetIsLongCharacterMember( - CFCharacterSetRef theSet, - int theChar, + CFLocaleIdentifier CFLocaleGetIdentifier( + CFLocaleRef locale, ) { - return _CFCharacterSetIsLongCharacterMember( - theSet, - theChar, + return _CFLocaleGetIdentifier( + locale, ); } - late final _CFCharacterSetIsLongCharacterMemberPtr = _lookup< - ffi.NativeFunction>( - 'CFCharacterSetIsLongCharacterMember'); - late final _CFCharacterSetIsLongCharacterMember = - _CFCharacterSetIsLongCharacterMemberPtr.asFunction< - int Function(CFCharacterSetRef, int)>(); + late final _CFLocaleGetIdentifierPtr = + _lookup>( + 'CFLocaleGetIdentifier'); + late final _CFLocaleGetIdentifier = _CFLocaleGetIdentifierPtr.asFunction< + CFLocaleIdentifier Function(CFLocaleRef)>(); - CFDataRef CFCharacterSetCreateBitmapRepresentation( - CFAllocatorRef alloc, - CFCharacterSetRef theSet, + CFTypeRef CFLocaleGetValue( + CFLocaleRef locale, + CFLocaleKey key, ) { - return _CFCharacterSetCreateBitmapRepresentation( - alloc, - theSet, + return _CFLocaleGetValue( + locale, + key, ); } - late final _CFCharacterSetCreateBitmapRepresentationPtr = _lookup< - ffi.NativeFunction< - CFDataRef Function(CFAllocatorRef, - CFCharacterSetRef)>>('CFCharacterSetCreateBitmapRepresentation'); - late final _CFCharacterSetCreateBitmapRepresentation = - _CFCharacterSetCreateBitmapRepresentationPtr.asFunction< - CFDataRef Function(CFAllocatorRef, CFCharacterSetRef)>(); + late final _CFLocaleGetValuePtr = + _lookup>( + 'CFLocaleGetValue'); + late final _CFLocaleGetValue = _CFLocaleGetValuePtr.asFunction< + CFTypeRef Function(CFLocaleRef, CFLocaleKey)>(); - void CFCharacterSetAddCharactersInRange( - CFMutableCharacterSetRef theSet, - CFRange theRange, + CFStringRef CFLocaleCopyDisplayNameForPropertyValue( + CFLocaleRef displayLocale, + CFLocaleKey key, + CFStringRef value, ) { - return _CFCharacterSetAddCharactersInRange( - theSet, - theRange, + return _CFLocaleCopyDisplayNameForPropertyValue( + displayLocale, + key, + value, ); } - late final _CFCharacterSetAddCharactersInRangePtr = _lookup< + late final _CFLocaleCopyDisplayNameForPropertyValuePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFMutableCharacterSetRef, - CFRange)>>('CFCharacterSetAddCharactersInRange'); - late final _CFCharacterSetAddCharactersInRange = - _CFCharacterSetAddCharactersInRangePtr.asFunction< - void Function(CFMutableCharacterSetRef, CFRange)>(); + CFStringRef Function(CFLocaleRef, CFLocaleKey, + CFStringRef)>>('CFLocaleCopyDisplayNameForPropertyValue'); + late final _CFLocaleCopyDisplayNameForPropertyValue = + _CFLocaleCopyDisplayNameForPropertyValuePtr.asFunction< + CFStringRef Function(CFLocaleRef, CFLocaleKey, CFStringRef)>(); - void CFCharacterSetRemoveCharactersInRange( - CFMutableCharacterSetRef theSet, - CFRange theRange, - ) { - return _CFCharacterSetRemoveCharactersInRange( - theSet, - theRange, - ); - } + late final ffi.Pointer + _kCFLocaleCurrentLocaleDidChangeNotification = + _lookup( + 'kCFLocaleCurrentLocaleDidChangeNotification'); - late final _CFCharacterSetRemoveCharactersInRangePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFMutableCharacterSetRef, - CFRange)>>('CFCharacterSetRemoveCharactersInRange'); - late final _CFCharacterSetRemoveCharactersInRange = - _CFCharacterSetRemoveCharactersInRangePtr.asFunction< - void Function(CFMutableCharacterSetRef, CFRange)>(); + CFNotificationName get kCFLocaleCurrentLocaleDidChangeNotification => + _kCFLocaleCurrentLocaleDidChangeNotification.value; - void CFCharacterSetAddCharactersInString( - CFMutableCharacterSetRef theSet, - CFStringRef theString, - ) { - return _CFCharacterSetAddCharactersInString( - theSet, - theString, - ); - } + set kCFLocaleCurrentLocaleDidChangeNotification(CFNotificationName value) => + _kCFLocaleCurrentLocaleDidChangeNotification.value = 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 _kCFLocaleIdentifier = + _lookup('kCFLocaleIdentifier'); - void CFCharacterSetRemoveCharactersInString( - CFMutableCharacterSetRef theSet, - CFStringRef theString, - ) { - return _CFCharacterSetRemoveCharactersInString( - theSet, - theString, - ); - } + CFLocaleKey get kCFLocaleIdentifier => _kCFLocaleIdentifier.value; - late final _CFCharacterSetRemoveCharactersInStringPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFMutableCharacterSetRef, - CFStringRef)>>('CFCharacterSetRemoveCharactersInString'); - late final _CFCharacterSetRemoveCharactersInString = - _CFCharacterSetRemoveCharactersInStringPtr.asFunction< - void Function(CFMutableCharacterSetRef, CFStringRef)>(); + set kCFLocaleIdentifier(CFLocaleKey value) => + _kCFLocaleIdentifier.value = value; - void CFCharacterSetUnion( - CFMutableCharacterSetRef theSet, - CFCharacterSetRef theOtherSet, - ) { - return _CFCharacterSetUnion( - theSet, - theOtherSet, - ); - } + late final ffi.Pointer _kCFLocaleLanguageCode = + _lookup('kCFLocaleLanguageCode'); - late final _CFCharacterSetUnionPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFMutableCharacterSetRef, - CFCharacterSetRef)>>('CFCharacterSetUnion'); - late final _CFCharacterSetUnion = _CFCharacterSetUnionPtr.asFunction< - void Function(CFMutableCharacterSetRef, CFCharacterSetRef)>(); + CFLocaleKey get kCFLocaleLanguageCode => _kCFLocaleLanguageCode.value; - void CFCharacterSetIntersect( - CFMutableCharacterSetRef theSet, - CFCharacterSetRef theOtherSet, - ) { - return _CFCharacterSetIntersect( - theSet, - theOtherSet, - ); - } + set kCFLocaleLanguageCode(CFLocaleKey value) => + _kCFLocaleLanguageCode.value = 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 _kCFLocaleCountryCode = + _lookup('kCFLocaleCountryCode'); - void CFCharacterSetInvert( - CFMutableCharacterSetRef theSet, - ) { - return _CFCharacterSetInvert( - theSet, - ); - } + CFLocaleKey get kCFLocaleCountryCode => _kCFLocaleCountryCode.value; - late final _CFCharacterSetInvertPtr = - _lookup>( - 'CFCharacterSetInvert'); - late final _CFCharacterSetInvert = _CFCharacterSetInvertPtr.asFunction< - void Function(CFMutableCharacterSetRef)>(); + set kCFLocaleCountryCode(CFLocaleKey value) => + _kCFLocaleCountryCode.value = value; - int CFStringGetTypeID() { - return _CFStringGetTypeID(); - } + late final ffi.Pointer _kCFLocaleScriptCode = + _lookup('kCFLocaleScriptCode'); - late final _CFStringGetTypeIDPtr = - _lookup>('CFStringGetTypeID'); - late final _CFStringGetTypeID = - _CFStringGetTypeIDPtr.asFunction(); + CFLocaleKey get kCFLocaleScriptCode => _kCFLocaleScriptCode.value; - CFStringRef CFStringCreateWithPascalString( - CFAllocatorRef alloc, - ConstStr255Param pStr, - int encoding, - ) { - return _CFStringCreateWithPascalString( - alloc, - pStr, - encoding, - ); - } + set kCFLocaleScriptCode(CFLocaleKey value) => + _kCFLocaleScriptCode.value = 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 _kCFLocaleVariantCode = + _lookup('kCFLocaleVariantCode'); - CFStringRef CFStringCreateWithCString( - CFAllocatorRef alloc, - ffi.Pointer cStr, - int encoding, - ) { - return _CFStringCreateWithCString( - alloc, - cStr, - encoding, - ); - } + CFLocaleKey get kCFLocaleVariantCode => _kCFLocaleVariantCode.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)>(); + set kCFLocaleVariantCode(CFLocaleKey value) => + _kCFLocaleVariantCode.value = value; - CFStringRef CFStringCreateWithBytes( - CFAllocatorRef alloc, - ffi.Pointer bytes, - int numBytes, - int encoding, - int isExternalRepresentation, - ) { - return _CFStringCreateWithBytes( - alloc, - bytes, - numBytes, - encoding, - isExternalRepresentation, - ); - } + late final ffi.Pointer _kCFLocaleExemplarCharacterSet = + _lookup('kCFLocaleExemplarCharacterSet'); - 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)>(); + CFLocaleKey get kCFLocaleExemplarCharacterSet => + _kCFLocaleExemplarCharacterSet.value; - CFStringRef CFStringCreateWithCharacters( - CFAllocatorRef alloc, - ffi.Pointer chars, - int numChars, - ) { - return _CFStringCreateWithCharacters( - alloc, - chars, - numChars, - ); - } + set kCFLocaleExemplarCharacterSet(CFLocaleKey value) => + _kCFLocaleExemplarCharacterSet.value = 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 _kCFLocaleCalendarIdentifier = + _lookup('kCFLocaleCalendarIdentifier'); - CFStringRef CFStringCreateWithPascalStringNoCopy( - CFAllocatorRef alloc, - ConstStr255Param pStr, - int encoding, - CFAllocatorRef contentsDeallocator, - ) { - return _CFStringCreateWithPascalStringNoCopy( - alloc, - pStr, - encoding, - contentsDeallocator, - ); - } + CFLocaleKey get kCFLocaleCalendarIdentifier => + _kCFLocaleCalendarIdentifier.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)>(); + set kCFLocaleCalendarIdentifier(CFLocaleKey value) => + _kCFLocaleCalendarIdentifier.value = value; - CFStringRef CFStringCreateWithCStringNoCopy( - CFAllocatorRef alloc, - ffi.Pointer cStr, - int encoding, - CFAllocatorRef contentsDeallocator, + 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 _CFStringCreateWithCStringNoCopy( - alloc, - cStr, - encoding, - contentsDeallocator, + return _CFDateCreate( + allocator, + at, ); } - 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 _CFDateCreatePtr = _lookup< + ffi + .NativeFunction>( + 'CFDateCreate'); + late final _CFDateCreate = + _CFDateCreatePtr.asFunction(); - CFStringRef CFStringCreateWithBytesNoCopy( - CFAllocatorRef alloc, - ffi.Pointer bytes, - int numBytes, - int encoding, - int isExternalRepresentation, - CFAllocatorRef contentsDeallocator, + double CFDateGetAbsoluteTime( + CFDateRef theDate, ) { - return _CFStringCreateWithBytesNoCopy( - alloc, - bytes, - numBytes, - encoding, - isExternalRepresentation, - contentsDeallocator, + return _CFDateGetAbsoluteTime( + theDate, ); } - 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)>(); + late final _CFDateGetAbsoluteTimePtr = + _lookup>( + 'CFDateGetAbsoluteTime'); + late final _CFDateGetAbsoluteTime = + _CFDateGetAbsoluteTimePtr.asFunction(); - CFStringRef CFStringCreateWithCharactersNoCopy( - CFAllocatorRef alloc, - ffi.Pointer chars, - int numChars, - CFAllocatorRef contentsDeallocator, + double CFDateGetTimeIntervalSinceDate( + CFDateRef theDate, + CFDateRef otherDate, ) { - return _CFStringCreateWithCharactersNoCopy( - alloc, - chars, - numChars, - contentsDeallocator, + return _CFDateGetTimeIntervalSinceDate( + theDate, + otherDate, ); } - 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)>(); + late final _CFDateGetTimeIntervalSinceDatePtr = _lookup< + ffi.NativeFunction>( + 'CFDateGetTimeIntervalSinceDate'); + late final _CFDateGetTimeIntervalSinceDate = + _CFDateGetTimeIntervalSinceDatePtr.asFunction< + double Function(CFDateRef, CFDateRef)>(); - CFStringRef CFStringCreateWithSubstring( - CFAllocatorRef alloc, - CFStringRef str, - CFRange range, + int CFDateCompare( + CFDateRef theDate, + CFDateRef otherDate, + ffi.Pointer context, ) { - return _CFStringCreateWithSubstring( - alloc, - str, - range, + return _CFDateCompare( + theDate, + otherDate, + context, ); } - late final _CFStringCreateWithSubstringPtr = _lookup< + late final _CFDateComparePtr = _lookup< ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, CFStringRef, - CFRange)>>('CFStringCreateWithSubstring'); - late final _CFStringCreateWithSubstring = _CFStringCreateWithSubstringPtr - .asFunction(); + ffi.Int32 Function( + CFDateRef, CFDateRef, ffi.Pointer)>>('CFDateCompare'); + late final _CFDateCompare = _CFDateComparePtr.asFunction< + int Function(CFDateRef, CFDateRef, ffi.Pointer)>(); - CFStringRef CFStringCreateCopy( - CFAllocatorRef alloc, - CFStringRef theString, + int CFGregorianDateIsValid( + CFGregorianDate gdate, + int unitFlags, ) { - return _CFStringCreateCopy( - alloc, - theString, + return _CFGregorianDateIsValid( + gdate, + unitFlags, ); } - late final _CFStringCreateCopyPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function( - CFAllocatorRef, CFStringRef)>>('CFStringCreateCopy'); - late final _CFStringCreateCopy = _CFStringCreateCopyPtr.asFunction< - CFStringRef Function(CFAllocatorRef, CFStringRef)>(); + late final _CFGregorianDateIsValidPtr = _lookup< + ffi.NativeFunction>( + 'CFGregorianDateIsValid'); + late final _CFGregorianDateIsValid = _CFGregorianDateIsValidPtr.asFunction< + int Function(CFGregorianDate, int)>(); - CFStringRef CFStringCreateWithFormat( - CFAllocatorRef alloc, - CFDictionaryRef formatOptions, - CFStringRef format, + double CFGregorianDateGetAbsoluteTime( + CFGregorianDate gdate, + CFTimeZoneRef tz, ) { - return _CFStringCreateWithFormat( - alloc, - formatOptions, - format, + return _CFGregorianDateGetAbsoluteTime( + gdate, + tz, ); } - late final _CFStringCreateWithFormatPtr = _lookup< + late final _CFGregorianDateGetAbsoluteTimePtr = _lookup< ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, CFDictionaryRef, - CFStringRef)>>('CFStringCreateWithFormat'); - late final _CFStringCreateWithFormat = - _CFStringCreateWithFormatPtr.asFunction< - CFStringRef Function(CFAllocatorRef, CFDictionaryRef, CFStringRef)>(); + CFAbsoluteTime Function(CFGregorianDate, + CFTimeZoneRef)>>('CFGregorianDateGetAbsoluteTime'); + late final _CFGregorianDateGetAbsoluteTime = + _CFGregorianDateGetAbsoluteTimePtr.asFunction< + double Function(CFGregorianDate, CFTimeZoneRef)>(); - CFStringRef CFStringCreateWithFormatAndArguments( - CFAllocatorRef alloc, - CFDictionaryRef formatOptions, - CFStringRef format, - va_list arguments, + CFGregorianDate CFAbsoluteTimeGetGregorianDate( + double at, + CFTimeZoneRef tz, ) { - return _CFStringCreateWithFormatAndArguments( - alloc, - formatOptions, - format, - arguments, + return _CFAbsoluteTimeGetGregorianDate( + at, + tz, ); } - late final _CFStringCreateWithFormatAndArgumentsPtr = _lookup< + late final _CFAbsoluteTimeGetGregorianDatePtr = _lookup< ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, CFDictionaryRef, CFStringRef, - va_list)>>('CFStringCreateWithFormatAndArguments'); - late final _CFStringCreateWithFormatAndArguments = - _CFStringCreateWithFormatAndArgumentsPtr.asFunction< - CFStringRef Function( - CFAllocatorRef, CFDictionaryRef, CFStringRef, va_list)>(); + CFGregorianDate Function(CFAbsoluteTime, + CFTimeZoneRef)>>('CFAbsoluteTimeGetGregorianDate'); + late final _CFAbsoluteTimeGetGregorianDate = + _CFAbsoluteTimeGetGregorianDatePtr.asFunction< + CFGregorianDate Function(double, CFTimeZoneRef)>(); - CFMutableStringRef CFStringCreateMutable( - CFAllocatorRef alloc, - int maxLength, + double CFAbsoluteTimeAddGregorianUnits( + double at, + CFTimeZoneRef tz, + CFGregorianUnits units, ) { - return _CFStringCreateMutable( - alloc, - maxLength, + return _CFAbsoluteTimeAddGregorianUnits( + at, + tz, + units, ); } - late final _CFStringCreateMutablePtr = _lookup< + late final _CFAbsoluteTimeAddGregorianUnitsPtr = _lookup< ffi.NativeFunction< - CFMutableStringRef Function( - CFAllocatorRef, CFIndex)>>('CFStringCreateMutable'); - late final _CFStringCreateMutable = _CFStringCreateMutablePtr.asFunction< - CFMutableStringRef Function(CFAllocatorRef, int)>(); + CFAbsoluteTime Function(CFAbsoluteTime, CFTimeZoneRef, + CFGregorianUnits)>>('CFAbsoluteTimeAddGregorianUnits'); + late final _CFAbsoluteTimeAddGregorianUnits = + _CFAbsoluteTimeAddGregorianUnitsPtr.asFunction< + double Function(double, CFTimeZoneRef, CFGregorianUnits)>(); - CFMutableStringRef CFStringCreateMutableCopy( - CFAllocatorRef alloc, - int maxLength, - CFStringRef theString, + CFGregorianUnits CFAbsoluteTimeGetDifferenceAsGregorianUnits( + double at1, + double at2, + CFTimeZoneRef tz, + int unitFlags, ) { - return _CFStringCreateMutableCopy( - alloc, - maxLength, - theString, + return _CFAbsoluteTimeGetDifferenceAsGregorianUnits( + at1, + at2, + tz, + unitFlags, ); } - late final _CFStringCreateMutableCopyPtr = _lookup< + late final _CFAbsoluteTimeGetDifferenceAsGregorianUnitsPtr = _lookup< ffi.NativeFunction< - CFMutableStringRef Function(CFAllocatorRef, CFIndex, - CFStringRef)>>('CFStringCreateMutableCopy'); - late final _CFStringCreateMutableCopy = - _CFStringCreateMutableCopyPtr.asFunction< - CFMutableStringRef Function(CFAllocatorRef, int, CFStringRef)>(); + CFGregorianUnits Function( + CFAbsoluteTime, + CFAbsoluteTime, + CFTimeZoneRef, + CFOptionFlags)>>('CFAbsoluteTimeGetDifferenceAsGregorianUnits'); + late final _CFAbsoluteTimeGetDifferenceAsGregorianUnits = + _CFAbsoluteTimeGetDifferenceAsGregorianUnitsPtr.asFunction< + CFGregorianUnits Function(double, double, CFTimeZoneRef, int)>(); - CFMutableStringRef CFStringCreateMutableWithExternalCharactersNoCopy( - CFAllocatorRef alloc, - ffi.Pointer chars, - int numChars, - int capacity, - CFAllocatorRef externalCharactersAllocator, + int CFAbsoluteTimeGetDayOfWeek( + double at, + CFTimeZoneRef tz, ) { - return _CFStringCreateMutableWithExternalCharactersNoCopy( - alloc, - chars, - numChars, - capacity, - externalCharactersAllocator, + return _CFAbsoluteTimeGetDayOfWeek( + at, + tz, ); } - 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 _CFAbsoluteTimeGetDayOfWeekPtr = _lookup< + ffi.NativeFunction>( + 'CFAbsoluteTimeGetDayOfWeek'); + late final _CFAbsoluteTimeGetDayOfWeek = _CFAbsoluteTimeGetDayOfWeekPtr + .asFunction(); - int CFStringGetLength( - CFStringRef theString, + int CFAbsoluteTimeGetDayOfYear( + double at, + CFTimeZoneRef tz, ) { - return _CFStringGetLength( - theString, + return _CFAbsoluteTimeGetDayOfYear( + at, + tz, ); } - late final _CFStringGetLengthPtr = - _lookup>( - 'CFStringGetLength'); - late final _CFStringGetLength = - _CFStringGetLengthPtr.asFunction(); + late final _CFAbsoluteTimeGetDayOfYearPtr = _lookup< + ffi.NativeFunction>( + 'CFAbsoluteTimeGetDayOfYear'); + late final _CFAbsoluteTimeGetDayOfYear = _CFAbsoluteTimeGetDayOfYearPtr + .asFunction(); - int CFStringGetCharacterAtIndex( - CFStringRef theString, - int idx, + int CFAbsoluteTimeGetWeekOfYear( + double at, + CFTimeZoneRef tz, ) { - return _CFStringGetCharacterAtIndex( - theString, - idx, + return _CFAbsoluteTimeGetWeekOfYear( + at, + tz, ); } - late final _CFStringGetCharacterAtIndexPtr = - _lookup>( - 'CFStringGetCharacterAtIndex'); - late final _CFStringGetCharacterAtIndex = _CFStringGetCharacterAtIndexPtr - .asFunction(); + late final _CFAbsoluteTimeGetWeekOfYearPtr = _lookup< + ffi.NativeFunction>( + 'CFAbsoluteTimeGetWeekOfYear'); + late final _CFAbsoluteTimeGetWeekOfYear = _CFAbsoluteTimeGetWeekOfYearPtr + .asFunction(); - void CFStringGetCharacters( - CFStringRef theString, - CFRange range, - ffi.Pointer buffer, + int CFDataGetTypeID() { + return _CFDataGetTypeID(); + } + + late final _CFDataGetTypeIDPtr = + _lookup>('CFDataGetTypeID'); + late final _CFDataGetTypeID = + _CFDataGetTypeIDPtr.asFunction(); + + CFDataRef CFDataCreate( + CFAllocatorRef allocator, + ffi.Pointer bytes, + int length, ) { - return _CFStringGetCharacters( - theString, - range, - buffer, + return _CFDataCreate( + allocator, + bytes, + length, ); } - late final _CFStringGetCharactersPtr = _lookup< + late final _CFDataCreatePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFStringRef, CFRange, - ffi.Pointer)>>('CFStringGetCharacters'); - late final _CFStringGetCharacters = _CFStringGetCharactersPtr.asFunction< - void Function(CFStringRef, CFRange, ffi.Pointer)>(); + CFDataRef Function( + CFAllocatorRef, ffi.Pointer, CFIndex)>>('CFDataCreate'); + late final _CFDataCreate = _CFDataCreatePtr.asFunction< + CFDataRef Function(CFAllocatorRef, ffi.Pointer, int)>(); - int CFStringGetPascalString( - CFStringRef theString, - StringPtr buffer, - int bufferSize, - int encoding, + CFDataRef CFDataCreateWithBytesNoCopy( + CFAllocatorRef allocator, + ffi.Pointer bytes, + int length, + CFAllocatorRef bytesDeallocator, ) { - return _CFStringGetPascalString( - theString, - buffer, - bufferSize, - encoding, + return _CFDataCreateWithBytesNoCopy( + allocator, + bytes, + length, + bytesDeallocator, ); } - late final _CFStringGetPascalStringPtr = _lookup< + late final _CFDataCreateWithBytesNoCopyPtr = _lookup< ffi.NativeFunction< - Boolean Function(CFStringRef, StringPtr, CFIndex, - CFStringEncoding)>>('CFStringGetPascalString'); - late final _CFStringGetPascalString = _CFStringGetPascalStringPtr.asFunction< - int Function(CFStringRef, StringPtr, int, int)>(); + CFDataRef Function(CFAllocatorRef, ffi.Pointer, CFIndex, + CFAllocatorRef)>>('CFDataCreateWithBytesNoCopy'); + late final _CFDataCreateWithBytesNoCopy = + _CFDataCreateWithBytesNoCopyPtr.asFunction< + CFDataRef Function( + CFAllocatorRef, ffi.Pointer, int, CFAllocatorRef)>(); - int CFStringGetCString( - CFStringRef theString, - ffi.Pointer buffer, - int bufferSize, - int encoding, + CFDataRef CFDataCreateCopy( + CFAllocatorRef allocator, + CFDataRef theData, ) { - return _CFStringGetCString( - theString, - buffer, - bufferSize, - encoding, + return _CFDataCreateCopy( + allocator, + theData, ); } - 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)>(); + late final _CFDataCreateCopyPtr = _lookup< + ffi.NativeFunction>( + 'CFDataCreateCopy'); + late final _CFDataCreateCopy = _CFDataCreateCopyPtr.asFunction< + CFDataRef Function(CFAllocatorRef, CFDataRef)>(); - ConstStringPtr CFStringGetPascalStringPtr( - CFStringRef theString, - int encoding, + CFMutableDataRef CFDataCreateMutable( + CFAllocatorRef allocator, + int capacity, ) { - return _CFStringGetPascalStringPtr1( - theString, - encoding, + return _CFDataCreateMutable( + allocator, + capacity, ); } - late final _CFStringGetPascalStringPtrPtr = _lookup< - ffi.NativeFunction< - ConstStringPtr Function( - CFStringRef, CFStringEncoding)>>('CFStringGetPascalStringPtr'); - late final _CFStringGetPascalStringPtr1 = _CFStringGetPascalStringPtrPtr - .asFunction(); + late final _CFDataCreateMutablePtr = _lookup< + ffi + .NativeFunction>( + 'CFDataCreateMutable'); + late final _CFDataCreateMutable = _CFDataCreateMutablePtr.asFunction< + CFMutableDataRef Function(CFAllocatorRef, int)>(); - ffi.Pointer CFStringGetCStringPtr( - CFStringRef theString, - int encoding, + CFMutableDataRef CFDataCreateMutableCopy( + CFAllocatorRef allocator, + int capacity, + CFDataRef theData, ) { - return _CFStringGetCStringPtr1( - theString, - encoding, + return _CFDataCreateMutableCopy( + allocator, + capacity, + theData, ); } - late final _CFStringGetCStringPtrPtr = _lookup< + late final _CFDataCreateMutableCopyPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - CFStringRef, CFStringEncoding)>>('CFStringGetCStringPtr'); - late final _CFStringGetCStringPtr1 = _CFStringGetCStringPtrPtr.asFunction< - ffi.Pointer Function(CFStringRef, int)>(); + CFMutableDataRef Function( + CFAllocatorRef, CFIndex, CFDataRef)>>('CFDataCreateMutableCopy'); + late final _CFDataCreateMutableCopy = _CFDataCreateMutableCopyPtr.asFunction< + CFMutableDataRef Function(CFAllocatorRef, int, CFDataRef)>(); - ffi.Pointer CFStringGetCharactersPtr( - CFStringRef theString, + int CFDataGetLength( + CFDataRef theData, ) { - return _CFStringGetCharactersPtr1( - theString, + return _CFDataGetLength( + theData, ); } - late final _CFStringGetCharactersPtrPtr = - _lookup Function(CFStringRef)>>( - 'CFStringGetCharactersPtr'); - late final _CFStringGetCharactersPtr1 = _CFStringGetCharactersPtrPtr - .asFunction Function(CFStringRef)>(); + late final _CFDataGetLengthPtr = + _lookup>( + 'CFDataGetLength'); + late final _CFDataGetLength = + _CFDataGetLengthPtr.asFunction(); - int CFStringGetBytes( - CFStringRef theString, - CFRange range, - int encoding, - int lossByte, - int isExternalRepresentation, - ffi.Pointer buffer, - int maxBufLen, - ffi.Pointer usedBufLen, + ffi.Pointer CFDataGetBytePtr( + CFDataRef theData, ) { - return _CFStringGetBytes( - theString, - range, - encoding, - lossByte, - isExternalRepresentation, - buffer, - maxBufLen, - usedBufLen, + return _CFDataGetBytePtr( + theData, ); } - 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 _CFDataGetBytePtrPtr = + _lookup Function(CFDataRef)>>( + 'CFDataGetBytePtr'); + late final _CFDataGetBytePtr = + _CFDataGetBytePtrPtr.asFunction Function(CFDataRef)>(); - CFStringRef CFStringCreateFromExternalRepresentation( - CFAllocatorRef alloc, - CFDataRef data, - int encoding, + ffi.Pointer CFDataGetMutableBytePtr( + CFMutableDataRef theData, ) { - return _CFStringCreateFromExternalRepresentation( - alloc, - data, - encoding, + return _CFDataGetMutableBytePtr( + theData, ); } - late final _CFStringCreateFromExternalRepresentationPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, CFDataRef, - CFStringEncoding)>>('CFStringCreateFromExternalRepresentation'); - late final _CFStringCreateFromExternalRepresentation = - _CFStringCreateFromExternalRepresentationPtr.asFunction< - CFStringRef Function(CFAllocatorRef, CFDataRef, int)>(); + late final _CFDataGetMutableBytePtrPtr = _lookup< + ffi.NativeFunction Function(CFMutableDataRef)>>( + 'CFDataGetMutableBytePtr'); + late final _CFDataGetMutableBytePtr = _CFDataGetMutableBytePtrPtr.asFunction< + ffi.Pointer Function(CFMutableDataRef)>(); - CFDataRef CFStringCreateExternalRepresentation( - CFAllocatorRef alloc, - CFStringRef theString, - int encoding, - int lossByte, + void CFDataGetBytes( + CFDataRef theData, + CFRange range, + ffi.Pointer buffer, ) { - return _CFStringCreateExternalRepresentation( - alloc, - theString, - encoding, - lossByte, + return _CFDataGetBytes( + theData, + range, + buffer, ); } - late final _CFStringCreateExternalRepresentationPtr = _lookup< + late final _CFDataGetBytesPtr = _lookup< ffi.NativeFunction< - CFDataRef Function(CFAllocatorRef, CFStringRef, CFStringEncoding, - UInt8)>>('CFStringCreateExternalRepresentation'); - late final _CFStringCreateExternalRepresentation = - _CFStringCreateExternalRepresentationPtr.asFunction< - CFDataRef Function(CFAllocatorRef, CFStringRef, int, int)>(); + ffi.Void Function( + CFDataRef, CFRange, ffi.Pointer)>>('CFDataGetBytes'); + late final _CFDataGetBytes = _CFDataGetBytesPtr.asFunction< + void Function(CFDataRef, CFRange, ffi.Pointer)>(); - int CFStringGetSmallestEncoding( - CFStringRef theString, + void CFDataSetLength( + CFMutableDataRef theData, + int length, ) { - return _CFStringGetSmallestEncoding( - theString, + return _CFDataSetLength( + theData, + length, ); } - late final _CFStringGetSmallestEncodingPtr = - _lookup>( - 'CFStringGetSmallestEncoding'); - late final _CFStringGetSmallestEncoding = - _CFStringGetSmallestEncodingPtr.asFunction(); + late final _CFDataSetLengthPtr = + _lookup>( + 'CFDataSetLength'); + late final _CFDataSetLength = + _CFDataSetLengthPtr.asFunction(); - int CFStringGetFastestEncoding( - CFStringRef theString, + void CFDataIncreaseLength( + CFMutableDataRef theData, + int extraLength, ) { - return _CFStringGetFastestEncoding( - theString, + return _CFDataIncreaseLength( + theData, + extraLength, ); } - late final _CFStringGetFastestEncodingPtr = - _lookup>( - 'CFStringGetFastestEncoding'); - late final _CFStringGetFastestEncoding = - _CFStringGetFastestEncodingPtr.asFunction(); - - int CFStringGetSystemEncoding() { - return _CFStringGetSystemEncoding(); - } - - late final _CFStringGetSystemEncodingPtr = - _lookup>( - 'CFStringGetSystemEncoding'); - late final _CFStringGetSystemEncoding = - _CFStringGetSystemEncodingPtr.asFunction(); + late final _CFDataIncreaseLengthPtr = + _lookup>( + 'CFDataIncreaseLength'); + late final _CFDataIncreaseLength = _CFDataIncreaseLengthPtr.asFunction< + void Function(CFMutableDataRef, int)>(); - int CFStringGetMaximumSizeForEncoding( + void CFDataAppendBytes( + CFMutableDataRef theData, + ffi.Pointer bytes, int length, - int encoding, ) { - return _CFStringGetMaximumSizeForEncoding( + return _CFDataAppendBytes( + theData, + bytes, length, - encoding, ); } - late final _CFStringGetMaximumSizeForEncodingPtr = - _lookup>( - 'CFStringGetMaximumSizeForEncoding'); - late final _CFStringGetMaximumSizeForEncoding = - _CFStringGetMaximumSizeForEncodingPtr.asFunction< - int Function(int, int)>(); + 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)>(); - int CFStringGetFileSystemRepresentation( - CFStringRef string, - ffi.Pointer buffer, - int maxBufLen, + void CFDataReplaceBytes( + CFMutableDataRef theData, + CFRange range, + ffi.Pointer newBytes, + int newLength, ) { - return _CFStringGetFileSystemRepresentation( - string, - buffer, - maxBufLen, + return _CFDataReplaceBytes( + theData, + range, + newBytes, + newLength, ); } - late final _CFStringGetFileSystemRepresentationPtr = _lookup< + late final _CFDataReplaceBytesPtr = _lookup< ffi.NativeFunction< - Boolean Function(CFStringRef, ffi.Pointer, - CFIndex)>>('CFStringGetFileSystemRepresentation'); - late final _CFStringGetFileSystemRepresentation = - _CFStringGetFileSystemRepresentationPtr.asFunction< - int Function(CFStringRef, ffi.Pointer, int)>(); + ffi.Void Function(CFMutableDataRef, CFRange, ffi.Pointer, + CFIndex)>>('CFDataReplaceBytes'); + late final _CFDataReplaceBytes = _CFDataReplaceBytesPtr.asFunction< + void Function(CFMutableDataRef, CFRange, ffi.Pointer, int)>(); - int CFStringGetMaximumSizeOfFileSystemRepresentation( - CFStringRef string, + void CFDataDeleteBytes( + CFMutableDataRef theData, + CFRange range, ) { - return _CFStringGetMaximumSizeOfFileSystemRepresentation( - string, + return _CFDataDeleteBytes( + theData, + range, ); } - late final _CFStringGetMaximumSizeOfFileSystemRepresentationPtr = - _lookup>( - 'CFStringGetMaximumSizeOfFileSystemRepresentation'); - late final _CFStringGetMaximumSizeOfFileSystemRepresentation = - _CFStringGetMaximumSizeOfFileSystemRepresentationPtr.asFunction< - int Function(CFStringRef)>(); + late final _CFDataDeleteBytesPtr = + _lookup>( + 'CFDataDeleteBytes'); + late final _CFDataDeleteBytes = _CFDataDeleteBytesPtr.asFunction< + void Function(CFMutableDataRef, CFRange)>(); - CFStringRef CFStringCreateWithFileSystemRepresentation( - CFAllocatorRef alloc, - ffi.Pointer buffer, + CFRange CFDataFind( + CFDataRef theData, + CFDataRef dataToFind, + CFRange searchRange, + int compareOptions, ) { - return _CFStringCreateWithFileSystemRepresentation( - alloc, - buffer, + return _CFDataFind( + theData, + dataToFind, + searchRange, + compareOptions, ); } - late final _CFStringCreateWithFileSystemRepresentationPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, ffi.Pointer)>>( - 'CFStringCreateWithFileSystemRepresentation'); - late final _CFStringCreateWithFileSystemRepresentation = - _CFStringCreateWithFileSystemRepresentationPtr.asFunction< - CFStringRef Function(CFAllocatorRef, ffi.Pointer)>(); + 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 CFStringCompareWithOptionsAndLocale( - CFStringRef theString1, - CFStringRef theString2, - CFRange rangeToCompare, - int compareOptions, - CFLocaleRef locale, + int CFCharacterSetGetTypeID() { + return _CFCharacterSetGetTypeID(); + } + + late final _CFCharacterSetGetTypeIDPtr = + _lookup>( + 'CFCharacterSetGetTypeID'); + late final _CFCharacterSetGetTypeID = + _CFCharacterSetGetTypeIDPtr.asFunction(); + + CFCharacterSetRef CFCharacterSetGetPredefined( + int theSetIdentifier, ) { - return _CFStringCompareWithOptionsAndLocale( - theString1, - theString2, - rangeToCompare, - compareOptions, - locale, + return _CFCharacterSetGetPredefined( + theSetIdentifier, ); } - 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(); + late final _CFCharacterSetGetPredefinedPtr = + _lookup>( + 'CFCharacterSetGetPredefined'); + late final _CFCharacterSetGetPredefined = _CFCharacterSetGetPredefinedPtr + .asFunction(); - int CFStringCompare( - CFStringRef theString1, - CFStringRef theString2, - int compareOptions, + CFCharacterSetRef CFCharacterSetCreateWithCharactersInRange( + CFAllocatorRef alloc, + CFRange theRange, ) { - return _CFStringCompare( - theString1, - theString2, - compareOptions, + return _CFCharacterSetCreateWithCharactersInRange( + alloc, + theRange, ); } - 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 _CFCharacterSetCreateWithCharactersInRangePtr = _lookup< + ffi + .NativeFunction>( + 'CFCharacterSetCreateWithCharactersInRange'); + late final _CFCharacterSetCreateWithCharactersInRange = + _CFCharacterSetCreateWithCharactersInRangePtr.asFunction< + CFCharacterSetRef Function(CFAllocatorRef, CFRange)>(); - int CFStringFindWithOptionsAndLocale( + CFCharacterSetRef CFCharacterSetCreateWithCharactersInString( + CFAllocatorRef alloc, CFStringRef theString, - CFStringRef stringToFind, - CFRange rangeToSearch, - int searchOptions, - CFLocaleRef locale, - ffi.Pointer result, ) { - return _CFStringFindWithOptionsAndLocale( + return _CFCharacterSetCreateWithCharactersInString( + alloc, theString, - stringToFind, - rangeToSearch, - searchOptions, - locale, - result, ); } - late final _CFStringFindWithOptionsAndLocalePtr = _lookup< + late final _CFCharacterSetCreateWithCharactersInStringPtr = _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)>(); + CFCharacterSetRef Function(CFAllocatorRef, + CFStringRef)>>('CFCharacterSetCreateWithCharactersInString'); + late final _CFCharacterSetCreateWithCharactersInString = + _CFCharacterSetCreateWithCharactersInStringPtr.asFunction< + CFCharacterSetRef Function(CFAllocatorRef, CFStringRef)>(); - int CFStringFindWithOptions( - CFStringRef theString, - CFStringRef stringToFind, - CFRange rangeToSearch, - int searchOptions, - ffi.Pointer result, + CFCharacterSetRef CFCharacterSetCreateWithBitmapRepresentation( + CFAllocatorRef alloc, + CFDataRef theData, ) { - return _CFStringFindWithOptions( - theString, - stringToFind, - rangeToSearch, - searchOptions, - result, + return _CFCharacterSetCreateWithBitmapRepresentation( + alloc, + theData, ); } - late final _CFStringFindWithOptionsPtr = _lookup< + late final _CFCharacterSetCreateWithBitmapRepresentationPtr = _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)>(); + CFCharacterSetRef Function(CFAllocatorRef, + CFDataRef)>>('CFCharacterSetCreateWithBitmapRepresentation'); + late final _CFCharacterSetCreateWithBitmapRepresentation = + _CFCharacterSetCreateWithBitmapRepresentationPtr.asFunction< + CFCharacterSetRef Function(CFAllocatorRef, CFDataRef)>(); - CFArrayRef CFStringCreateArrayWithFindResults( + CFCharacterSetRef CFCharacterSetCreateInvertedSet( CFAllocatorRef alloc, - CFStringRef theString, - CFStringRef stringToFind, - CFRange rangeToSearch, - int compareOptions, + CFCharacterSetRef theSet, ) { - return _CFStringCreateArrayWithFindResults( + return _CFCharacterSetCreateInvertedSet( alloc, - theString, - stringToFind, - rangeToSearch, - compareOptions, + theSet, ); } - late final _CFStringCreateArrayWithFindResultsPtr = _lookup< + late final _CFCharacterSetCreateInvertedSetPtr = _lookup< ffi.NativeFunction< - CFArrayRef Function(CFAllocatorRef, CFStringRef, CFStringRef, CFRange, - ffi.Int32)>>('CFStringCreateArrayWithFindResults'); - late final _CFStringCreateArrayWithFindResults = - _CFStringCreateArrayWithFindResultsPtr.asFunction< - CFArrayRef Function( - CFAllocatorRef, CFStringRef, CFStringRef, CFRange, int)>(); + CFCharacterSetRef Function(CFAllocatorRef, + CFCharacterSetRef)>>('CFCharacterSetCreateInvertedSet'); + late final _CFCharacterSetCreateInvertedSet = + _CFCharacterSetCreateInvertedSetPtr.asFunction< + CFCharacterSetRef Function(CFAllocatorRef, CFCharacterSetRef)>(); - CFRange CFStringFind( - CFStringRef theString, - CFStringRef stringToFind, - int compareOptions, + int CFCharacterSetIsSupersetOfSet( + CFCharacterSetRef theSet, + CFCharacterSetRef theOtherset, ) { - return _CFStringFind( - theString, - stringToFind, - compareOptions, + return _CFCharacterSetIsSupersetOfSet( + theSet, + theOtherset, ); } - late final _CFStringFindPtr = _lookup< + late final _CFCharacterSetIsSupersetOfSetPtr = _lookup< ffi.NativeFunction< - CFRange Function( - CFStringRef, CFStringRef, ffi.Int32)>>('CFStringFind'); - late final _CFStringFind = _CFStringFindPtr.asFunction< - CFRange Function(CFStringRef, CFStringRef, int)>(); + Boolean Function(CFCharacterSetRef, + CFCharacterSetRef)>>('CFCharacterSetIsSupersetOfSet'); + late final _CFCharacterSetIsSupersetOfSet = _CFCharacterSetIsSupersetOfSetPtr + .asFunction(); - int CFStringHasPrefix( - CFStringRef theString, - CFStringRef prefix, + int CFCharacterSetHasMemberInPlane( + CFCharacterSetRef theSet, + int thePlane, ) { - return _CFStringHasPrefix( - theString, - prefix, + return _CFCharacterSetHasMemberInPlane( + theSet, + thePlane, ); } - late final _CFStringHasPrefixPtr = - _lookup>( - 'CFStringHasPrefix'); - late final _CFStringHasPrefix = _CFStringHasPrefixPtr.asFunction< - int Function(CFStringRef, CFStringRef)>(); + late final _CFCharacterSetHasMemberInPlanePtr = + _lookup>( + 'CFCharacterSetHasMemberInPlane'); + late final _CFCharacterSetHasMemberInPlane = + _CFCharacterSetHasMemberInPlanePtr.asFunction< + int Function(CFCharacterSetRef, int)>(); - int CFStringHasSuffix( - CFStringRef theString, - CFStringRef suffix, + CFMutableCharacterSetRef CFCharacterSetCreateMutable( + CFAllocatorRef alloc, ) { - return _CFStringHasSuffix( - theString, - suffix, + return _CFCharacterSetCreateMutable( + alloc, ); } - late final _CFStringHasSuffixPtr = - _lookup>( - 'CFStringHasSuffix'); - late final _CFStringHasSuffix = _CFStringHasSuffixPtr.asFunction< - int Function(CFStringRef, CFStringRef)>(); + late final _CFCharacterSetCreateMutablePtr = _lookup< + ffi + .NativeFunction>( + 'CFCharacterSetCreateMutable'); + late final _CFCharacterSetCreateMutable = _CFCharacterSetCreateMutablePtr + .asFunction(); - CFRange CFStringGetRangeOfComposedCharactersAtIndex( - CFStringRef theString, - int theIndex, + CFCharacterSetRef CFCharacterSetCreateCopy( + CFAllocatorRef alloc, + CFCharacterSetRef theSet, ) { - return _CFStringGetRangeOfComposedCharactersAtIndex( - theString, - theIndex, + return _CFCharacterSetCreateCopy( + alloc, + theSet, ); } - late final _CFStringGetRangeOfComposedCharactersAtIndexPtr = - _lookup>( - 'CFStringGetRangeOfComposedCharactersAtIndex'); - late final _CFStringGetRangeOfComposedCharactersAtIndex = - _CFStringGetRangeOfComposedCharactersAtIndexPtr.asFunction< - CFRange Function(CFStringRef, int)>(); + late final _CFCharacterSetCreateCopyPtr = _lookup< + ffi.NativeFunction< + CFCharacterSetRef Function( + CFAllocatorRef, CFCharacterSetRef)>>('CFCharacterSetCreateCopy'); + late final _CFCharacterSetCreateCopy = + _CFCharacterSetCreateCopyPtr.asFunction< + CFCharacterSetRef Function(CFAllocatorRef, CFCharacterSetRef)>(); - int CFStringFindCharacterFromSet( - CFStringRef theString, + CFMutableCharacterSetRef CFCharacterSetCreateMutableCopy( + CFAllocatorRef alloc, CFCharacterSetRef theSet, - CFRange rangeToSearch, - int searchOptions, - ffi.Pointer result, ) { - return _CFStringFindCharacterFromSet( - theString, + return _CFCharacterSetCreateMutableCopy( + alloc, theSet, - rangeToSearch, - searchOptions, - result, ); } - late final _CFStringFindCharacterFromSetPtr = _lookup< + late final _CFCharacterSetCreateMutableCopyPtr = _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)>(); + CFMutableCharacterSetRef Function(CFAllocatorRef, + CFCharacterSetRef)>>('CFCharacterSetCreateMutableCopy'); + late final _CFCharacterSetCreateMutableCopy = + _CFCharacterSetCreateMutableCopyPtr.asFunction< + CFMutableCharacterSetRef Function( + CFAllocatorRef, CFCharacterSetRef)>(); - void CFStringGetLineBounds( - CFStringRef theString, - CFRange range, - ffi.Pointer lineBeginIndex, - ffi.Pointer lineEndIndex, - ffi.Pointer contentsEndIndex, + int CFCharacterSetIsCharacterMember( + CFCharacterSetRef theSet, + int theChar, ) { - return _CFStringGetLineBounds( - theString, - range, - lineBeginIndex, - lineEndIndex, - contentsEndIndex, + return _CFCharacterSetIsCharacterMember( + theSet, + theChar, ); } - 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 _CFCharacterSetIsCharacterMemberPtr = + _lookup>( + 'CFCharacterSetIsCharacterMember'); + late final _CFCharacterSetIsCharacterMember = + _CFCharacterSetIsCharacterMemberPtr.asFunction< + int Function(CFCharacterSetRef, int)>(); - void CFStringGetParagraphBounds( - CFStringRef string, - CFRange range, - ffi.Pointer parBeginIndex, - ffi.Pointer parEndIndex, - ffi.Pointer contentsEndIndex, + int CFCharacterSetIsLongCharacterMember( + CFCharacterSetRef theSet, + int theChar, ) { - return _CFStringGetParagraphBounds( - string, - range, - parBeginIndex, - parEndIndex, - contentsEndIndex, + return _CFCharacterSetIsLongCharacterMember( + theSet, + theChar, ); } - 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 _CFCharacterSetIsLongCharacterMemberPtr = _lookup< + ffi.NativeFunction>( + 'CFCharacterSetIsLongCharacterMember'); + late final _CFCharacterSetIsLongCharacterMember = + _CFCharacterSetIsLongCharacterMemberPtr.asFunction< + int Function(CFCharacterSetRef, int)>(); - int CFStringGetHyphenationLocationBeforeIndex( - CFStringRef string, - int location, - CFRange limitRange, - int options, - CFLocaleRef locale, - ffi.Pointer character, + CFDataRef CFCharacterSetCreateBitmapRepresentation( + CFAllocatorRef alloc, + CFCharacterSetRef theSet, ) { - return _CFStringGetHyphenationLocationBeforeIndex( - string, - location, - limitRange, - options, - locale, - character, + return _CFCharacterSetCreateBitmapRepresentation( + alloc, + theSet, ); } - 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 _CFCharacterSetCreateBitmapRepresentationPtr = _lookup< + ffi.NativeFunction< + CFDataRef Function(CFAllocatorRef, + CFCharacterSetRef)>>('CFCharacterSetCreateBitmapRepresentation'); + late final _CFCharacterSetCreateBitmapRepresentation = + _CFCharacterSetCreateBitmapRepresentationPtr.asFunction< + CFDataRef Function(CFAllocatorRef, CFCharacterSetRef)>(); - int CFStringIsHyphenationAvailableForLocale( - CFLocaleRef locale, + void CFCharacterSetAddCharactersInRange( + CFMutableCharacterSetRef theSet, + CFRange theRange, ) { - return _CFStringIsHyphenationAvailableForLocale( - locale, + return _CFCharacterSetAddCharactersInRange( + theSet, + theRange, ); } - late final _CFStringIsHyphenationAvailableForLocalePtr = - _lookup>( - 'CFStringIsHyphenationAvailableForLocale'); - late final _CFStringIsHyphenationAvailableForLocale = - _CFStringIsHyphenationAvailableForLocalePtr.asFunction< - int Function(CFLocaleRef)>(); + late final _CFCharacterSetAddCharactersInRangePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableCharacterSetRef, + CFRange)>>('CFCharacterSetAddCharactersInRange'); + late final _CFCharacterSetAddCharactersInRange = + _CFCharacterSetAddCharactersInRangePtr.asFunction< + void Function(CFMutableCharacterSetRef, CFRange)>(); - CFStringRef CFStringCreateByCombiningStrings( - CFAllocatorRef alloc, - CFArrayRef theArray, - CFStringRef separatorString, + void CFCharacterSetRemoveCharactersInRange( + CFMutableCharacterSetRef theSet, + CFRange theRange, ) { - return _CFStringCreateByCombiningStrings( - alloc, - theArray, - separatorString, + return _CFCharacterSetRemoveCharactersInRange( + theSet, + theRange, ); } - late final _CFStringCreateByCombiningStringsPtr = _lookup< + late final _CFCharacterSetRemoveCharactersInRangePtr = _lookup< ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, CFArrayRef, - CFStringRef)>>('CFStringCreateByCombiningStrings'); - late final _CFStringCreateByCombiningStrings = - _CFStringCreateByCombiningStringsPtr.asFunction< - CFStringRef Function(CFAllocatorRef, CFArrayRef, CFStringRef)>(); + ffi.Void Function(CFMutableCharacterSetRef, + CFRange)>>('CFCharacterSetRemoveCharactersInRange'); + late final _CFCharacterSetRemoveCharactersInRange = + _CFCharacterSetRemoveCharactersInRangePtr.asFunction< + void Function(CFMutableCharacterSetRef, CFRange)>(); - CFArrayRef CFStringCreateArrayBySeparatingStrings( - CFAllocatorRef alloc, + void CFCharacterSetAddCharactersInString( + CFMutableCharacterSetRef theSet, CFStringRef theString, - CFStringRef separatorString, ) { - return _CFStringCreateArrayBySeparatingStrings( - alloc, + return _CFCharacterSetAddCharactersInString( + theSet, theString, - separatorString, ); } - late final _CFStringCreateArrayBySeparatingStringsPtr = _lookup< + late final _CFCharacterSetAddCharactersInStringPtr = _lookup< ffi.NativeFunction< - CFArrayRef Function(CFAllocatorRef, CFStringRef, - CFStringRef)>>('CFStringCreateArrayBySeparatingStrings'); - late final _CFStringCreateArrayBySeparatingStrings = - _CFStringCreateArrayBySeparatingStringsPtr.asFunction< - CFArrayRef Function(CFAllocatorRef, CFStringRef, CFStringRef)>(); + ffi.Void Function(CFMutableCharacterSetRef, + CFStringRef)>>('CFCharacterSetAddCharactersInString'); + late final _CFCharacterSetAddCharactersInString = + _CFCharacterSetAddCharactersInStringPtr.asFunction< + void Function(CFMutableCharacterSetRef, CFStringRef)>(); - int CFStringGetIntValue( - CFStringRef str, + void CFCharacterSetRemoveCharactersInString( + CFMutableCharacterSetRef theSet, + CFStringRef theString, ) { - return _CFStringGetIntValue( - str, + return _CFCharacterSetRemoveCharactersInString( + theSet, + theString, ); } - late final _CFStringGetIntValuePtr = - _lookup>( - 'CFStringGetIntValue'); - late final _CFStringGetIntValue = - _CFStringGetIntValuePtr.asFunction(); + late final _CFCharacterSetRemoveCharactersInStringPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableCharacterSetRef, + CFStringRef)>>('CFCharacterSetRemoveCharactersInString'); + late final _CFCharacterSetRemoveCharactersInString = + _CFCharacterSetRemoveCharactersInStringPtr.asFunction< + void Function(CFMutableCharacterSetRef, CFStringRef)>(); - double CFStringGetDoubleValue( - CFStringRef str, + void CFCharacterSetUnion( + CFMutableCharacterSetRef theSet, + CFCharacterSetRef theOtherSet, ) { - return _CFStringGetDoubleValue( - str, + return _CFCharacterSetUnion( + theSet, + theOtherSet, ); } - late final _CFStringGetDoubleValuePtr = - _lookup>( - 'CFStringGetDoubleValue'); - late final _CFStringGetDoubleValue = - _CFStringGetDoubleValuePtr.asFunction(); + late final _CFCharacterSetUnionPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableCharacterSetRef, + CFCharacterSetRef)>>('CFCharacterSetUnion'); + late final _CFCharacterSetUnion = _CFCharacterSetUnionPtr.asFunction< + void Function(CFMutableCharacterSetRef, CFCharacterSetRef)>(); - void CFStringAppend( - CFMutableStringRef theString, - CFStringRef appendedString, + void CFCharacterSetIntersect( + CFMutableCharacterSetRef theSet, + CFCharacterSetRef theOtherSet, ) { - return _CFStringAppend( - theString, - appendedString, + return _CFCharacterSetIntersect( + theSet, + theOtherSet, ); } - late final _CFStringAppendPtr = _lookup< + late final _CFCharacterSetIntersectPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - CFMutableStringRef, CFStringRef)>>('CFStringAppend'); - late final _CFStringAppend = _CFStringAppendPtr.asFunction< - void Function(CFMutableStringRef, CFStringRef)>(); + ffi.Void Function(CFMutableCharacterSetRef, + CFCharacterSetRef)>>('CFCharacterSetIntersect'); + late final _CFCharacterSetIntersect = _CFCharacterSetIntersectPtr.asFunction< + void Function(CFMutableCharacterSetRef, CFCharacterSetRef)>(); - void CFStringAppendCharacters( - CFMutableStringRef theString, - ffi.Pointer chars, - int numChars, + void CFCharacterSetInvert( + CFMutableCharacterSetRef theSet, ) { - return _CFStringAppendCharacters( - theString, - chars, - numChars, + return _CFCharacterSetInvert( + theSet, ); } - 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 _CFCharacterSetInvertPtr = + _lookup>( + 'CFCharacterSetInvert'); + late final _CFCharacterSetInvert = _CFCharacterSetInvertPtr.asFunction< + void Function(CFMutableCharacterSetRef)>(); - void CFStringAppendPascalString( - CFMutableStringRef theString, - ConstStr255Param pStr, - int encoding, - ) { - return _CFStringAppendPascalString( - theString, - pStr, - encoding, - ); + int CFErrorGetTypeID() { + return _CFErrorGetTypeID(); } - late final _CFStringAppendPascalStringPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFMutableStringRef, ConstStr255Param, - CFStringEncoding)>>('CFStringAppendPascalString'); - late final _CFStringAppendPascalString = _CFStringAppendPascalStringPtr - .asFunction(); + late final _CFErrorGetTypeIDPtr = + _lookup>('CFErrorGetTypeID'); + late final _CFErrorGetTypeID = + _CFErrorGetTypeIDPtr.asFunction(); - void CFStringAppendCString( - CFMutableStringRef theString, - ffi.Pointer cStr, - int encoding, + 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 _CFStringAppendCString( - theString, - cStr, - encoding, + return _CFErrorCreate( + allocator, + domain, + code, + userInfo, ); } - late final _CFStringAppendCStringPtr = _lookup< + late final _CFErrorCreatePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFMutableStringRef, ffi.Pointer, - CFStringEncoding)>>('CFStringAppendCString'); - late final _CFStringAppendCString = _CFStringAppendCStringPtr.asFunction< - void Function(CFMutableStringRef, ffi.Pointer, int)>(); + CFErrorRef Function(CFAllocatorRef, CFErrorDomain, CFIndex, + CFDictionaryRef)>>('CFErrorCreate'); + late final _CFErrorCreate = _CFErrorCreatePtr.asFunction< + CFErrorRef Function( + CFAllocatorRef, CFErrorDomain, int, CFDictionaryRef)>(); - void CFStringAppendFormat( - CFMutableStringRef theString, - CFDictionaryRef formatOptions, - CFStringRef format, + CFErrorRef CFErrorCreateWithUserInfoKeysAndValues( + CFAllocatorRef allocator, + CFErrorDomain domain, + int code, + ffi.Pointer> userInfoKeys, + ffi.Pointer> userInfoValues, + int numUserInfoValues, ) { - return _CFStringAppendFormat( - theString, - formatOptions, - format, + return _CFErrorCreateWithUserInfoKeysAndValues( + allocator, + domain, + code, + userInfoKeys, + userInfoValues, + numUserInfoValues, ); } - late final _CFStringAppendFormatPtr = _lookup< + late final _CFErrorCreateWithUserInfoKeysAndValuesPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFMutableStringRef, CFDictionaryRef, - CFStringRef)>>('CFStringAppendFormat'); - late final _CFStringAppendFormat = _CFStringAppendFormatPtr.asFunction< - void Function(CFMutableStringRef, CFDictionaryRef, CFStringRef)>(); + 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)>(); - void CFStringAppendFormatAndArguments( - CFMutableStringRef theString, - CFDictionaryRef formatOptions, - CFStringRef format, - va_list arguments, + CFErrorDomain CFErrorGetDomain( + CFErrorRef err, ) { - return _CFStringAppendFormatAndArguments( - theString, - formatOptions, - format, - arguments, + return _CFErrorGetDomain( + err, ); } - 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 _CFErrorGetDomainPtr = + _lookup>( + 'CFErrorGetDomain'); + late final _CFErrorGetDomain = + _CFErrorGetDomainPtr.asFunction(); - void CFStringInsert( - CFMutableStringRef str, - int idx, - CFStringRef insertedStr, + int CFErrorGetCode( + CFErrorRef err, ) { - return _CFStringInsert( - str, - idx, - insertedStr, + return _CFErrorGetCode( + err, ); } - 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 _CFErrorGetCodePtr = + _lookup>( + 'CFErrorGetCode'); + late final _CFErrorGetCode = + _CFErrorGetCodePtr.asFunction(); - void CFStringDelete( - CFMutableStringRef theString, - CFRange range, + CFDictionaryRef CFErrorCopyUserInfo( + CFErrorRef err, ) { - return _CFStringDelete( - theString, - range, + return _CFErrorCopyUserInfo( + err, ); } - late final _CFStringDeletePtr = _lookup< - ffi.NativeFunction>( - 'CFStringDelete'); - late final _CFStringDelete = _CFStringDeletePtr.asFunction< - void Function(CFMutableStringRef, CFRange)>(); + late final _CFErrorCopyUserInfoPtr = + _lookup>( + 'CFErrorCopyUserInfo'); + late final _CFErrorCopyUserInfo = _CFErrorCopyUserInfoPtr.asFunction< + CFDictionaryRef Function(CFErrorRef)>(); - void CFStringReplace( - CFMutableStringRef theString, - CFRange range, - CFStringRef replacement, + CFStringRef CFErrorCopyDescription( + CFErrorRef err, ) { - return _CFStringReplace( - theString, - range, - replacement, + return _CFErrorCopyDescription( + err, ); } - late final _CFStringReplacePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFMutableStringRef, CFRange, CFStringRef)>>('CFStringReplace'); - late final _CFStringReplace = _CFStringReplacePtr.asFunction< - void Function(CFMutableStringRef, CFRange, CFStringRef)>(); + late final _CFErrorCopyDescriptionPtr = + _lookup>( + 'CFErrorCopyDescription'); + late final _CFErrorCopyDescription = + _CFErrorCopyDescriptionPtr.asFunction(); - void CFStringReplaceAll( - CFMutableStringRef theString, - CFStringRef replacement, + CFStringRef CFErrorCopyFailureReason( + CFErrorRef err, ) { - return _CFStringReplaceAll( - theString, - replacement, + return _CFErrorCopyFailureReason( + err, ); } - late final _CFStringReplaceAllPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFMutableStringRef, CFStringRef)>>('CFStringReplaceAll'); - late final _CFStringReplaceAll = _CFStringReplaceAllPtr.asFunction< - void Function(CFMutableStringRef, CFStringRef)>(); + late final _CFErrorCopyFailureReasonPtr = + _lookup>( + 'CFErrorCopyFailureReason'); + late final _CFErrorCopyFailureReason = _CFErrorCopyFailureReasonPtr + .asFunction(); - int CFStringFindAndReplace( - CFMutableStringRef theString, - CFStringRef stringToFind, - CFStringRef replacementString, - CFRange rangeToSearch, - int compareOptions, + CFStringRef CFErrorCopyRecoverySuggestion( + CFErrorRef err, ) { - return _CFStringFindAndReplace( - theString, - stringToFind, - replacementString, - rangeToSearch, - compareOptions, + return _CFErrorCopyRecoverySuggestion( + err, ); } - 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 _CFErrorCopyRecoverySuggestionPtr = + _lookup>( + 'CFErrorCopyRecoverySuggestion'); + late final _CFErrorCopyRecoverySuggestion = _CFErrorCopyRecoverySuggestionPtr + .asFunction(); - void CFStringSetExternalCharactersNoCopy( - CFMutableStringRef theString, - ffi.Pointer chars, - int length, - int capacity, - ) { - return _CFStringSetExternalCharactersNoCopy( - theString, - chars, - length, - capacity, - ); + int CFStringGetTypeID() { + return _CFStringGetTypeID(); } - 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)>(); + late final _CFStringGetTypeIDPtr = + _lookup>('CFStringGetTypeID'); + late final _CFStringGetTypeID = + _CFStringGetTypeIDPtr.asFunction(); - void CFStringPad( - CFMutableStringRef theString, - CFStringRef padString, - int length, - int indexIntoPad, + CFStringRef CFStringCreateWithPascalString( + CFAllocatorRef alloc, + ConstStr255Param pStr, + int encoding, ) { - return _CFStringPad( - theString, - padString, - length, - indexIntoPad, + return _CFStringCreateWithPascalString( + alloc, + pStr, + encoding, ); } - late final _CFStringPadPtr = _lookup< + late final _CFStringCreateWithPascalStringPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFMutableStringRef, CFStringRef, CFIndex, - CFIndex)>>('CFStringPad'); - late final _CFStringPad = _CFStringPadPtr.asFunction< - void Function(CFMutableStringRef, CFStringRef, int, int)>(); + CFStringRef Function(CFAllocatorRef, ConstStr255Param, + CFStringEncoding)>>('CFStringCreateWithPascalString'); + late final _CFStringCreateWithPascalString = + _CFStringCreateWithPascalStringPtr.asFunction< + CFStringRef Function(CFAllocatorRef, ConstStr255Param, int)>(); - void CFStringTrim( - CFMutableStringRef theString, - CFStringRef trimString, + CFStringRef CFStringCreateWithCString( + CFAllocatorRef alloc, + ffi.Pointer cStr, + int encoding, ) { - return _CFStringTrim( - theString, - trimString, + return _CFStringCreateWithCString( + alloc, + cStr, + encoding, ); } - late final _CFStringTrimPtr = _lookup< + late final _CFStringCreateWithCStringPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFMutableStringRef, CFStringRef)>>('CFStringTrim'); - late final _CFStringTrim = _CFStringTrimPtr.asFunction< - void Function(CFMutableStringRef, CFStringRef)>(); + CFStringRef Function(CFAllocatorRef, ffi.Pointer, + CFStringEncoding)>>('CFStringCreateWithCString'); + late final _CFStringCreateWithCString = + _CFStringCreateWithCStringPtr.asFunction< + CFStringRef Function(CFAllocatorRef, ffi.Pointer, int)>(); - void CFStringTrimWhitespace( - CFMutableStringRef theString, + CFStringRef CFStringCreateWithBytes( + CFAllocatorRef alloc, + ffi.Pointer bytes, + int numBytes, + int encoding, + int isExternalRepresentation, ) { - return _CFStringTrimWhitespace( - theString, + return _CFStringCreateWithBytes( + alloc, + bytes, + numBytes, + encoding, + isExternalRepresentation, ); } - late final _CFStringTrimWhitespacePtr = - _lookup>( - 'CFStringTrimWhitespace'); - late final _CFStringTrimWhitespace = _CFStringTrimWhitespacePtr.asFunction< - void Function(CFMutableStringRef)>(); + 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 CFStringLowercase( - CFMutableStringRef theString, - CFLocaleRef locale, + CFStringRef CFStringCreateWithCharacters( + CFAllocatorRef alloc, + ffi.Pointer chars, + int numChars, ) { - return _CFStringLowercase( - theString, - locale, + return _CFStringCreateWithCharacters( + alloc, + chars, + numChars, ); } - late final _CFStringLowercasePtr = _lookup< + late final _CFStringCreateWithCharactersPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - CFMutableStringRef, CFLocaleRef)>>('CFStringLowercase'); - late final _CFStringLowercase = _CFStringLowercasePtr.asFunction< - void Function(CFMutableStringRef, CFLocaleRef)>(); + CFStringRef Function(CFAllocatorRef, ffi.Pointer, + CFIndex)>>('CFStringCreateWithCharacters'); + late final _CFStringCreateWithCharacters = + _CFStringCreateWithCharactersPtr.asFunction< + CFStringRef Function(CFAllocatorRef, ffi.Pointer, int)>(); - void CFStringUppercase( - CFMutableStringRef theString, - CFLocaleRef locale, + CFStringRef CFStringCreateWithPascalStringNoCopy( + CFAllocatorRef alloc, + ConstStr255Param pStr, + int encoding, + CFAllocatorRef contentsDeallocator, ) { - return _CFStringUppercase( - theString, - locale, + return _CFStringCreateWithPascalStringNoCopy( + alloc, + pStr, + encoding, + contentsDeallocator, ); } - late final _CFStringUppercasePtr = _lookup< + late final _CFStringCreateWithPascalStringNoCopyPtr = _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, + 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 _CFStringCapitalizePtr = _lookup< + late final _CFStringCreateWithCStringNoCopyPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - CFMutableStringRef, CFLocaleRef)>>('CFStringCapitalize'); - late final _CFStringCapitalize = _CFStringCapitalizePtr.asFunction< - void Function(CFMutableStringRef, CFLocaleRef)>(); + CFStringRef Function( + CFAllocatorRef, + ffi.Pointer, + CFStringEncoding, + CFAllocatorRef)>>('CFStringCreateWithCStringNoCopy'); + late final _CFStringCreateWithCStringNoCopy = + _CFStringCreateWithCStringNoCopyPtr.asFunction< + CFStringRef Function( + CFAllocatorRef, ffi.Pointer, int, CFAllocatorRef)>(); - void CFStringNormalize( - CFMutableStringRef theString, - int theForm, + CFStringRef CFStringCreateWithBytesNoCopy( + CFAllocatorRef alloc, + ffi.Pointer bytes, + int numBytes, + int encoding, + int isExternalRepresentation, + CFAllocatorRef contentsDeallocator, ) { - return _CFStringNormalize( - theString, - theForm, + return _CFStringCreateWithBytesNoCopy( + alloc, + bytes, + numBytes, + encoding, + isExternalRepresentation, + contentsDeallocator, ); } - late final _CFStringNormalizePtr = _lookup< - ffi.NativeFunction>( - 'CFStringNormalize'); - late final _CFStringNormalize = _CFStringNormalizePtr.asFunction< - void Function(CFMutableStringRef, int)>(); + 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 CFStringFold( - CFMutableStringRef theString, - int theFlags, - CFLocaleRef theLocale, + CFStringRef CFStringCreateWithCharactersNoCopy( + CFAllocatorRef alloc, + ffi.Pointer chars, + int numChars, + CFAllocatorRef contentsDeallocator, ) { - return _CFStringFold( - theString, - theFlags, - theLocale, + return _CFStringCreateWithCharactersNoCopy( + alloc, + chars, + numChars, + contentsDeallocator, ); } - late final _CFStringFoldPtr = _lookup< + late final _CFStringCreateWithCharactersNoCopyPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - CFMutableStringRef, ffi.Int32, CFLocaleRef)>>('CFStringFold'); - late final _CFStringFold = _CFStringFoldPtr.asFunction< - void Function(CFMutableStringRef, int, CFLocaleRef)>(); + CFStringRef Function(CFAllocatorRef, ffi.Pointer, CFIndex, + CFAllocatorRef)>>('CFStringCreateWithCharactersNoCopy'); + late final _CFStringCreateWithCharactersNoCopy = + _CFStringCreateWithCharactersNoCopyPtr.asFunction< + CFStringRef Function( + CFAllocatorRef, ffi.Pointer, int, CFAllocatorRef)>(); - int CFStringTransform( - CFMutableStringRef string, - ffi.Pointer range, - CFStringRef transform, - int reverse, + CFStringRef CFStringCreateWithSubstring( + CFAllocatorRef alloc, + CFStringRef str, + CFRange range, ) { - return _CFStringTransform( - string, + return _CFStringCreateWithSubstring( + alloc, + str, range, - transform, - reverse, ); } - late final _CFStringTransformPtr = _lookup< + late final _CFStringCreateWithSubstringPtr = _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; + CFStringRef Function(CFAllocatorRef, CFStringRef, + CFRange)>>('CFStringCreateWithSubstring'); + late final _CFStringCreateWithSubstring = _CFStringCreateWithSubstringPtr + .asFunction(); - int CFStringIsEncodingAvailable( - int encoding, + CFStringRef CFStringCreateCopy( + CFAllocatorRef alloc, + CFStringRef theString, ) { - return _CFStringIsEncodingAvailable( - encoding, + return _CFStringCreateCopy( + alloc, + theString, ); } - 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()>(); + late final _CFStringCreateCopyPtr = _lookup< + ffi + .NativeFunction>( + 'CFStringCreateCopy'); + late final _CFStringCreateCopy = _CFStringCreateCopyPtr.asFunction< + CFStringRef Function(CFAllocatorRef, CFStringRef)>(); - CFStringRef CFStringGetNameOfEncoding( - int encoding, + CFStringRef CFStringCreateWithFormat( + CFAllocatorRef alloc, + CFDictionaryRef formatOptions, + CFStringRef format, ) { - return _CFStringGetNameOfEncoding( - encoding, + return _CFStringCreateWithFormat( + alloc, + formatOptions, + format, ); } - late final _CFStringGetNameOfEncodingPtr = - _lookup>( - 'CFStringGetNameOfEncoding'); - late final _CFStringGetNameOfEncoding = - _CFStringGetNameOfEncodingPtr.asFunction(); + late final _CFStringCreateWithFormatPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, CFDictionaryRef, + CFStringRef)>>('CFStringCreateWithFormat'); + late final _CFStringCreateWithFormat = + _CFStringCreateWithFormatPtr.asFunction< + CFStringRef Function(CFAllocatorRef, CFDictionaryRef, CFStringRef)>(); - int CFStringConvertEncodingToNSStringEncoding( - int encoding, + CFStringRef CFStringCreateWithFormatAndArguments( + CFAllocatorRef alloc, + CFDictionaryRef formatOptions, + CFStringRef format, + va_list arguments, ) { - return _CFStringConvertEncodingToNSStringEncoding( - encoding, + return _CFStringCreateWithFormatAndArguments( + alloc, + formatOptions, + format, + arguments, ); } - late final _CFStringConvertEncodingToNSStringEncodingPtr = - _lookup>( - 'CFStringConvertEncodingToNSStringEncoding'); - late final _CFStringConvertEncodingToNSStringEncoding = - _CFStringConvertEncodingToNSStringEncodingPtr.asFunction< - int Function(int)>(); + 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)>(); - int CFStringConvertNSStringEncodingToEncoding( - int encoding, + CFStringRef CFStringCreateStringWithValidatedFormat( + CFAllocatorRef alloc, + CFDictionaryRef formatOptions, + CFStringRef validFormatSpecifiers, + CFStringRef format, + ffi.Pointer errorPtr, ) { - return _CFStringConvertNSStringEncodingToEncoding( - encoding, + return _CFStringCreateStringWithValidatedFormat( + alloc, + formatOptions, + validFormatSpecifiers, + format, + errorPtr, ); } - late final _CFStringConvertNSStringEncodingToEncodingPtr = - _lookup>( - 'CFStringConvertNSStringEncodingToEncoding'); - late final _CFStringConvertNSStringEncodingToEncoding = - _CFStringConvertNSStringEncodingToEncodingPtr.asFunction< - int Function(int)>(); + 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)>(); - int CFStringConvertEncodingToWindowsCodepage( - int encoding, + CFStringRef CFStringCreateStringWithValidatedFormatAndArguments( + CFAllocatorRef alloc, + CFDictionaryRef formatOptions, + CFStringRef validFormatSpecifiers, + CFStringRef format, + va_list arguments, + ffi.Pointer errorPtr, ) { - return _CFStringConvertEncodingToWindowsCodepage( - encoding, + return _CFStringCreateStringWithValidatedFormatAndArguments( + alloc, + formatOptions, + validFormatSpecifiers, + format, + arguments, + errorPtr, ); } - late final _CFStringConvertEncodingToWindowsCodepagePtr = - _lookup>( - 'CFStringConvertEncodingToWindowsCodepage'); - late final _CFStringConvertEncodingToWindowsCodepage = - _CFStringConvertEncodingToWindowsCodepagePtr.asFunction< - int Function(int)>(); + 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 CFStringConvertWindowsCodepageToEncoding( - int codepage, + CFMutableStringRef CFStringCreateMutable( + CFAllocatorRef alloc, + int maxLength, ) { - return _CFStringConvertWindowsCodepageToEncoding( - codepage, + return _CFStringCreateMutable( + alloc, + maxLength, ); } - late final _CFStringConvertWindowsCodepageToEncodingPtr = - _lookup>( - 'CFStringConvertWindowsCodepageToEncoding'); - late final _CFStringConvertWindowsCodepageToEncoding = - _CFStringConvertWindowsCodepageToEncodingPtr.asFunction< - int Function(int)>(); + late final _CFStringCreateMutablePtr = _lookup< + ffi.NativeFunction< + CFMutableStringRef Function( + CFAllocatorRef, CFIndex)>>('CFStringCreateMutable'); + late final _CFStringCreateMutable = _CFStringCreateMutablePtr.asFunction< + CFMutableStringRef Function(CFAllocatorRef, int)>(); - int CFStringConvertIANACharSetNameToEncoding( + CFMutableStringRef CFStringCreateMutableCopy( + CFAllocatorRef alloc, + int maxLength, CFStringRef theString, ) { - return _CFStringConvertIANACharSetNameToEncoding( + return _CFStringCreateMutableCopy( + alloc, + maxLength, theString, ); } - late final _CFStringConvertIANACharSetNameToEncodingPtr = - _lookup>( - 'CFStringConvertIANACharSetNameToEncoding'); - late final _CFStringConvertIANACharSetNameToEncoding = - _CFStringConvertIANACharSetNameToEncodingPtr.asFunction< - int Function(CFStringRef)>(); + late final _CFStringCreateMutableCopyPtr = _lookup< + ffi.NativeFunction< + CFMutableStringRef Function(CFAllocatorRef, CFIndex, + CFStringRef)>>('CFStringCreateMutableCopy'); + late final _CFStringCreateMutableCopy = + _CFStringCreateMutableCopyPtr.asFunction< + CFMutableStringRef Function(CFAllocatorRef, int, CFStringRef)>(); - CFStringRef CFStringConvertEncodingToIANACharSetName( - int encoding, + CFMutableStringRef CFStringCreateMutableWithExternalCharactersNoCopy( + CFAllocatorRef alloc, + ffi.Pointer chars, + int numChars, + int capacity, + CFAllocatorRef externalCharactersAllocator, ) { - return _CFStringConvertEncodingToIANACharSetName( - encoding, + return _CFStringCreateMutableWithExternalCharactersNoCopy( + alloc, + chars, + numChars, + capacity, + externalCharactersAllocator, ); } - late final _CFStringConvertEncodingToIANACharSetNamePtr = - _lookup>( - 'CFStringConvertEncodingToIANACharSetName'); - late final _CFStringConvertEncodingToIANACharSetName = - _CFStringConvertEncodingToIANACharSetNamePtr.asFunction< - CFStringRef Function(int)>(); + 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 CFStringGetMostCompatibleMacStringEncoding( - int encoding, + int CFStringGetLength( + CFStringRef theString, ) { - return _CFStringGetMostCompatibleMacStringEncoding( - encoding, + return _CFStringGetLength( + theString, ); } - late final _CFStringGetMostCompatibleMacStringEncodingPtr = - _lookup>( - 'CFStringGetMostCompatibleMacStringEncoding'); - late final _CFStringGetMostCompatibleMacStringEncoding = - _CFStringGetMostCompatibleMacStringEncodingPtr.asFunction< - int Function(int)>(); + late final _CFStringGetLengthPtr = + _lookup>( + 'CFStringGetLength'); + late final _CFStringGetLength = + _CFStringGetLengthPtr.asFunction(); - void CFShow( - CFTypeRef obj, + int CFStringGetCharacterAtIndex( + CFStringRef theString, + int idx, ) { - return _CFShow( - obj, + return _CFStringGetCharacterAtIndex( + theString, + idx, ); } - late final _CFShowPtr = - _lookup>('CFShow'); - late final _CFShow = _CFShowPtr.asFunction(); + late final _CFStringGetCharacterAtIndexPtr = + _lookup>( + 'CFStringGetCharacterAtIndex'); + late final _CFStringGetCharacterAtIndex = _CFStringGetCharacterAtIndexPtr + .asFunction(); - void CFShowStr( - CFStringRef str, - ) { - return _CFShowStr( - str, + void CFStringGetCharacters( + CFStringRef theString, + CFRange range, + ffi.Pointer buffer, + ) { + return _CFStringGetCharacters( + theString, + range, + buffer, ); } - late final _CFShowStrPtr = - _lookup>('CFShowStr'); - late final _CFShowStr = - _CFShowStrPtr.asFunction(); + 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)>(); - CFStringRef __CFStringMakeConstantString( - ffi.Pointer cStr, + int CFStringGetPascalString( + CFStringRef theString, + StringPtr buffer, + int bufferSize, + int encoding, ) { - return ___CFStringMakeConstantString( - cStr, + return _CFStringGetPascalString( + theString, + buffer, + bufferSize, + encoding, ); } - 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(); + late final _CFStringGetPascalStringPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFStringRef, StringPtr, CFIndex, + CFStringEncoding)>>('CFStringGetPascalString'); + late final _CFStringGetPascalString = _CFStringGetPascalStringPtr.asFunction< + int Function(CFStringRef, StringPtr, int, int)>(); - void CFTimeZoneSetDefault( - CFTimeZoneRef tz, + int CFStringGetCString( + CFStringRef theString, + ffi.Pointer buffer, + int bufferSize, + int encoding, ) { - return _CFTimeZoneSetDefault( - tz, + return _CFStringGetCString( + theString, + buffer, + bufferSize, + encoding, ); } - late final _CFTimeZoneSetDefaultPtr = - _lookup>( - 'CFTimeZoneSetDefault'); - late final _CFTimeZoneSetDefault = - _CFTimeZoneSetDefaultPtr.asFunction(); + 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)>(); - CFArrayRef CFTimeZoneCopyKnownNames() { - return _CFTimeZoneCopyKnownNames(); + ConstStringPtr CFStringGetPascalStringPtr( + CFStringRef theString, + int encoding, + ) { + return _CFStringGetPascalStringPtr1( + theString, + encoding, + ); } - late final _CFTimeZoneCopyKnownNamesPtr = - _lookup>( - 'CFTimeZoneCopyKnownNames'); - late final _CFTimeZoneCopyKnownNames = - _CFTimeZoneCopyKnownNamesPtr.asFunction(); + late final _CFStringGetPascalStringPtrPtr = _lookup< + ffi.NativeFunction< + ConstStringPtr Function( + CFStringRef, CFStringEncoding)>>('CFStringGetPascalStringPtr'); + late final _CFStringGetPascalStringPtr1 = _CFStringGetPascalStringPtrPtr + .asFunction(); - CFDictionaryRef CFTimeZoneCopyAbbreviationDictionary() { - return _CFTimeZoneCopyAbbreviationDictionary(); + ffi.Pointer CFStringGetCStringPtr( + CFStringRef theString, + int encoding, + ) { + return _CFStringGetCStringPtr1( + theString, + encoding, + ); } - late final _CFTimeZoneCopyAbbreviationDictionaryPtr = - _lookup>( - 'CFTimeZoneCopyAbbreviationDictionary'); - late final _CFTimeZoneCopyAbbreviationDictionary = - _CFTimeZoneCopyAbbreviationDictionaryPtr.asFunction< - CFDictionaryRef Function()>(); + late final _CFStringGetCStringPtrPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + CFStringRef, CFStringEncoding)>>('CFStringGetCStringPtr'); + late final _CFStringGetCStringPtr1 = _CFStringGetCStringPtrPtr.asFunction< + ffi.Pointer Function(CFStringRef, int)>(); - void CFTimeZoneSetAbbreviationDictionary( - CFDictionaryRef dict, + ffi.Pointer CFStringGetCharactersPtr( + CFStringRef theString, ) { - return _CFTimeZoneSetAbbreviationDictionary( - dict, + return _CFStringGetCharactersPtr1( + theString, ); } - late final _CFTimeZoneSetAbbreviationDictionaryPtr = - _lookup>( - 'CFTimeZoneSetAbbreviationDictionary'); - late final _CFTimeZoneSetAbbreviationDictionary = - _CFTimeZoneSetAbbreviationDictionaryPtr.asFunction< - void Function(CFDictionaryRef)>(); + late final _CFStringGetCharactersPtrPtr = + _lookup Function(CFStringRef)>>( + 'CFStringGetCharactersPtr'); + late final _CFStringGetCharactersPtr1 = _CFStringGetCharactersPtrPtr + .asFunction Function(CFStringRef)>(); - CFTimeZoneRef CFTimeZoneCreate( - CFAllocatorRef allocator, - CFStringRef name, - CFDataRef data, + int CFStringGetBytes( + CFStringRef theString, + CFRange range, + int encoding, + int lossByte, + int isExternalRepresentation, + ffi.Pointer buffer, + int maxBufLen, + ffi.Pointer usedBufLen, ) { - return _CFTimeZoneCreate( - allocator, - name, - data, + return _CFStringGetBytes( + theString, + range, + encoding, + lossByte, + isExternalRepresentation, + buffer, + maxBufLen, + usedBufLen, ); } - late final _CFTimeZoneCreatePtr = _lookup< + late final _CFStringGetBytesPtr = _lookup< ffi.NativeFunction< - CFTimeZoneRef Function( - CFAllocatorRef, CFStringRef, CFDataRef)>>('CFTimeZoneCreate'); - late final _CFTimeZoneCreate = _CFTimeZoneCreatePtr.asFunction< - CFTimeZoneRef Function(CFAllocatorRef, CFStringRef, CFDataRef)>(); + 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)>(); - CFTimeZoneRef CFTimeZoneCreateWithTimeIntervalFromGMT( - CFAllocatorRef allocator, - double ti, + CFStringRef CFStringCreateFromExternalRepresentation( + CFAllocatorRef alloc, + CFDataRef data, + int encoding, ) { - return _CFTimeZoneCreateWithTimeIntervalFromGMT( - allocator, - ti, + return _CFStringCreateFromExternalRepresentation( + alloc, + data, + encoding, ); } - late final _CFTimeZoneCreateWithTimeIntervalFromGMTPtr = _lookup< + late final _CFStringCreateFromExternalRepresentationPtr = _lookup< ffi.NativeFunction< - CFTimeZoneRef Function(CFAllocatorRef, - CFTimeInterval)>>('CFTimeZoneCreateWithTimeIntervalFromGMT'); - late final _CFTimeZoneCreateWithTimeIntervalFromGMT = - _CFTimeZoneCreateWithTimeIntervalFromGMTPtr.asFunction< - CFTimeZoneRef Function(CFAllocatorRef, double)>(); + CFStringRef Function(CFAllocatorRef, CFDataRef, + CFStringEncoding)>>('CFStringCreateFromExternalRepresentation'); + late final _CFStringCreateFromExternalRepresentation = + _CFStringCreateFromExternalRepresentationPtr.asFunction< + CFStringRef Function(CFAllocatorRef, CFDataRef, int)>(); - CFTimeZoneRef CFTimeZoneCreateWithName( - CFAllocatorRef allocator, - CFStringRef name, - int tryAbbrev, + CFDataRef CFStringCreateExternalRepresentation( + CFAllocatorRef alloc, + CFStringRef theString, + int encoding, + int lossByte, ) { - return _CFTimeZoneCreateWithName( - allocator, - name, - tryAbbrev, + return _CFStringCreateExternalRepresentation( + alloc, + theString, + encoding, + lossByte, ); } - late final _CFTimeZoneCreateWithNamePtr = _lookup< + late final _CFStringCreateExternalRepresentationPtr = _lookup< ffi.NativeFunction< - CFTimeZoneRef Function(CFAllocatorRef, CFStringRef, - Boolean)>>('CFTimeZoneCreateWithName'); - late final _CFTimeZoneCreateWithName = _CFTimeZoneCreateWithNamePtr - .asFunction(); + CFDataRef Function(CFAllocatorRef, CFStringRef, CFStringEncoding, + UInt8)>>('CFStringCreateExternalRepresentation'); + late final _CFStringCreateExternalRepresentation = + _CFStringCreateExternalRepresentationPtr.asFunction< + CFDataRef Function(CFAllocatorRef, CFStringRef, int, int)>(); - CFStringRef CFTimeZoneGetName( - CFTimeZoneRef tz, + int CFStringGetSmallestEncoding( + CFStringRef theString, ) { - return _CFTimeZoneGetName( - tz, + return _CFStringGetSmallestEncoding( + theString, ); } - late final _CFTimeZoneGetNamePtr = - _lookup>( - 'CFTimeZoneGetName'); - late final _CFTimeZoneGetName = - _CFTimeZoneGetNamePtr.asFunction(); + late final _CFStringGetSmallestEncodingPtr = + _lookup>( + 'CFStringGetSmallestEncoding'); + late final _CFStringGetSmallestEncoding = + _CFStringGetSmallestEncodingPtr.asFunction(); - CFDataRef CFTimeZoneGetData( - CFTimeZoneRef tz, + int CFStringGetFastestEncoding( + CFStringRef theString, ) { - return _CFTimeZoneGetData( - tz, + return _CFStringGetFastestEncoding( + theString, ); } - late final _CFTimeZoneGetDataPtr = - _lookup>( - 'CFTimeZoneGetData'); - late final _CFTimeZoneGetData = - _CFTimeZoneGetDataPtr.asFunction(); + late final _CFStringGetFastestEncodingPtr = + _lookup>( + 'CFStringGetFastestEncoding'); + late final _CFStringGetFastestEncoding = + _CFStringGetFastestEncodingPtr.asFunction(); - double CFTimeZoneGetSecondsFromGMT( - CFTimeZoneRef tz, - double at, - ) { - return _CFTimeZoneGetSecondsFromGMT( - tz, - at, - ); + int CFStringGetSystemEncoding() { + return _CFStringGetSystemEncoding(); } - late final _CFTimeZoneGetSecondsFromGMTPtr = _lookup< - ffi.NativeFunction< - CFTimeInterval Function( - CFTimeZoneRef, CFAbsoluteTime)>>('CFTimeZoneGetSecondsFromGMT'); - late final _CFTimeZoneGetSecondsFromGMT = _CFTimeZoneGetSecondsFromGMTPtr - .asFunction(); + late final _CFStringGetSystemEncodingPtr = + _lookup>( + 'CFStringGetSystemEncoding'); + late final _CFStringGetSystemEncoding = + _CFStringGetSystemEncodingPtr.asFunction(); - CFStringRef CFTimeZoneCopyAbbreviation( - CFTimeZoneRef tz, - double at, + int CFStringGetMaximumSizeForEncoding( + int length, + int encoding, ) { - return _CFTimeZoneCopyAbbreviation( - tz, - at, + return _CFStringGetMaximumSizeForEncoding( + length, + encoding, ); } - late final _CFTimeZoneCopyAbbreviationPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function( - CFTimeZoneRef, CFAbsoluteTime)>>('CFTimeZoneCopyAbbreviation'); - late final _CFTimeZoneCopyAbbreviation = _CFTimeZoneCopyAbbreviationPtr - .asFunction(); + late final _CFStringGetMaximumSizeForEncodingPtr = + _lookup>( + 'CFStringGetMaximumSizeForEncoding'); + late final _CFStringGetMaximumSizeForEncoding = + _CFStringGetMaximumSizeForEncodingPtr.asFunction< + int Function(int, int)>(); - int CFTimeZoneIsDaylightSavingTime( - CFTimeZoneRef tz, - double at, + int CFStringGetFileSystemRepresentation( + CFStringRef string, + ffi.Pointer buffer, + int maxBufLen, ) { - return _CFTimeZoneIsDaylightSavingTime( - tz, - at, + return _CFStringGetFileSystemRepresentation( + string, + buffer, + maxBufLen, ); } - late final _CFTimeZoneIsDaylightSavingTimePtr = _lookup< - ffi.NativeFunction>( - 'CFTimeZoneIsDaylightSavingTime'); - late final _CFTimeZoneIsDaylightSavingTime = - _CFTimeZoneIsDaylightSavingTimePtr.asFunction< - int Function(CFTimeZoneRef, double)>(); + late final _CFStringGetFileSystemRepresentationPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFStringRef, ffi.Pointer, + CFIndex)>>('CFStringGetFileSystemRepresentation'); + late final _CFStringGetFileSystemRepresentation = + _CFStringGetFileSystemRepresentationPtr.asFunction< + int Function(CFStringRef, ffi.Pointer, int)>(); - double CFTimeZoneGetDaylightSavingTimeOffset( - CFTimeZoneRef tz, - double at, + int CFStringGetMaximumSizeOfFileSystemRepresentation( + CFStringRef string, ) { - return _CFTimeZoneGetDaylightSavingTimeOffset( - tz, - at, + return _CFStringGetMaximumSizeOfFileSystemRepresentation( + string, ); } - late final _CFTimeZoneGetDaylightSavingTimeOffsetPtr = _lookup< - ffi.NativeFunction< - CFTimeInterval Function(CFTimeZoneRef, - CFAbsoluteTime)>>('CFTimeZoneGetDaylightSavingTimeOffset'); - late final _CFTimeZoneGetDaylightSavingTimeOffset = - _CFTimeZoneGetDaylightSavingTimeOffsetPtr.asFunction< - double Function(CFTimeZoneRef, double)>(); + late final _CFStringGetMaximumSizeOfFileSystemRepresentationPtr = + _lookup>( + 'CFStringGetMaximumSizeOfFileSystemRepresentation'); + late final _CFStringGetMaximumSizeOfFileSystemRepresentation = + _CFStringGetMaximumSizeOfFileSystemRepresentationPtr.asFunction< + int Function(CFStringRef)>(); - double CFTimeZoneGetNextDaylightSavingTimeTransition( - CFTimeZoneRef tz, - double at, + CFStringRef CFStringCreateWithFileSystemRepresentation( + CFAllocatorRef alloc, + ffi.Pointer buffer, ) { - return _CFTimeZoneGetNextDaylightSavingTimeTransition( - tz, - at, + return _CFStringCreateWithFileSystemRepresentation( + alloc, + buffer, ); } - late final _CFTimeZoneGetNextDaylightSavingTimeTransitionPtr = _lookup< + late final _CFStringCreateWithFileSystemRepresentationPtr = _lookup< ffi.NativeFunction< - CFAbsoluteTime Function(CFTimeZoneRef, CFAbsoluteTime)>>( - 'CFTimeZoneGetNextDaylightSavingTimeTransition'); - late final _CFTimeZoneGetNextDaylightSavingTimeTransition = - _CFTimeZoneGetNextDaylightSavingTimeTransitionPtr.asFunction< - double Function(CFTimeZoneRef, double)>(); + CFStringRef Function(CFAllocatorRef, ffi.Pointer)>>( + 'CFStringCreateWithFileSystemRepresentation'); + late final _CFStringCreateWithFileSystemRepresentation = + _CFStringCreateWithFileSystemRepresentationPtr.asFunction< + CFStringRef Function(CFAllocatorRef, ffi.Pointer)>(); - CFStringRef CFTimeZoneCopyLocalizedName( - CFTimeZoneRef tz, - int style, + int CFStringCompareWithOptionsAndLocale( + CFStringRef theString1, + CFStringRef theString2, + CFRange rangeToCompare, + int compareOptions, CFLocaleRef locale, ) { - return _CFTimeZoneCopyLocalizedName( - tz, - style, + return _CFStringCompareWithOptionsAndLocale( + theString1, + theString2, + rangeToCompare, + compareOptions, locale, ); } - late final _CFTimeZoneCopyLocalizedNamePtr = _lookup< + late final _CFStringCompareWithOptionsAndLocalePtr = _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(); + ffi.Int32 Function(CFStringRef, CFStringRef, CFRange, ffi.Int32, + CFLocaleRef)>>('CFStringCompareWithOptionsAndLocale'); + late final _CFStringCompareWithOptionsAndLocale = + _CFStringCompareWithOptionsAndLocalePtr.asFunction< + int Function(CFStringRef, CFStringRef, CFRange, int, CFLocaleRef)>(); - CFCalendarRef CFCalendarCopyCurrent() { - return _CFCalendarCopyCurrent(); + int CFStringCompareWithOptions( + CFStringRef theString1, + CFStringRef theString2, + CFRange rangeToCompare, + int compareOptions, + ) { + return _CFStringCompareWithOptions( + theString1, + theString2, + rangeToCompare, + compareOptions, + ); } - late final _CFCalendarCopyCurrentPtr = - _lookup>( - 'CFCalendarCopyCurrent'); - late final _CFCalendarCopyCurrent = - _CFCalendarCopyCurrentPtr.asFunction(); + late final _CFStringCompareWithOptionsPtr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function(CFStringRef, CFStringRef, CFRange, + ffi.Int32)>>('CFStringCompareWithOptions'); + late final _CFStringCompareWithOptions = _CFStringCompareWithOptionsPtr + .asFunction(); - CFCalendarRef CFCalendarCreateWithIdentifier( - CFAllocatorRef allocator, - CFCalendarIdentifier identifier, + int CFStringCompare( + CFStringRef theString1, + CFStringRef theString2, + int compareOptions, ) { - return _CFCalendarCreateWithIdentifier( - allocator, - identifier, + return _CFStringCompare( + theString1, + theString2, + compareOptions, ); } - late final _CFCalendarCreateWithIdentifierPtr = _lookup< + late final _CFStringComparePtr = _lookup< ffi.NativeFunction< - CFCalendarRef Function(CFAllocatorRef, - CFCalendarIdentifier)>>('CFCalendarCreateWithIdentifier'); - late final _CFCalendarCreateWithIdentifier = - _CFCalendarCreateWithIdentifierPtr.asFunction< - CFCalendarRef Function(CFAllocatorRef, CFCalendarIdentifier)>(); + ffi.Int32 Function( + CFStringRef, CFStringRef, ffi.Int32)>>('CFStringCompare'); + late final _CFStringCompare = _CFStringComparePtr.asFunction< + int Function(CFStringRef, CFStringRef, int)>(); - CFCalendarIdentifier CFCalendarGetIdentifier( - CFCalendarRef calendar, + int CFStringFindWithOptionsAndLocale( + CFStringRef theString, + CFStringRef stringToFind, + CFRange rangeToSearch, + int searchOptions, + CFLocaleRef locale, + ffi.Pointer result, ) { - return _CFCalendarGetIdentifier( - calendar, + return _CFStringFindWithOptionsAndLocale( + theString, + stringToFind, + rangeToSearch, + searchOptions, + locale, + result, ); } - late final _CFCalendarGetIdentifierPtr = - _lookup>( - 'CFCalendarGetIdentifier'); - late final _CFCalendarGetIdentifier = _CFCalendarGetIdentifierPtr.asFunction< - CFCalendarIdentifier Function(CFCalendarRef)>(); + 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)>(); - CFLocaleRef CFCalendarCopyLocale( - CFCalendarRef calendar, + int CFStringFindWithOptions( + CFStringRef theString, + CFStringRef stringToFind, + CFRange rangeToSearch, + int searchOptions, + ffi.Pointer result, ) { - return _CFCalendarCopyLocale( - calendar, + return _CFStringFindWithOptions( + theString, + stringToFind, + rangeToSearch, + searchOptions, + result, ); } - late final _CFCalendarCopyLocalePtr = - _lookup>( - 'CFCalendarCopyLocale'); - late final _CFCalendarCopyLocale = _CFCalendarCopyLocalePtr.asFunction< - CFLocaleRef Function(CFCalendarRef)>(); + 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)>(); - void CFCalendarSetLocale( - CFCalendarRef calendar, - CFLocaleRef locale, + CFArrayRef CFStringCreateArrayWithFindResults( + CFAllocatorRef alloc, + CFStringRef theString, + CFStringRef stringToFind, + CFRange rangeToSearch, + int compareOptions, ) { - return _CFCalendarSetLocale( - calendar, - locale, + return _CFStringCreateArrayWithFindResults( + alloc, + theString, + stringToFind, + rangeToSearch, + compareOptions, ); } - late final _CFCalendarSetLocalePtr = _lookup< - ffi.NativeFunction>( - 'CFCalendarSetLocale'); - late final _CFCalendarSetLocale = _CFCalendarSetLocalePtr.asFunction< - void Function(CFCalendarRef, CFLocaleRef)>(); + 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)>(); - CFTimeZoneRef CFCalendarCopyTimeZone( - CFCalendarRef calendar, + CFRange CFStringFind( + CFStringRef theString, + CFStringRef stringToFind, + int compareOptions, ) { - return _CFCalendarCopyTimeZone( - calendar, + return _CFStringFind( + theString, + stringToFind, + compareOptions, ); } - late final _CFCalendarCopyTimeZonePtr = - _lookup>( - 'CFCalendarCopyTimeZone'); - late final _CFCalendarCopyTimeZone = _CFCalendarCopyTimeZonePtr.asFunction< - CFTimeZoneRef Function(CFCalendarRef)>(); + late final _CFStringFindPtr = _lookup< + ffi.NativeFunction< + CFRange Function( + CFStringRef, CFStringRef, ffi.Int32)>>('CFStringFind'); + late final _CFStringFind = _CFStringFindPtr.asFunction< + CFRange Function(CFStringRef, CFStringRef, int)>(); - void CFCalendarSetTimeZone( - CFCalendarRef calendar, - CFTimeZoneRef tz, + int CFStringHasPrefix( + CFStringRef theString, + CFStringRef prefix, ) { - return _CFCalendarSetTimeZone( - calendar, - tz, + return _CFStringHasPrefix( + theString, + prefix, ); } - late final _CFCalendarSetTimeZonePtr = _lookup< - ffi.NativeFunction>( - 'CFCalendarSetTimeZone'); - late final _CFCalendarSetTimeZone = _CFCalendarSetTimeZonePtr.asFunction< - void Function(CFCalendarRef, CFTimeZoneRef)>(); + late final _CFStringHasPrefixPtr = + _lookup>( + 'CFStringHasPrefix'); + late final _CFStringHasPrefix = _CFStringHasPrefixPtr.asFunction< + int Function(CFStringRef, CFStringRef)>(); - int CFCalendarGetFirstWeekday( - CFCalendarRef calendar, + int CFStringHasSuffix( + CFStringRef theString, + CFStringRef suffix, ) { - return _CFCalendarGetFirstWeekday( - calendar, + return _CFStringHasSuffix( + theString, + suffix, ); } - late final _CFCalendarGetFirstWeekdayPtr = - _lookup>( - 'CFCalendarGetFirstWeekday'); - late final _CFCalendarGetFirstWeekday = - _CFCalendarGetFirstWeekdayPtr.asFunction(); + late final _CFStringHasSuffixPtr = + _lookup>( + 'CFStringHasSuffix'); + late final _CFStringHasSuffix = _CFStringHasSuffixPtr.asFunction< + int Function(CFStringRef, CFStringRef)>(); - void CFCalendarSetFirstWeekday( - CFCalendarRef calendar, - int wkdy, + CFRange CFStringGetRangeOfComposedCharactersAtIndex( + CFStringRef theString, + int theIndex, ) { - return _CFCalendarSetFirstWeekday( - calendar, - wkdy, + return _CFStringGetRangeOfComposedCharactersAtIndex( + theString, + theIndex, ); } - late final _CFCalendarSetFirstWeekdayPtr = - _lookup>( - 'CFCalendarSetFirstWeekday'); - late final _CFCalendarSetFirstWeekday = _CFCalendarSetFirstWeekdayPtr - .asFunction(); + late final _CFStringGetRangeOfComposedCharactersAtIndexPtr = + _lookup>( + 'CFStringGetRangeOfComposedCharactersAtIndex'); + late final _CFStringGetRangeOfComposedCharactersAtIndex = + _CFStringGetRangeOfComposedCharactersAtIndexPtr.asFunction< + CFRange Function(CFStringRef, int)>(); - int CFCalendarGetMinimumDaysInFirstWeek( - CFCalendarRef calendar, + int CFStringFindCharacterFromSet( + CFStringRef theString, + CFCharacterSetRef theSet, + CFRange rangeToSearch, + int searchOptions, + ffi.Pointer result, ) { - return _CFCalendarGetMinimumDaysInFirstWeek( - calendar, + return _CFStringFindCharacterFromSet( + theString, + theSet, + rangeToSearch, + searchOptions, + result, ); } - late final _CFCalendarGetMinimumDaysInFirstWeekPtr = - _lookup>( - 'CFCalendarGetMinimumDaysInFirstWeek'); - late final _CFCalendarGetMinimumDaysInFirstWeek = - _CFCalendarGetMinimumDaysInFirstWeekPtr.asFunction< - int Function(CFCalendarRef)>(); + 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 CFCalendarSetMinimumDaysInFirstWeek( - CFCalendarRef calendar, - int mwd, + void CFStringGetLineBounds( + CFStringRef theString, + CFRange range, + ffi.Pointer lineBeginIndex, + ffi.Pointer lineEndIndex, + ffi.Pointer contentsEndIndex, ) { - return _CFCalendarSetMinimumDaysInFirstWeek( - calendar, - mwd, + return _CFStringGetLineBounds( + theString, + range, + lineBeginIndex, + lineEndIndex, + contentsEndIndex, ); } - late final _CFCalendarSetMinimumDaysInFirstWeekPtr = - _lookup>( - 'CFCalendarSetMinimumDaysInFirstWeek'); - late final _CFCalendarSetMinimumDaysInFirstWeek = - _CFCalendarSetMinimumDaysInFirstWeekPtr.asFunction< - void Function(CFCalendarRef, int)>(); + 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)>(); - CFRange CFCalendarGetMinimumRangeOfUnit( - CFCalendarRef calendar, - int unit, + void CFStringGetParagraphBounds( + CFStringRef string, + CFRange range, + ffi.Pointer parBeginIndex, + ffi.Pointer parEndIndex, + ffi.Pointer contentsEndIndex, ) { - return _CFCalendarGetMinimumRangeOfUnit( - calendar, - unit, + return _CFStringGetParagraphBounds( + string, + range, + parBeginIndex, + parEndIndex, + contentsEndIndex, ); } - late final _CFCalendarGetMinimumRangeOfUnitPtr = - _lookup>( - 'CFCalendarGetMinimumRangeOfUnit'); - late final _CFCalendarGetMinimumRangeOfUnit = - _CFCalendarGetMinimumRangeOfUnitPtr.asFunction< - CFRange Function(CFCalendarRef, int)>(); + 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)>(); - CFRange CFCalendarGetMaximumRangeOfUnit( - CFCalendarRef calendar, - int unit, + int CFStringGetHyphenationLocationBeforeIndex( + CFStringRef string, + int location, + CFRange limitRange, + int options, + CFLocaleRef locale, + ffi.Pointer character, ) { - return _CFCalendarGetMaximumRangeOfUnit( - calendar, - unit, + return _CFStringGetHyphenationLocationBeforeIndex( + string, + location, + limitRange, + options, + locale, + character, ); } - late final _CFCalendarGetMaximumRangeOfUnitPtr = - _lookup>( - 'CFCalendarGetMaximumRangeOfUnit'); - late final _CFCalendarGetMaximumRangeOfUnit = - _CFCalendarGetMaximumRangeOfUnitPtr.asFunction< - CFRange Function(CFCalendarRef, int)>(); + 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)>(); - CFRange CFCalendarGetRangeOfUnit( - CFCalendarRef calendar, - int smallerUnit, - int biggerUnit, - double at, + int CFStringIsHyphenationAvailableForLocale( + CFLocaleRef locale, ) { - return _CFCalendarGetRangeOfUnit( - calendar, - smallerUnit, - biggerUnit, - at, + return _CFStringIsHyphenationAvailableForLocale( + locale, ); } - late final _CFCalendarGetRangeOfUnitPtr = _lookup< - ffi.NativeFunction< - CFRange Function(CFCalendarRef, ffi.Int32, ffi.Int32, - CFAbsoluteTime)>>('CFCalendarGetRangeOfUnit'); - late final _CFCalendarGetRangeOfUnit = _CFCalendarGetRangeOfUnitPtr - .asFunction(); + late final _CFStringIsHyphenationAvailableForLocalePtr = + _lookup>( + 'CFStringIsHyphenationAvailableForLocale'); + late final _CFStringIsHyphenationAvailableForLocale = + _CFStringIsHyphenationAvailableForLocalePtr.asFunction< + int Function(CFLocaleRef)>(); - int CFCalendarGetOrdinalityOfUnit( - CFCalendarRef calendar, - int smallerUnit, - int biggerUnit, - double at, + CFStringRef CFStringCreateByCombiningStrings( + CFAllocatorRef alloc, + CFArrayRef theArray, + CFStringRef separatorString, ) { - return _CFCalendarGetOrdinalityOfUnit( - calendar, - smallerUnit, - biggerUnit, - at, + return _CFStringCreateByCombiningStrings( + alloc, + theArray, + separatorString, ); } - late final _CFCalendarGetOrdinalityOfUnitPtr = _lookup< + late final _CFStringCreateByCombiningStringsPtr = _lookup< ffi.NativeFunction< - CFIndex Function(CFCalendarRef, ffi.Int32, ffi.Int32, - CFAbsoluteTime)>>('CFCalendarGetOrdinalityOfUnit'); - late final _CFCalendarGetOrdinalityOfUnit = _CFCalendarGetOrdinalityOfUnitPtr - .asFunction(); + CFStringRef Function(CFAllocatorRef, CFArrayRef, + CFStringRef)>>('CFStringCreateByCombiningStrings'); + late final _CFStringCreateByCombiningStrings = + _CFStringCreateByCombiningStringsPtr.asFunction< + CFStringRef Function(CFAllocatorRef, CFArrayRef, CFStringRef)>(); - int CFCalendarGetTimeRangeOfUnit( - CFCalendarRef calendar, - int unit, - double at, - ffi.Pointer startp, - ffi.Pointer tip, + CFArrayRef CFStringCreateArrayBySeparatingStrings( + CFAllocatorRef alloc, + CFStringRef theString, + CFStringRef separatorString, ) { - return _CFCalendarGetTimeRangeOfUnit( - calendar, - unit, - at, - startp, - tip, + return _CFStringCreateArrayBySeparatingStrings( + alloc, + theString, + separatorString, ); } - late final _CFCalendarGetTimeRangeOfUnitPtr = _lookup< + late final _CFStringCreateArrayBySeparatingStringsPtr = _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)>(); + CFArrayRef Function(CFAllocatorRef, CFStringRef, + CFStringRef)>>('CFStringCreateArrayBySeparatingStrings'); + late final _CFStringCreateArrayBySeparatingStrings = + _CFStringCreateArrayBySeparatingStringsPtr.asFunction< + CFArrayRef Function(CFAllocatorRef, CFStringRef, CFStringRef)>(); - int CFCalendarComposeAbsoluteTime( - CFCalendarRef calendar, - ffi.Pointer at, - ffi.Pointer componentDesc, + int CFStringGetIntValue( + CFStringRef str, ) { - return _CFCalendarComposeAbsoluteTime( - calendar, - at, - componentDesc, + return _CFStringGetIntValue( + str, ); } - 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 _CFStringGetIntValuePtr = + _lookup>( + 'CFStringGetIntValue'); + late final _CFStringGetIntValue = + _CFStringGetIntValuePtr.asFunction(); - int CFCalendarDecomposeAbsoluteTime( - CFCalendarRef calendar, - double at, - ffi.Pointer componentDesc, + double CFStringGetDoubleValue( + CFStringRef str, ) { - return _CFCalendarDecomposeAbsoluteTime( - calendar, - at, - componentDesc, + return _CFStringGetDoubleValue( + str, ); } - 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 _CFStringGetDoubleValuePtr = + _lookup>( + 'CFStringGetDoubleValue'); + late final _CFStringGetDoubleValue = + _CFStringGetDoubleValuePtr.asFunction(); - int CFCalendarAddComponents( - CFCalendarRef calendar, - ffi.Pointer at, - int options, - ffi.Pointer componentDesc, + void CFStringAppend( + CFMutableStringRef theString, + CFStringRef appendedString, ) { - return _CFCalendarAddComponents( - calendar, - at, - options, - componentDesc, + return _CFStringAppend( + theString, + appendedString, ); } - 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 _CFStringAppendPtr = _lookup< + ffi + .NativeFunction>( + 'CFStringAppend'); + late final _CFStringAppend = _CFStringAppendPtr.asFunction< + void Function(CFMutableStringRef, CFStringRef)>(); - int CFCalendarGetComponentDifference( - CFCalendarRef calendar, - double startingAT, - double resultAT, - int options, - ffi.Pointer componentDesc, + void CFStringAppendCharacters( + CFMutableStringRef theString, + ffi.Pointer chars, + int numChars, ) { - return _CFCalendarGetComponentDifference( - calendar, - startingAT, - resultAT, - options, - componentDesc, + return _CFStringAppendCharacters( + theString, + chars, + numChars, ); } - late final _CFCalendarGetComponentDifferencePtr = _lookup< + late final _CFStringAppendCharactersPtr = _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)>(); + ffi.Void Function(CFMutableStringRef, ffi.Pointer, + CFIndex)>>('CFStringAppendCharacters'); + late final _CFStringAppendCharacters = + _CFStringAppendCharactersPtr.asFunction< + void Function(CFMutableStringRef, ffi.Pointer, int)>(); - CFStringRef CFDateFormatterCreateDateFormatFromTemplate( - CFAllocatorRef allocator, - CFStringRef tmplate, - int options, - CFLocaleRef locale, + void CFStringAppendPascalString( + CFMutableStringRef theString, + ConstStr255Param pStr, + int encoding, ) { - return _CFDateFormatterCreateDateFormatFromTemplate( - allocator, - tmplate, - options, - locale, + return _CFStringAppendPascalString( + theString, + pStr, + encoding, ); } - late final _CFDateFormatterCreateDateFormatFromTemplatePtr = _lookup< + late final _CFStringAppendPascalStringPtr = _lookup< ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, CFStringRef, CFOptionFlags, - CFLocaleRef)>>('CFDateFormatterCreateDateFormatFromTemplate'); - late final _CFDateFormatterCreateDateFormatFromTemplate = - _CFDateFormatterCreateDateFormatFromTemplatePtr.asFunction< - CFStringRef Function( - CFAllocatorRef, CFStringRef, int, CFLocaleRef)>(); + ffi.Void Function(CFMutableStringRef, ConstStr255Param, + CFStringEncoding)>>('CFStringAppendPascalString'); + late final _CFStringAppendPascalString = _CFStringAppendPascalStringPtr + .asFunction(); - int CFDateFormatterGetTypeID() { - return _CFDateFormatterGetTypeID(); + void CFStringAppendCString( + CFMutableStringRef theString, + ffi.Pointer cStr, + int encoding, + ) { + return _CFStringAppendCString( + theString, + cStr, + encoding, + ); } - late final _CFDateFormatterGetTypeIDPtr = - _lookup>( - 'CFDateFormatterGetTypeID'); - late final _CFDateFormatterGetTypeID = - _CFDateFormatterGetTypeIDPtr.asFunction(); + 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)>(); - CFDateFormatterRef CFDateFormatterCreateISO8601Formatter( - CFAllocatorRef allocator, - int formatOptions, + void CFStringAppendFormat( + CFMutableStringRef theString, + CFDictionaryRef formatOptions, + CFStringRef format, ) { - return _CFDateFormatterCreateISO8601Formatter( - allocator, + return _CFStringAppendFormat( + theString, formatOptions, + format, ); } - late final _CFDateFormatterCreateISO8601FormatterPtr = _lookup< + late final _CFStringAppendFormatPtr = _lookup< ffi.NativeFunction< - CFDateFormatterRef Function(CFAllocatorRef, - ffi.Int32)>>('CFDateFormatterCreateISO8601Formatter'); - late final _CFDateFormatterCreateISO8601Formatter = - _CFDateFormatterCreateISO8601FormatterPtr.asFunction< - CFDateFormatterRef Function(CFAllocatorRef, int)>(); + ffi.Void Function(CFMutableStringRef, CFDictionaryRef, + CFStringRef)>>('CFStringAppendFormat'); + late final _CFStringAppendFormat = _CFStringAppendFormatPtr.asFunction< + void Function(CFMutableStringRef, CFDictionaryRef, CFStringRef)>(); - CFDateFormatterRef CFDateFormatterCreate( - CFAllocatorRef allocator, - CFLocaleRef locale, - int dateStyle, - int timeStyle, + void CFStringAppendFormatAndArguments( + CFMutableStringRef theString, + CFDictionaryRef formatOptions, + CFStringRef format, + va_list arguments, ) { - return _CFDateFormatterCreate( - allocator, - locale, - dateStyle, - timeStyle, + return _CFStringAppendFormatAndArguments( + theString, + formatOptions, + format, + arguments, ); } - late final _CFDateFormatterCreatePtr = _lookup< + late final _CFStringAppendFormatAndArgumentsPtr = _lookup< ffi.NativeFunction< - CFDateFormatterRef Function(CFAllocatorRef, CFLocaleRef, ffi.Int32, - ffi.Int32)>>('CFDateFormatterCreate'); - late final _CFDateFormatterCreate = _CFDateFormatterCreatePtr.asFunction< - CFDateFormatterRef Function(CFAllocatorRef, CFLocaleRef, int, int)>(); + ffi.Void Function(CFMutableStringRef, CFDictionaryRef, CFStringRef, + va_list)>>('CFStringAppendFormatAndArguments'); + late final _CFStringAppendFormatAndArguments = + _CFStringAppendFormatAndArgumentsPtr.asFunction< + void Function( + CFMutableStringRef, CFDictionaryRef, CFStringRef, va_list)>(); - CFLocaleRef CFDateFormatterGetLocale( - CFDateFormatterRef formatter, + void CFStringInsert( + CFMutableStringRef str, + int idx, + CFStringRef insertedStr, ) { - return _CFDateFormatterGetLocale( - formatter, + return _CFStringInsert( + str, + idx, + insertedStr, ); } - late final _CFDateFormatterGetLocalePtr = - _lookup>( - 'CFDateFormatterGetLocale'); - late final _CFDateFormatterGetLocale = _CFDateFormatterGetLocalePtr - .asFunction(); + late final _CFStringInsertPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMutableStringRef, CFIndex, CFStringRef)>>('CFStringInsert'); + late final _CFStringInsert = _CFStringInsertPtr.asFunction< + void Function(CFMutableStringRef, int, CFStringRef)>(); - int CFDateFormatterGetDateStyle( - CFDateFormatterRef formatter, + void CFStringDelete( + CFMutableStringRef theString, + CFRange range, ) { - return _CFDateFormatterGetDateStyle( - formatter, + return _CFStringDelete( + theString, + range, ); } - late final _CFDateFormatterGetDateStylePtr = - _lookup>( - 'CFDateFormatterGetDateStyle'); - late final _CFDateFormatterGetDateStyle = _CFDateFormatterGetDateStylePtr - .asFunction(); + late final _CFStringDeletePtr = _lookup< + ffi.NativeFunction>( + 'CFStringDelete'); + late final _CFStringDelete = _CFStringDeletePtr.asFunction< + void Function(CFMutableStringRef, CFRange)>(); - int CFDateFormatterGetTimeStyle( - CFDateFormatterRef formatter, + void CFStringReplace( + CFMutableStringRef theString, + CFRange range, + CFStringRef replacement, ) { - return _CFDateFormatterGetTimeStyle( - formatter, + return _CFStringReplace( + theString, + range, + replacement, ); } - late final _CFDateFormatterGetTimeStylePtr = - _lookup>( - 'CFDateFormatterGetTimeStyle'); - late final _CFDateFormatterGetTimeStyle = _CFDateFormatterGetTimeStylePtr - .asFunction(); + late final _CFStringReplacePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMutableStringRef, CFRange, CFStringRef)>>('CFStringReplace'); + late final _CFStringReplace = _CFStringReplacePtr.asFunction< + void Function(CFMutableStringRef, CFRange, CFStringRef)>(); - CFStringRef CFDateFormatterGetFormat( - CFDateFormatterRef formatter, + void CFStringReplaceAll( + CFMutableStringRef theString, + CFStringRef replacement, ) { - return _CFDateFormatterGetFormat( - formatter, + return _CFStringReplaceAll( + theString, + replacement, ); } - late final _CFDateFormatterGetFormatPtr = - _lookup>( - 'CFDateFormatterGetFormat'); - late final _CFDateFormatterGetFormat = _CFDateFormatterGetFormatPtr - .asFunction(); + late final _CFStringReplaceAllPtr = _lookup< + ffi + .NativeFunction>( + 'CFStringReplaceAll'); + late final _CFStringReplaceAll = _CFStringReplaceAllPtr.asFunction< + void Function(CFMutableStringRef, CFStringRef)>(); - void CFDateFormatterSetFormat( - CFDateFormatterRef formatter, - CFStringRef formatString, + int CFStringFindAndReplace( + CFMutableStringRef theString, + CFStringRef stringToFind, + CFStringRef replacementString, + CFRange rangeToSearch, + int compareOptions, ) { - return _CFDateFormatterSetFormat( - formatter, - formatString, + return _CFStringFindAndReplace( + theString, + stringToFind, + replacementString, + rangeToSearch, + compareOptions, ); } - late final _CFDateFormatterSetFormatPtr = _lookup< + late final _CFStringFindAndReplacePtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - CFDateFormatterRef, CFStringRef)>>('CFDateFormatterSetFormat'); - late final _CFDateFormatterSetFormat = _CFDateFormatterSetFormatPtr - .asFunction(); + CFIndex Function(CFMutableStringRef, CFStringRef, CFStringRef, + CFRange, ffi.Int32)>>('CFStringFindAndReplace'); + late final _CFStringFindAndReplace = _CFStringFindAndReplacePtr.asFunction< + int Function( + CFMutableStringRef, CFStringRef, CFStringRef, CFRange, int)>(); - CFStringRef CFDateFormatterCreateStringWithDate( - CFAllocatorRef allocator, - CFDateFormatterRef formatter, - CFDateRef date, + void CFStringSetExternalCharactersNoCopy( + CFMutableStringRef theString, + ffi.Pointer chars, + int length, + int capacity, ) { - return _CFDateFormatterCreateStringWithDate( - allocator, - formatter, - date, + return _CFStringSetExternalCharactersNoCopy( + theString, + chars, + length, + capacity, ); } - late final _CFDateFormatterCreateStringWithDatePtr = _lookup< + late final _CFStringSetExternalCharactersNoCopyPtr = _lookup< ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, CFDateFormatterRef, - CFDateRef)>>('CFDateFormatterCreateStringWithDate'); - late final _CFDateFormatterCreateStringWithDate = - _CFDateFormatterCreateStringWithDatePtr.asFunction< - CFStringRef Function( - CFAllocatorRef, CFDateFormatterRef, CFDateRef)>(); + ffi.Void Function(CFMutableStringRef, ffi.Pointer, CFIndex, + CFIndex)>>('CFStringSetExternalCharactersNoCopy'); + late final _CFStringSetExternalCharactersNoCopy = + _CFStringSetExternalCharactersNoCopyPtr.asFunction< + void Function(CFMutableStringRef, ffi.Pointer, int, int)>(); - CFStringRef CFDateFormatterCreateStringWithAbsoluteTime( - CFAllocatorRef allocator, - CFDateFormatterRef formatter, - double at, + void CFStringPad( + CFMutableStringRef theString, + CFStringRef padString, + int length, + int indexIntoPad, ) { - return _CFDateFormatterCreateStringWithAbsoluteTime( - allocator, - formatter, - at, + return _CFStringPad( + theString, + padString, + length, + indexIntoPad, ); } - late final _CFDateFormatterCreateStringWithAbsoluteTimePtr = _lookup< + late final _CFStringPadPtr = _lookup< ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, CFDateFormatterRef, - CFAbsoluteTime)>>('CFDateFormatterCreateStringWithAbsoluteTime'); - late final _CFDateFormatterCreateStringWithAbsoluteTime = - _CFDateFormatterCreateStringWithAbsoluteTimePtr.asFunction< - CFStringRef Function(CFAllocatorRef, CFDateFormatterRef, double)>(); + ffi.Void Function(CFMutableStringRef, CFStringRef, CFIndex, + CFIndex)>>('CFStringPad'); + late final _CFStringPad = _CFStringPadPtr.asFunction< + void Function(CFMutableStringRef, CFStringRef, int, int)>(); - CFDateRef CFDateFormatterCreateDateFromString( - CFAllocatorRef allocator, - CFDateFormatterRef formatter, - CFStringRef string, - ffi.Pointer rangep, + void CFStringTrim( + CFMutableStringRef theString, + CFStringRef trimString, ) { - return _CFDateFormatterCreateDateFromString( - allocator, - formatter, - string, - rangep, + return _CFStringTrim( + theString, + trimString, ); } - 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 _CFStringTrimPtr = _lookup< + ffi + .NativeFunction>( + 'CFStringTrim'); + late final _CFStringTrim = _CFStringTrimPtr.asFunction< + void Function(CFMutableStringRef, CFStringRef)>(); - int CFDateFormatterGetAbsoluteTimeFromString( - CFDateFormatterRef formatter, - CFStringRef string, - ffi.Pointer rangep, - ffi.Pointer atp, + void CFStringTrimWhitespace( + CFMutableStringRef theString, ) { - return _CFDateFormatterGetAbsoluteTimeFromString( - formatter, - string, - rangep, - atp, + return _CFStringTrimWhitespace( + theString, ); } - 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 _CFStringTrimWhitespacePtr = + _lookup>( + 'CFStringTrimWhitespace'); + late final _CFStringTrimWhitespace = _CFStringTrimWhitespacePtr.asFunction< + void Function(CFMutableStringRef)>(); - void CFDateFormatterSetProperty( - CFDateFormatterRef formatter, - CFStringRef key, - CFTypeRef value, + void CFStringLowercase( + CFMutableStringRef theString, + CFLocaleRef locale, ) { - return _CFDateFormatterSetProperty( - formatter, - key, - value, + return _CFStringLowercase( + theString, + locale, ); } - late final _CFDateFormatterSetPropertyPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFDateFormatterRef, CFStringRef, - CFTypeRef)>>('CFDateFormatterSetProperty'); - late final _CFDateFormatterSetProperty = _CFDateFormatterSetPropertyPtr - .asFunction(); + late final _CFStringLowercasePtr = _lookup< + ffi + .NativeFunction>( + 'CFStringLowercase'); + late final _CFStringLowercase = _CFStringLowercasePtr.asFunction< + void Function(CFMutableStringRef, CFLocaleRef)>(); - CFTypeRef CFDateFormatterCopyProperty( - CFDateFormatterRef formatter, - CFDateFormatterKey key, + void CFStringUppercase( + CFMutableStringRef theString, + CFLocaleRef locale, ) { - return _CFDateFormatterCopyProperty( - formatter, - key, + return _CFStringUppercase( + theString, + locale, ); } - late final _CFDateFormatterCopyPropertyPtr = _lookup< - ffi.NativeFunction< - CFTypeRef Function(CFDateFormatterRef, - CFDateFormatterKey)>>('CFDateFormatterCopyProperty'); - late final _CFDateFormatterCopyProperty = _CFDateFormatterCopyPropertyPtr - .asFunction(); + late final _CFStringUppercasePtr = _lookup< + ffi + .NativeFunction>( + 'CFStringUppercase'); + late final _CFStringUppercase = _CFStringUppercasePtr.asFunction< + void Function(CFMutableStringRef, CFLocaleRef)>(); - late final ffi.Pointer _kCFDateFormatterIsLenient = - _lookup('kCFDateFormatterIsLenient'); + void CFStringCapitalize( + CFMutableStringRef theString, + CFLocaleRef locale, + ) { + return _CFStringCapitalize( + theString, + locale, + ); + } - CFDateFormatterKey get kCFDateFormatterIsLenient => - _kCFDateFormatterIsLenient.value; + late final _CFStringCapitalizePtr = _lookup< + ffi + .NativeFunction>( + 'CFStringCapitalize'); + late final _CFStringCapitalize = _CFStringCapitalizePtr.asFunction< + void Function(CFMutableStringRef, CFLocaleRef)>(); - set kCFDateFormatterIsLenient(CFDateFormatterKey value) => - _kCFDateFormatterIsLenient.value = value; + void CFStringNormalize( + CFMutableStringRef theString, + int theForm, + ) { + return _CFStringNormalize( + theString, + theForm, + ); + } - late final ffi.Pointer _kCFDateFormatterTimeZone = - _lookup('kCFDateFormatterTimeZone'); + late final _CFStringNormalizePtr = _lookup< + ffi.NativeFunction>( + 'CFStringNormalize'); + late final _CFStringNormalize = _CFStringNormalizePtr.asFunction< + void Function(CFMutableStringRef, int)>(); - CFDateFormatterKey get kCFDateFormatterTimeZone => - _kCFDateFormatterTimeZone.value; + void CFStringFold( + CFMutableStringRef theString, + int theFlags, + CFLocaleRef theLocale, + ) { + return _CFStringFold( + theString, + theFlags, + theLocale, + ); + } - set kCFDateFormatterTimeZone(CFDateFormatterKey value) => - _kCFDateFormatterTimeZone.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 _kCFDateFormatterCalendarName = - _lookup('kCFDateFormatterCalendarName'); + int CFStringTransform( + CFMutableStringRef string, + ffi.Pointer range, + CFStringRef transform, + int reverse, + ) { + return _CFStringTransform( + string, + range, + transform, + reverse, + ); + } - CFDateFormatterKey get kCFDateFormatterCalendarName => - _kCFDateFormatterCalendarName.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 kCFDateFormatterCalendarName(CFDateFormatterKey value) => - _kCFDateFormatterCalendarName.value = value; + late final ffi.Pointer _kCFStringTransformStripCombiningMarks = + _lookup('kCFStringTransformStripCombiningMarks'); - late final ffi.Pointer _kCFDateFormatterDefaultFormat = - _lookup('kCFDateFormatterDefaultFormat'); + CFStringRef get kCFStringTransformStripCombiningMarks => + _kCFStringTransformStripCombiningMarks.value; - CFDateFormatterKey get kCFDateFormatterDefaultFormat => - _kCFDateFormatterDefaultFormat.value; + set kCFStringTransformStripCombiningMarks(CFStringRef value) => + _kCFStringTransformStripCombiningMarks.value = value; - set kCFDateFormatterDefaultFormat(CFDateFormatterKey value) => - _kCFDateFormatterDefaultFormat.value = value; + late final ffi.Pointer _kCFStringTransformToLatin = + _lookup('kCFStringTransformToLatin'); - late final ffi.Pointer - _kCFDateFormatterTwoDigitStartDate = - _lookup('kCFDateFormatterTwoDigitStartDate'); + CFStringRef get kCFStringTransformToLatin => _kCFStringTransformToLatin.value; - CFDateFormatterKey get kCFDateFormatterTwoDigitStartDate => - _kCFDateFormatterTwoDigitStartDate.value; + set kCFStringTransformToLatin(CFStringRef value) => + _kCFStringTransformToLatin.value = value; - set kCFDateFormatterTwoDigitStartDate(CFDateFormatterKey value) => - _kCFDateFormatterTwoDigitStartDate.value = value; + late final ffi.Pointer _kCFStringTransformFullwidthHalfwidth = + _lookup('kCFStringTransformFullwidthHalfwidth'); - late final ffi.Pointer _kCFDateFormatterDefaultDate = - _lookup('kCFDateFormatterDefaultDate'); + CFStringRef get kCFStringTransformFullwidthHalfwidth => + _kCFStringTransformFullwidthHalfwidth.value; - CFDateFormatterKey get kCFDateFormatterDefaultDate => - _kCFDateFormatterDefaultDate.value; - - set kCFDateFormatterDefaultDate(CFDateFormatterKey value) => - _kCFDateFormatterDefaultDate.value = value; + set kCFStringTransformFullwidthHalfwidth(CFStringRef value) => + _kCFStringTransformFullwidthHalfwidth.value = value; - late final ffi.Pointer _kCFDateFormatterCalendar = - _lookup('kCFDateFormatterCalendar'); + late final ffi.Pointer _kCFStringTransformLatinKatakana = + _lookup('kCFStringTransformLatinKatakana'); - CFDateFormatterKey get kCFDateFormatterCalendar => - _kCFDateFormatterCalendar.value; + CFStringRef get kCFStringTransformLatinKatakana => + _kCFStringTransformLatinKatakana.value; - set kCFDateFormatterCalendar(CFDateFormatterKey value) => - _kCFDateFormatterCalendar.value = value; + set kCFStringTransformLatinKatakana(CFStringRef value) => + _kCFStringTransformLatinKatakana.value = value; - late final ffi.Pointer _kCFDateFormatterEraSymbols = - _lookup('kCFDateFormatterEraSymbols'); + late final ffi.Pointer _kCFStringTransformLatinHiragana = + _lookup('kCFStringTransformLatinHiragana'); - CFDateFormatterKey get kCFDateFormatterEraSymbols => - _kCFDateFormatterEraSymbols.value; + CFStringRef get kCFStringTransformLatinHiragana => + _kCFStringTransformLatinHiragana.value; - set kCFDateFormatterEraSymbols(CFDateFormatterKey value) => - _kCFDateFormatterEraSymbols.value = value; + set kCFStringTransformLatinHiragana(CFStringRef value) => + _kCFStringTransformLatinHiragana.value = value; - late final ffi.Pointer _kCFDateFormatterMonthSymbols = - _lookup('kCFDateFormatterMonthSymbols'); + late final ffi.Pointer _kCFStringTransformHiraganaKatakana = + _lookup('kCFStringTransformHiraganaKatakana'); - CFDateFormatterKey get kCFDateFormatterMonthSymbols => - _kCFDateFormatterMonthSymbols.value; + CFStringRef get kCFStringTransformHiraganaKatakana => + _kCFStringTransformHiraganaKatakana.value; - set kCFDateFormatterMonthSymbols(CFDateFormatterKey value) => - _kCFDateFormatterMonthSymbols.value = value; + set kCFStringTransformHiraganaKatakana(CFStringRef value) => + _kCFStringTransformHiraganaKatakana.value = value; - late final ffi.Pointer - _kCFDateFormatterShortMonthSymbols = - _lookup('kCFDateFormatterShortMonthSymbols'); + late final ffi.Pointer _kCFStringTransformMandarinLatin = + _lookup('kCFStringTransformMandarinLatin'); - CFDateFormatterKey get kCFDateFormatterShortMonthSymbols => - _kCFDateFormatterShortMonthSymbols.value; + CFStringRef get kCFStringTransformMandarinLatin => + _kCFStringTransformMandarinLatin.value; - set kCFDateFormatterShortMonthSymbols(CFDateFormatterKey value) => - _kCFDateFormatterShortMonthSymbols.value = value; + set kCFStringTransformMandarinLatin(CFStringRef value) => + _kCFStringTransformMandarinLatin.value = value; - late final ffi.Pointer _kCFDateFormatterWeekdaySymbols = - _lookup('kCFDateFormatterWeekdaySymbols'); + late final ffi.Pointer _kCFStringTransformLatinHangul = + _lookup('kCFStringTransformLatinHangul'); - CFDateFormatterKey get kCFDateFormatterWeekdaySymbols => - _kCFDateFormatterWeekdaySymbols.value; + CFStringRef get kCFStringTransformLatinHangul => + _kCFStringTransformLatinHangul.value; - set kCFDateFormatterWeekdaySymbols(CFDateFormatterKey value) => - _kCFDateFormatterWeekdaySymbols.value = value; + set kCFStringTransformLatinHangul(CFStringRef value) => + _kCFStringTransformLatinHangul.value = value; - late final ffi.Pointer - _kCFDateFormatterShortWeekdaySymbols = - _lookup('kCFDateFormatterShortWeekdaySymbols'); + late final ffi.Pointer _kCFStringTransformLatinArabic = + _lookup('kCFStringTransformLatinArabic'); - CFDateFormatterKey get kCFDateFormatterShortWeekdaySymbols => - _kCFDateFormatterShortWeekdaySymbols.value; + CFStringRef get kCFStringTransformLatinArabic => + _kCFStringTransformLatinArabic.value; - set kCFDateFormatterShortWeekdaySymbols(CFDateFormatterKey value) => - _kCFDateFormatterShortWeekdaySymbols.value = value; + set kCFStringTransformLatinArabic(CFStringRef value) => + _kCFStringTransformLatinArabic.value = value; - late final ffi.Pointer _kCFDateFormatterAMSymbol = - _lookup('kCFDateFormatterAMSymbol'); + late final ffi.Pointer _kCFStringTransformLatinHebrew = + _lookup('kCFStringTransformLatinHebrew'); - CFDateFormatterKey get kCFDateFormatterAMSymbol => - _kCFDateFormatterAMSymbol.value; + CFStringRef get kCFStringTransformLatinHebrew => + _kCFStringTransformLatinHebrew.value; - set kCFDateFormatterAMSymbol(CFDateFormatterKey value) => - _kCFDateFormatterAMSymbol.value = value; + set kCFStringTransformLatinHebrew(CFStringRef value) => + _kCFStringTransformLatinHebrew.value = value; - late final ffi.Pointer _kCFDateFormatterPMSymbol = - _lookup('kCFDateFormatterPMSymbol'); + late final ffi.Pointer _kCFStringTransformLatinThai = + _lookup('kCFStringTransformLatinThai'); - CFDateFormatterKey get kCFDateFormatterPMSymbol => - _kCFDateFormatterPMSymbol.value; + CFStringRef get kCFStringTransformLatinThai => + _kCFStringTransformLatinThai.value; - set kCFDateFormatterPMSymbol(CFDateFormatterKey value) => - _kCFDateFormatterPMSymbol.value = value; + set kCFStringTransformLatinThai(CFStringRef value) => + _kCFStringTransformLatinThai.value = value; - late final ffi.Pointer _kCFDateFormatterLongEraSymbols = - _lookup('kCFDateFormatterLongEraSymbols'); + late final ffi.Pointer _kCFStringTransformLatinCyrillic = + _lookup('kCFStringTransformLatinCyrillic'); - CFDateFormatterKey get kCFDateFormatterLongEraSymbols => - _kCFDateFormatterLongEraSymbols.value; + CFStringRef get kCFStringTransformLatinCyrillic => + _kCFStringTransformLatinCyrillic.value; - set kCFDateFormatterLongEraSymbols(CFDateFormatterKey value) => - _kCFDateFormatterLongEraSymbols.value = value; + set kCFStringTransformLatinCyrillic(CFStringRef value) => + _kCFStringTransformLatinCyrillic.value = value; - late final ffi.Pointer - _kCFDateFormatterVeryShortMonthSymbols = - _lookup('kCFDateFormatterVeryShortMonthSymbols'); + late final ffi.Pointer _kCFStringTransformLatinGreek = + _lookup('kCFStringTransformLatinGreek'); - CFDateFormatterKey get kCFDateFormatterVeryShortMonthSymbols => - _kCFDateFormatterVeryShortMonthSymbols.value; + CFStringRef get kCFStringTransformLatinGreek => + _kCFStringTransformLatinGreek.value; - set kCFDateFormatterVeryShortMonthSymbols(CFDateFormatterKey value) => - _kCFDateFormatterVeryShortMonthSymbols.value = value; + set kCFStringTransformLatinGreek(CFStringRef value) => + _kCFStringTransformLatinGreek.value = value; - late final ffi.Pointer - _kCFDateFormatterStandaloneMonthSymbols = - _lookup('kCFDateFormatterStandaloneMonthSymbols'); + late final ffi.Pointer _kCFStringTransformToXMLHex = + _lookup('kCFStringTransformToXMLHex'); - CFDateFormatterKey get kCFDateFormatterStandaloneMonthSymbols => - _kCFDateFormatterStandaloneMonthSymbols.value; + CFStringRef get kCFStringTransformToXMLHex => + _kCFStringTransformToXMLHex.value; - set kCFDateFormatterStandaloneMonthSymbols(CFDateFormatterKey value) => - _kCFDateFormatterStandaloneMonthSymbols.value = value; + set kCFStringTransformToXMLHex(CFStringRef value) => + _kCFStringTransformToXMLHex.value = value; - late final ffi.Pointer - _kCFDateFormatterShortStandaloneMonthSymbols = - _lookup( - 'kCFDateFormatterShortStandaloneMonthSymbols'); + late final ffi.Pointer _kCFStringTransformToUnicodeName = + _lookup('kCFStringTransformToUnicodeName'); - CFDateFormatterKey get kCFDateFormatterShortStandaloneMonthSymbols => - _kCFDateFormatterShortStandaloneMonthSymbols.value; + CFStringRef get kCFStringTransformToUnicodeName => + _kCFStringTransformToUnicodeName.value; - set kCFDateFormatterShortStandaloneMonthSymbols(CFDateFormatterKey value) => - _kCFDateFormatterShortStandaloneMonthSymbols.value = value; + set kCFStringTransformToUnicodeName(CFStringRef value) => + _kCFStringTransformToUnicodeName.value = value; - late final ffi.Pointer - _kCFDateFormatterVeryShortStandaloneMonthSymbols = - _lookup( - 'kCFDateFormatterVeryShortStandaloneMonthSymbols'); + late final ffi.Pointer _kCFStringTransformStripDiacritics = + _lookup('kCFStringTransformStripDiacritics'); - CFDateFormatterKey get kCFDateFormatterVeryShortStandaloneMonthSymbols => - _kCFDateFormatterVeryShortStandaloneMonthSymbols.value; + CFStringRef get kCFStringTransformStripDiacritics => + _kCFStringTransformStripDiacritics.value; - set kCFDateFormatterVeryShortStandaloneMonthSymbols( - CFDateFormatterKey value) => - _kCFDateFormatterVeryShortStandaloneMonthSymbols.value = value; + set kCFStringTransformStripDiacritics(CFStringRef value) => + _kCFStringTransformStripDiacritics.value = value; - late final ffi.Pointer - _kCFDateFormatterVeryShortWeekdaySymbols = - _lookup('kCFDateFormatterVeryShortWeekdaySymbols'); + int CFStringIsEncodingAvailable( + int encoding, + ) { + return _CFStringIsEncodingAvailable( + encoding, + ); + } - CFDateFormatterKey get kCFDateFormatterVeryShortWeekdaySymbols => - _kCFDateFormatterVeryShortWeekdaySymbols.value; + late final _CFStringIsEncodingAvailablePtr = + _lookup>( + 'CFStringIsEncodingAvailable'); + late final _CFStringIsEncodingAvailable = + _CFStringIsEncodingAvailablePtr.asFunction(); - set kCFDateFormatterVeryShortWeekdaySymbols(CFDateFormatterKey value) => - _kCFDateFormatterVeryShortWeekdaySymbols.value = value; + ffi.Pointer CFStringGetListOfAvailableEncodings() { + return _CFStringGetListOfAvailableEncodings(); + } - late final ffi.Pointer - _kCFDateFormatterStandaloneWeekdaySymbols = - _lookup('kCFDateFormatterStandaloneWeekdaySymbols'); + late final _CFStringGetListOfAvailableEncodingsPtr = + _lookup Function()>>( + 'CFStringGetListOfAvailableEncodings'); + late final _CFStringGetListOfAvailableEncodings = + _CFStringGetListOfAvailableEncodingsPtr.asFunction< + ffi.Pointer Function()>(); - CFDateFormatterKey get kCFDateFormatterStandaloneWeekdaySymbols => - _kCFDateFormatterStandaloneWeekdaySymbols.value; + CFStringRef CFStringGetNameOfEncoding( + int encoding, + ) { + return _CFStringGetNameOfEncoding( + encoding, + ); + } - set kCFDateFormatterStandaloneWeekdaySymbols(CFDateFormatterKey value) => - _kCFDateFormatterStandaloneWeekdaySymbols.value = value; + late final _CFStringGetNameOfEncodingPtr = + _lookup>( + 'CFStringGetNameOfEncoding'); + late final _CFStringGetNameOfEncoding = + _CFStringGetNameOfEncodingPtr.asFunction(); - late final ffi.Pointer - _kCFDateFormatterShortStandaloneWeekdaySymbols = - _lookup( - 'kCFDateFormatterShortStandaloneWeekdaySymbols'); + int CFStringConvertEncodingToNSStringEncoding( + int encoding, + ) { + return _CFStringConvertEncodingToNSStringEncoding( + encoding, + ); + } - CFDateFormatterKey get kCFDateFormatterShortStandaloneWeekdaySymbols => - _kCFDateFormatterShortStandaloneWeekdaySymbols.value; + late final _CFStringConvertEncodingToNSStringEncodingPtr = + _lookup>( + 'CFStringConvertEncodingToNSStringEncoding'); + late final _CFStringConvertEncodingToNSStringEncoding = + _CFStringConvertEncodingToNSStringEncodingPtr.asFunction< + int Function(int)>(); - set kCFDateFormatterShortStandaloneWeekdaySymbols(CFDateFormatterKey value) => - _kCFDateFormatterShortStandaloneWeekdaySymbols.value = value; + int CFStringConvertNSStringEncodingToEncoding( + int encoding, + ) { + return _CFStringConvertNSStringEncodingToEncoding( + encoding, + ); + } - late final ffi.Pointer - _kCFDateFormatterVeryShortStandaloneWeekdaySymbols = - _lookup( - 'kCFDateFormatterVeryShortStandaloneWeekdaySymbols'); + late final _CFStringConvertNSStringEncodingToEncodingPtr = + _lookup>( + 'CFStringConvertNSStringEncodingToEncoding'); + late final _CFStringConvertNSStringEncodingToEncoding = + _CFStringConvertNSStringEncodingToEncodingPtr.asFunction< + int Function(int)>(); - CFDateFormatterKey get kCFDateFormatterVeryShortStandaloneWeekdaySymbols => - _kCFDateFormatterVeryShortStandaloneWeekdaySymbols.value; + int CFStringConvertEncodingToWindowsCodepage( + int encoding, + ) { + return _CFStringConvertEncodingToWindowsCodepage( + encoding, + ); + } - set kCFDateFormatterVeryShortStandaloneWeekdaySymbols( - CFDateFormatterKey value) => - _kCFDateFormatterVeryShortStandaloneWeekdaySymbols.value = value; + late final _CFStringConvertEncodingToWindowsCodepagePtr = + _lookup>( + 'CFStringConvertEncodingToWindowsCodepage'); + late final _CFStringConvertEncodingToWindowsCodepage = + _CFStringConvertEncodingToWindowsCodepagePtr.asFunction< + int Function(int)>(); - late final ffi.Pointer _kCFDateFormatterQuarterSymbols = - _lookup('kCFDateFormatterQuarterSymbols'); + int CFStringConvertWindowsCodepageToEncoding( + int codepage, + ) { + return _CFStringConvertWindowsCodepageToEncoding( + codepage, + ); + } - CFDateFormatterKey get kCFDateFormatterQuarterSymbols => - _kCFDateFormatterQuarterSymbols.value; + late final _CFStringConvertWindowsCodepageToEncodingPtr = + _lookup>( + 'CFStringConvertWindowsCodepageToEncoding'); + late final _CFStringConvertWindowsCodepageToEncoding = + _CFStringConvertWindowsCodepageToEncodingPtr.asFunction< + int Function(int)>(); - set kCFDateFormatterQuarterSymbols(CFDateFormatterKey value) => - _kCFDateFormatterQuarterSymbols.value = value; + int CFStringConvertIANACharSetNameToEncoding( + CFStringRef theString, + ) { + return _CFStringConvertIANACharSetNameToEncoding( + theString, + ); + } - late final ffi.Pointer - _kCFDateFormatterShortQuarterSymbols = - _lookup('kCFDateFormatterShortQuarterSymbols'); + late final _CFStringConvertIANACharSetNameToEncodingPtr = + _lookup>( + 'CFStringConvertIANACharSetNameToEncoding'); + late final _CFStringConvertIANACharSetNameToEncoding = + _CFStringConvertIANACharSetNameToEncodingPtr.asFunction< + int Function(CFStringRef)>(); - CFDateFormatterKey get kCFDateFormatterShortQuarterSymbols => - _kCFDateFormatterShortQuarterSymbols.value; + CFStringRef CFStringConvertEncodingToIANACharSetName( + int encoding, + ) { + return _CFStringConvertEncodingToIANACharSetName( + encoding, + ); + } - set kCFDateFormatterShortQuarterSymbols(CFDateFormatterKey value) => - _kCFDateFormatterShortQuarterSymbols.value = value; + late final _CFStringConvertEncodingToIANACharSetNamePtr = + _lookup>( + 'CFStringConvertEncodingToIANACharSetName'); + late final _CFStringConvertEncodingToIANACharSetName = + _CFStringConvertEncodingToIANACharSetNamePtr.asFunction< + CFStringRef Function(int)>(); - late final ffi.Pointer - _kCFDateFormatterStandaloneQuarterSymbols = - _lookup('kCFDateFormatterStandaloneQuarterSymbols'); + int CFStringGetMostCompatibleMacStringEncoding( + int encoding, + ) { + return _CFStringGetMostCompatibleMacStringEncoding( + encoding, + ); + } - CFDateFormatterKey get kCFDateFormatterStandaloneQuarterSymbols => - _kCFDateFormatterStandaloneQuarterSymbols.value; + late final _CFStringGetMostCompatibleMacStringEncodingPtr = + _lookup>( + 'CFStringGetMostCompatibleMacStringEncoding'); + late final _CFStringGetMostCompatibleMacStringEncoding = + _CFStringGetMostCompatibleMacStringEncodingPtr.asFunction< + int Function(int)>(); - set kCFDateFormatterStandaloneQuarterSymbols(CFDateFormatterKey value) => - _kCFDateFormatterStandaloneQuarterSymbols.value = value; + void CFShow( + CFTypeRef obj, + ) { + return _CFShow( + obj, + ); + } - late final ffi.Pointer - _kCFDateFormatterShortStandaloneQuarterSymbols = - _lookup( - 'kCFDateFormatterShortStandaloneQuarterSymbols'); + late final _CFShowPtr = + _lookup>('CFShow'); + late final _CFShow = _CFShowPtr.asFunction(); - CFDateFormatterKey get kCFDateFormatterShortStandaloneQuarterSymbols => - _kCFDateFormatterShortStandaloneQuarterSymbols.value; + void CFShowStr( + CFStringRef str, + ) { + return _CFShowStr( + str, + ); + } - set kCFDateFormatterShortStandaloneQuarterSymbols(CFDateFormatterKey value) => - _kCFDateFormatterShortStandaloneQuarterSymbols.value = value; + late final _CFShowStrPtr = + _lookup>('CFShowStr'); + late final _CFShowStr = + _CFShowStrPtr.asFunction(); - late final ffi.Pointer - _kCFDateFormatterGregorianStartDate = - _lookup('kCFDateFormatterGregorianStartDate'); + CFStringRef __CFStringMakeConstantString( + ffi.Pointer cStr, + ) { + return ___CFStringMakeConstantString( + cStr, + ); + } - CFDateFormatterKey get kCFDateFormatterGregorianStartDate => - _kCFDateFormatterGregorianStartDate.value; + late final ___CFStringMakeConstantStringPtr = + _lookup)>>( + '__CFStringMakeConstantString'); + late final ___CFStringMakeConstantString = ___CFStringMakeConstantStringPtr + .asFunction)>(); - set kCFDateFormatterGregorianStartDate(CFDateFormatterKey value) => - _kCFDateFormatterGregorianStartDate.value = value; + int CFTimeZoneGetTypeID() { + return _CFTimeZoneGetTypeID(); + } - late final ffi.Pointer - _kCFDateFormatterDoesRelativeDateFormattingKey = - _lookup( - 'kCFDateFormatterDoesRelativeDateFormattingKey'); + late final _CFTimeZoneGetTypeIDPtr = + _lookup>('CFTimeZoneGetTypeID'); + late final _CFTimeZoneGetTypeID = + _CFTimeZoneGetTypeIDPtr.asFunction(); - CFDateFormatterKey get kCFDateFormatterDoesRelativeDateFormattingKey => - _kCFDateFormatterDoesRelativeDateFormattingKey.value; + CFTimeZoneRef CFTimeZoneCopySystem() { + return _CFTimeZoneCopySystem(); + } - set kCFDateFormatterDoesRelativeDateFormattingKey(CFDateFormatterKey value) => - _kCFDateFormatterDoesRelativeDateFormattingKey.value = value; + late final _CFTimeZoneCopySystemPtr = + _lookup>( + 'CFTimeZoneCopySystem'); + late final _CFTimeZoneCopySystem = + _CFTimeZoneCopySystemPtr.asFunction(); - int CFErrorGetTypeID() { - return _CFErrorGetTypeID(); + void CFTimeZoneResetSystem() { + return _CFTimeZoneResetSystem(); } - late final _CFErrorGetTypeIDPtr = - _lookup>('CFErrorGetTypeID'); - late final _CFErrorGetTypeID = - _CFErrorGetTypeIDPtr.asFunction(); - - late final ffi.Pointer _kCFErrorDomainPOSIX = - _lookup('kCFErrorDomainPOSIX'); + late final _CFTimeZoneResetSystemPtr = + _lookup>('CFTimeZoneResetSystem'); + late final _CFTimeZoneResetSystem = + _CFTimeZoneResetSystemPtr.asFunction(); - CFErrorDomain get kCFErrorDomainPOSIX => _kCFErrorDomainPOSIX.value; + CFTimeZoneRef CFTimeZoneCopyDefault() { + return _CFTimeZoneCopyDefault(); + } - set kCFErrorDomainPOSIX(CFErrorDomain value) => - _kCFErrorDomainPOSIX.value = value; + late final _CFTimeZoneCopyDefaultPtr = + _lookup>( + 'CFTimeZoneCopyDefault'); + late final _CFTimeZoneCopyDefault = + _CFTimeZoneCopyDefaultPtr.asFunction(); - late final ffi.Pointer _kCFErrorDomainOSStatus = - _lookup('kCFErrorDomainOSStatus'); + void CFTimeZoneSetDefault( + CFTimeZoneRef tz, + ) { + return _CFTimeZoneSetDefault( + tz, + ); + } - CFErrorDomain get kCFErrorDomainOSStatus => _kCFErrorDomainOSStatus.value; + late final _CFTimeZoneSetDefaultPtr = + _lookup>( + 'CFTimeZoneSetDefault'); + late final _CFTimeZoneSetDefault = + _CFTimeZoneSetDefaultPtr.asFunction(); - set kCFErrorDomainOSStatus(CFErrorDomain value) => - _kCFErrorDomainOSStatus.value = value; + CFArrayRef CFTimeZoneCopyKnownNames() { + return _CFTimeZoneCopyKnownNames(); + } - late final ffi.Pointer _kCFErrorDomainMach = - _lookup('kCFErrorDomainMach'); + late final _CFTimeZoneCopyKnownNamesPtr = + _lookup>( + 'CFTimeZoneCopyKnownNames'); + late final _CFTimeZoneCopyKnownNames = + _CFTimeZoneCopyKnownNamesPtr.asFunction(); - CFErrorDomain get kCFErrorDomainMach => _kCFErrorDomainMach.value; + CFDictionaryRef CFTimeZoneCopyAbbreviationDictionary() { + return _CFTimeZoneCopyAbbreviationDictionary(); + } - set kCFErrorDomainMach(CFErrorDomain value) => - _kCFErrorDomainMach.value = value; + late final _CFTimeZoneCopyAbbreviationDictionaryPtr = + _lookup>( + 'CFTimeZoneCopyAbbreviationDictionary'); + late final _CFTimeZoneCopyAbbreviationDictionary = + _CFTimeZoneCopyAbbreviationDictionaryPtr.asFunction< + CFDictionaryRef Function()>(); - late final ffi.Pointer _kCFErrorDomainCocoa = - _lookup('kCFErrorDomainCocoa'); + void CFTimeZoneSetAbbreviationDictionary( + CFDictionaryRef dict, + ) { + return _CFTimeZoneSetAbbreviationDictionary( + dict, + ); + } - CFErrorDomain get kCFErrorDomainCocoa => _kCFErrorDomainCocoa.value; + late final _CFTimeZoneSetAbbreviationDictionaryPtr = + _lookup>( + 'CFTimeZoneSetAbbreviationDictionary'); + late final _CFTimeZoneSetAbbreviationDictionary = + _CFTimeZoneSetAbbreviationDictionaryPtr.asFunction< + void Function(CFDictionaryRef)>(); - set kCFErrorDomainCocoa(CFErrorDomain value) => - _kCFErrorDomainCocoa.value = value; + CFTimeZoneRef CFTimeZoneCreate( + CFAllocatorRef allocator, + CFStringRef name, + CFDataRef data, + ) { + return _CFTimeZoneCreate( + allocator, + name, + data, + ); + } - 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; + late final _CFTimeZoneCreatePtr = _lookup< + ffi.NativeFunction< + CFTimeZoneRef Function( + CFAllocatorRef, CFStringRef, CFDataRef)>>('CFTimeZoneCreate'); + late final _CFTimeZoneCreate = _CFTimeZoneCreatePtr.asFunction< + CFTimeZoneRef Function(CFAllocatorRef, CFStringRef, CFDataRef)>(); - CFErrorRef CFErrorCreate( + CFTimeZoneRef CFTimeZoneCreateWithTimeIntervalFromGMT( CFAllocatorRef allocator, - CFErrorDomain domain, - int code, - CFDictionaryRef userInfo, + double ti, ) { - return _CFErrorCreate( + return _CFTimeZoneCreateWithTimeIntervalFromGMT( allocator, - domain, - code, - userInfo, + ti, ); } - late final _CFErrorCreatePtr = _lookup< + late final _CFTimeZoneCreateWithTimeIntervalFromGMTPtr = _lookup< ffi.NativeFunction< - CFErrorRef Function(CFAllocatorRef, CFErrorDomain, CFIndex, - CFDictionaryRef)>>('CFErrorCreate'); - late final _CFErrorCreate = _CFErrorCreatePtr.asFunction< - CFErrorRef Function( - CFAllocatorRef, CFErrorDomain, int, CFDictionaryRef)>(); + CFTimeZoneRef Function(CFAllocatorRef, + CFTimeInterval)>>('CFTimeZoneCreateWithTimeIntervalFromGMT'); + late final _CFTimeZoneCreateWithTimeIntervalFromGMT = + _CFTimeZoneCreateWithTimeIntervalFromGMTPtr.asFunction< + CFTimeZoneRef Function(CFAllocatorRef, double)>(); - CFErrorRef CFErrorCreateWithUserInfoKeysAndValues( + CFTimeZoneRef CFTimeZoneCreateWithName( CFAllocatorRef allocator, - CFErrorDomain domain, - int code, - ffi.Pointer> userInfoKeys, - ffi.Pointer> userInfoValues, - int numUserInfoValues, + CFStringRef name, + int tryAbbrev, ) { - return _CFErrorCreateWithUserInfoKeysAndValues( + return _CFTimeZoneCreateWithName( allocator, - domain, - code, - userInfoKeys, - userInfoValues, - numUserInfoValues, + name, + tryAbbrev, ); } - late final _CFErrorCreateWithUserInfoKeysAndValuesPtr = _lookup< + late final _CFTimeZoneCreateWithNamePtr = _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)>(); + CFTimeZoneRef Function(CFAllocatorRef, CFStringRef, + Boolean)>>('CFTimeZoneCreateWithName'); + late final _CFTimeZoneCreateWithName = _CFTimeZoneCreateWithNamePtr + .asFunction(); - CFErrorDomain CFErrorGetDomain( - CFErrorRef err, + CFStringRef CFTimeZoneGetName( + CFTimeZoneRef tz, ) { - return _CFErrorGetDomain( - err, + return _CFTimeZoneGetName( + tz, ); } - late final _CFErrorGetDomainPtr = - _lookup>( - 'CFErrorGetDomain'); - late final _CFErrorGetDomain = - _CFErrorGetDomainPtr.asFunction(); + late final _CFTimeZoneGetNamePtr = + _lookup>( + 'CFTimeZoneGetName'); + late final _CFTimeZoneGetName = + _CFTimeZoneGetNamePtr.asFunction(); - int CFErrorGetCode( - CFErrorRef err, + CFDataRef CFTimeZoneGetData( + CFTimeZoneRef tz, ) { - return _CFErrorGetCode( - err, + return _CFTimeZoneGetData( + tz, ); } - late final _CFErrorGetCodePtr = - _lookup>( - 'CFErrorGetCode'); - late final _CFErrorGetCode = - _CFErrorGetCodePtr.asFunction(); + late final _CFTimeZoneGetDataPtr = + _lookup>( + 'CFTimeZoneGetData'); + late final _CFTimeZoneGetData = + _CFTimeZoneGetDataPtr.asFunction(); - CFDictionaryRef CFErrorCopyUserInfo( - CFErrorRef err, + double CFTimeZoneGetSecondsFromGMT( + CFTimeZoneRef tz, + double at, ) { - return _CFErrorCopyUserInfo( - err, + return _CFTimeZoneGetSecondsFromGMT( + tz, + at, ); } - late final _CFErrorCopyUserInfoPtr = - _lookup>( - 'CFErrorCopyUserInfo'); - late final _CFErrorCopyUserInfo = _CFErrorCopyUserInfoPtr.asFunction< - CFDictionaryRef Function(CFErrorRef)>(); + late final _CFTimeZoneGetSecondsFromGMTPtr = _lookup< + ffi.NativeFunction< + CFTimeInterval Function( + CFTimeZoneRef, CFAbsoluteTime)>>('CFTimeZoneGetSecondsFromGMT'); + late final _CFTimeZoneGetSecondsFromGMT = _CFTimeZoneGetSecondsFromGMTPtr + .asFunction(); - CFStringRef CFErrorCopyDescription( - CFErrorRef err, + CFStringRef CFTimeZoneCopyAbbreviation( + CFTimeZoneRef tz, + double at, ) { - return _CFErrorCopyDescription( - err, + return _CFTimeZoneCopyAbbreviation( + tz, + at, ); } - late final _CFErrorCopyDescriptionPtr = - _lookup>( - 'CFErrorCopyDescription'); - late final _CFErrorCopyDescription = - _CFErrorCopyDescriptionPtr.asFunction(); + late final _CFTimeZoneCopyAbbreviationPtr = _lookup< + ffi + .NativeFunction>( + 'CFTimeZoneCopyAbbreviation'); + late final _CFTimeZoneCopyAbbreviation = _CFTimeZoneCopyAbbreviationPtr + .asFunction(); - CFStringRef CFErrorCopyFailureReason( - CFErrorRef err, + int CFTimeZoneIsDaylightSavingTime( + CFTimeZoneRef tz, + double at, ) { - return _CFErrorCopyFailureReason( - err, + return _CFTimeZoneIsDaylightSavingTime( + tz, + at, ); } - late final _CFErrorCopyFailureReasonPtr = - _lookup>( - 'CFErrorCopyFailureReason'); - late final _CFErrorCopyFailureReason = _CFErrorCopyFailureReasonPtr - .asFunction(); + late final _CFTimeZoneIsDaylightSavingTimePtr = _lookup< + ffi.NativeFunction>( + 'CFTimeZoneIsDaylightSavingTime'); + late final _CFTimeZoneIsDaylightSavingTime = + _CFTimeZoneIsDaylightSavingTimePtr.asFunction< + int Function(CFTimeZoneRef, double)>(); - CFStringRef CFErrorCopyRecoverySuggestion( - CFErrorRef err, + double CFTimeZoneGetDaylightSavingTimeOffset( + CFTimeZoneRef tz, + double at, ) { - return _CFErrorCopyRecoverySuggestion( - err, + return _CFTimeZoneGetDaylightSavingTimeOffset( + tz, + at, ); } - 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; + late final _CFTimeZoneGetDaylightSavingTimeOffsetPtr = _lookup< + ffi.NativeFunction< + CFTimeInterval Function(CFTimeZoneRef, + CFAbsoluteTime)>>('CFTimeZoneGetDaylightSavingTimeOffset'); + late final _CFTimeZoneGetDaylightSavingTimeOffset = + _CFTimeZoneGetDaylightSavingTimeOffsetPtr.asFunction< + double Function(CFTimeZoneRef, double)>(); - int CFBooleanGetTypeID() { - return _CFBooleanGetTypeID(); + double CFTimeZoneGetNextDaylightSavingTimeTransition( + CFTimeZoneRef tz, + double at, + ) { + return _CFTimeZoneGetNextDaylightSavingTimeTransition( + tz, + at, + ); } - late final _CFBooleanGetTypeIDPtr = - _lookup>('CFBooleanGetTypeID'); - late final _CFBooleanGetTypeID = - _CFBooleanGetTypeIDPtr.asFunction(); + late final _CFTimeZoneGetNextDaylightSavingTimeTransitionPtr = _lookup< + ffi.NativeFunction< + CFAbsoluteTime Function(CFTimeZoneRef, CFAbsoluteTime)>>( + 'CFTimeZoneGetNextDaylightSavingTimeTransition'); + late final _CFTimeZoneGetNextDaylightSavingTimeTransition = + _CFTimeZoneGetNextDaylightSavingTimeTransitionPtr.asFunction< + double Function(CFTimeZoneRef, double)>(); - int CFBooleanGetValue( - CFBooleanRef boolean, + CFStringRef CFTimeZoneCopyLocalizedName( + CFTimeZoneRef tz, + int style, + CFLocaleRef locale, ) { - return _CFBooleanGetValue( - boolean, + return _CFTimeZoneCopyLocalizedName( + tz, + style, + locale, ); } - 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'); + late final _CFTimeZoneCopyLocalizedNamePtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFTimeZoneRef, ffi.Int32, + CFLocaleRef)>>('CFTimeZoneCopyLocalizedName'); + late final _CFTimeZoneCopyLocalizedName = _CFTimeZoneCopyLocalizedNamePtr + .asFunction(); - CFNumberRef get kCFNumberNegativeInfinity => _kCFNumberNegativeInfinity.value; + late final ffi.Pointer + _kCFTimeZoneSystemTimeZoneDidChangeNotification = + _lookup( + 'kCFTimeZoneSystemTimeZoneDidChangeNotification'); - set kCFNumberNegativeInfinity(CFNumberRef value) => - _kCFNumberNegativeInfinity.value = value; + CFNotificationName get kCFTimeZoneSystemTimeZoneDidChangeNotification => + _kCFTimeZoneSystemTimeZoneDidChangeNotification.value; - late final ffi.Pointer _kCFNumberNaN = - _lookup('kCFNumberNaN'); + set kCFTimeZoneSystemTimeZoneDidChangeNotification( + CFNotificationName value) => + _kCFTimeZoneSystemTimeZoneDidChangeNotification.value = value; - CFNumberRef get kCFNumberNaN => _kCFNumberNaN.value; + int CFCalendarGetTypeID() { + return _CFCalendarGetTypeID(); + } - set kCFNumberNaN(CFNumberRef value) => _kCFNumberNaN.value = value; + late final _CFCalendarGetTypeIDPtr = + _lookup>('CFCalendarGetTypeID'); + late final _CFCalendarGetTypeID = + _CFCalendarGetTypeIDPtr.asFunction(); - int CFNumberGetTypeID() { - return _CFNumberGetTypeID(); + CFCalendarRef CFCalendarCopyCurrent() { + return _CFCalendarCopyCurrent(); } - late final _CFNumberGetTypeIDPtr = - _lookup>('CFNumberGetTypeID'); - late final _CFNumberGetTypeID = - _CFNumberGetTypeIDPtr.asFunction(); + late final _CFCalendarCopyCurrentPtr = + _lookup>( + 'CFCalendarCopyCurrent'); + late final _CFCalendarCopyCurrent = + _CFCalendarCopyCurrentPtr.asFunction(); - CFNumberRef CFNumberCreate( + CFCalendarRef CFCalendarCreateWithIdentifier( CFAllocatorRef allocator, - int theType, - ffi.Pointer valuePtr, + CFCalendarIdentifier identifier, ) { - return _CFNumberCreate( + return _CFCalendarCreateWithIdentifier( allocator, - theType, - valuePtr, + identifier, ); } - late final _CFNumberCreatePtr = _lookup< + late final _CFCalendarCreateWithIdentifierPtr = _lookup< ffi.NativeFunction< - CFNumberRef Function(CFAllocatorRef, ffi.Int32, - ffi.Pointer)>>('CFNumberCreate'); - late final _CFNumberCreate = _CFNumberCreatePtr.asFunction< - CFNumberRef Function(CFAllocatorRef, int, ffi.Pointer)>(); + CFCalendarRef Function(CFAllocatorRef, + CFCalendarIdentifier)>>('CFCalendarCreateWithIdentifier'); + late final _CFCalendarCreateWithIdentifier = + _CFCalendarCreateWithIdentifierPtr.asFunction< + CFCalendarRef Function(CFAllocatorRef, CFCalendarIdentifier)>(); - int CFNumberGetType( - CFNumberRef number, + CFCalendarIdentifier CFCalendarGetIdentifier( + CFCalendarRef calendar, ) { - return _CFNumberGetType( - number, + return _CFCalendarGetIdentifier( + calendar, ); } - late final _CFNumberGetTypePtr = - _lookup>( - 'CFNumberGetType'); - late final _CFNumberGetType = - _CFNumberGetTypePtr.asFunction(); + late final _CFCalendarGetIdentifierPtr = + _lookup>( + 'CFCalendarGetIdentifier'); + late final _CFCalendarGetIdentifier = _CFCalendarGetIdentifierPtr.asFunction< + CFCalendarIdentifier Function(CFCalendarRef)>(); - int CFNumberGetByteSize( - CFNumberRef number, + CFLocaleRef CFCalendarCopyLocale( + CFCalendarRef calendar, ) { - return _CFNumberGetByteSize( - number, + return _CFCalendarCopyLocale( + calendar, ); } - late final _CFNumberGetByteSizePtr = - _lookup>( - 'CFNumberGetByteSize'); - late final _CFNumberGetByteSize = - _CFNumberGetByteSizePtr.asFunction(); + late final _CFCalendarCopyLocalePtr = + _lookup>( + 'CFCalendarCopyLocale'); + late final _CFCalendarCopyLocale = _CFCalendarCopyLocalePtr.asFunction< + CFLocaleRef Function(CFCalendarRef)>(); - int CFNumberIsFloatType( - CFNumberRef number, + void CFCalendarSetLocale( + CFCalendarRef calendar, + CFLocaleRef locale, ) { - return _CFNumberIsFloatType( - number, + return _CFCalendarSetLocale( + calendar, + locale, ); } - late final _CFNumberIsFloatTypePtr = - _lookup>( - 'CFNumberIsFloatType'); - late final _CFNumberIsFloatType = - _CFNumberIsFloatTypePtr.asFunction(); + late final _CFCalendarSetLocalePtr = _lookup< + ffi.NativeFunction>( + 'CFCalendarSetLocale'); + late final _CFCalendarSetLocale = _CFCalendarSetLocalePtr.asFunction< + void Function(CFCalendarRef, CFLocaleRef)>(); - int CFNumberGetValue( - CFNumberRef number, - int theType, - ffi.Pointer valuePtr, + CFTimeZoneRef CFCalendarCopyTimeZone( + CFCalendarRef calendar, ) { - return _CFNumberGetValue( - number, - theType, - valuePtr, + return _CFCalendarCopyTimeZone( + calendar, ); } - 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 _CFCalendarCopyTimeZonePtr = + _lookup>( + 'CFCalendarCopyTimeZone'); + late final _CFCalendarCopyTimeZone = _CFCalendarCopyTimeZonePtr.asFunction< + CFTimeZoneRef Function(CFCalendarRef)>(); - int CFNumberCompare( - CFNumberRef number, - CFNumberRef otherNumber, - ffi.Pointer context, + void CFCalendarSetTimeZone( + CFCalendarRef calendar, + CFTimeZoneRef tz, ) { - return _CFNumberCompare( - number, - otherNumber, - context, + return _CFCalendarSetTimeZone( + calendar, + tz, ); } - 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(); + late final _CFCalendarSetTimeZonePtr = _lookup< + ffi.NativeFunction>( + 'CFCalendarSetTimeZone'); + late final _CFCalendarSetTimeZone = _CFCalendarSetTimeZonePtr.asFunction< + void Function(CFCalendarRef, CFTimeZoneRef)>(); - CFNumberFormatterRef CFNumberFormatterCreate( - CFAllocatorRef allocator, - CFLocaleRef locale, - int style, + int CFCalendarGetFirstWeekday( + CFCalendarRef calendar, ) { - return _CFNumberFormatterCreate( - allocator, - locale, - style, + return _CFCalendarGetFirstWeekday( + calendar, ); } - 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 _CFCalendarGetFirstWeekdayPtr = + _lookup>( + 'CFCalendarGetFirstWeekday'); + late final _CFCalendarGetFirstWeekday = + _CFCalendarGetFirstWeekdayPtr.asFunction(); - CFLocaleRef CFNumberFormatterGetLocale( - CFNumberFormatterRef formatter, + void CFCalendarSetFirstWeekday( + CFCalendarRef calendar, + int wkdy, ) { - return _CFNumberFormatterGetLocale( - formatter, + return _CFCalendarSetFirstWeekday( + calendar, + wkdy, ); } - late final _CFNumberFormatterGetLocalePtr = - _lookup>( - 'CFNumberFormatterGetLocale'); - late final _CFNumberFormatterGetLocale = _CFNumberFormatterGetLocalePtr - .asFunction(); + late final _CFCalendarSetFirstWeekdayPtr = + _lookup>( + 'CFCalendarSetFirstWeekday'); + late final _CFCalendarSetFirstWeekday = _CFCalendarSetFirstWeekdayPtr + .asFunction(); - int CFNumberFormatterGetStyle( - CFNumberFormatterRef formatter, + int CFCalendarGetMinimumDaysInFirstWeek( + CFCalendarRef calendar, ) { - return _CFNumberFormatterGetStyle( - formatter, + return _CFCalendarGetMinimumDaysInFirstWeek( + calendar, ); } - late final _CFNumberFormatterGetStylePtr = - _lookup>( - 'CFNumberFormatterGetStyle'); - late final _CFNumberFormatterGetStyle = _CFNumberFormatterGetStylePtr - .asFunction(); + late final _CFCalendarGetMinimumDaysInFirstWeekPtr = + _lookup>( + 'CFCalendarGetMinimumDaysInFirstWeek'); + late final _CFCalendarGetMinimumDaysInFirstWeek = + _CFCalendarGetMinimumDaysInFirstWeekPtr.asFunction< + int Function(CFCalendarRef)>(); - CFStringRef CFNumberFormatterGetFormat( - CFNumberFormatterRef formatter, + void CFCalendarSetMinimumDaysInFirstWeek( + CFCalendarRef calendar, + int mwd, ) { - return _CFNumberFormatterGetFormat( - formatter, + return _CFCalendarSetMinimumDaysInFirstWeek( + calendar, + mwd, ); } - late final _CFNumberFormatterGetFormatPtr = - _lookup>( - 'CFNumberFormatterGetFormat'); - late final _CFNumberFormatterGetFormat = _CFNumberFormatterGetFormatPtr - .asFunction(); + late final _CFCalendarSetMinimumDaysInFirstWeekPtr = + _lookup>( + 'CFCalendarSetMinimumDaysInFirstWeek'); + late final _CFCalendarSetMinimumDaysInFirstWeek = + _CFCalendarSetMinimumDaysInFirstWeekPtr.asFunction< + void Function(CFCalendarRef, int)>(); - void CFNumberFormatterSetFormat( - CFNumberFormatterRef formatter, - CFStringRef formatString, + CFRange CFCalendarGetMinimumRangeOfUnit( + CFCalendarRef calendar, + int unit, ) { - return _CFNumberFormatterSetFormat( - formatter, - formatString, + return _CFCalendarGetMinimumRangeOfUnit( + calendar, + unit, ); } - late final _CFNumberFormatterSetFormatPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFNumberFormatterRef, - CFStringRef)>>('CFNumberFormatterSetFormat'); - late final _CFNumberFormatterSetFormat = _CFNumberFormatterSetFormatPtr - .asFunction(); + late final _CFCalendarGetMinimumRangeOfUnitPtr = + _lookup>( + 'CFCalendarGetMinimumRangeOfUnit'); + late final _CFCalendarGetMinimumRangeOfUnit = + _CFCalendarGetMinimumRangeOfUnitPtr.asFunction< + CFRange Function(CFCalendarRef, int)>(); - CFStringRef CFNumberFormatterCreateStringWithNumber( - CFAllocatorRef allocator, - CFNumberFormatterRef formatter, - CFNumberRef number, + CFRange CFCalendarGetMaximumRangeOfUnit( + CFCalendarRef calendar, + int unit, ) { - return _CFNumberFormatterCreateStringWithNumber( - allocator, - formatter, - number, + return _CFCalendarGetMaximumRangeOfUnit( + calendar, + unit, ); } - late final _CFNumberFormatterCreateStringWithNumberPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, CFNumberFormatterRef, - CFNumberRef)>>('CFNumberFormatterCreateStringWithNumber'); - late final _CFNumberFormatterCreateStringWithNumber = - _CFNumberFormatterCreateStringWithNumberPtr.asFunction< - CFStringRef Function( - CFAllocatorRef, CFNumberFormatterRef, CFNumberRef)>(); + late final _CFCalendarGetMaximumRangeOfUnitPtr = + _lookup>( + 'CFCalendarGetMaximumRangeOfUnit'); + late final _CFCalendarGetMaximumRangeOfUnit = + _CFCalendarGetMaximumRangeOfUnitPtr.asFunction< + CFRange Function(CFCalendarRef, int)>(); - CFStringRef CFNumberFormatterCreateStringWithValue( - CFAllocatorRef allocator, - CFNumberFormatterRef formatter, - int numberType, - ffi.Pointer valuePtr, + CFRange CFCalendarGetRangeOfUnit( + CFCalendarRef calendar, + int smallerUnit, + int biggerUnit, + double at, ) { - return _CFNumberFormatterCreateStringWithValue( - allocator, - formatter, - numberType, - valuePtr, + return _CFCalendarGetRangeOfUnit( + calendar, + smallerUnit, + biggerUnit, + at, ); } - 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 _CFCalendarGetRangeOfUnitPtr = _lookup< + ffi.NativeFunction< + CFRange Function(CFCalendarRef, ffi.Int32, ffi.Int32, + CFAbsoluteTime)>>('CFCalendarGetRangeOfUnit'); + late final _CFCalendarGetRangeOfUnit = _CFCalendarGetRangeOfUnitPtr + .asFunction(); - CFNumberRef CFNumberFormatterCreateNumberFromString( - CFAllocatorRef allocator, - CFNumberFormatterRef formatter, - CFStringRef string, - ffi.Pointer rangep, - int options, + int CFCalendarGetOrdinalityOfUnit( + CFCalendarRef calendar, + int smallerUnit, + int biggerUnit, + double at, ) { - return _CFNumberFormatterCreateNumberFromString( - allocator, - formatter, - string, - rangep, - options, + return _CFCalendarGetOrdinalityOfUnit( + calendar, + smallerUnit, + biggerUnit, + at, ); } - late final _CFNumberFormatterCreateNumberFromStringPtr = _lookup< + late final _CFCalendarGetOrdinalityOfUnitPtr = _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)>(); + CFIndex Function(CFCalendarRef, ffi.Int32, ffi.Int32, + CFAbsoluteTime)>>('CFCalendarGetOrdinalityOfUnit'); + late final _CFCalendarGetOrdinalityOfUnit = _CFCalendarGetOrdinalityOfUnitPtr + .asFunction(); - int CFNumberFormatterGetValueFromString( - CFNumberFormatterRef formatter, - CFStringRef string, - ffi.Pointer rangep, - int numberType, - ffi.Pointer valuePtr, + int CFCalendarGetTimeRangeOfUnit( + CFCalendarRef calendar, + int unit, + double at, + ffi.Pointer startp, + ffi.Pointer tip, ) { - return _CFNumberFormatterGetValueFromString( - formatter, - string, - rangep, - numberType, - valuePtr, + return _CFCalendarGetTimeRangeOfUnit( + calendar, + unit, + at, + startp, + tip, ); } - late final _CFNumberFormatterGetValueFromStringPtr = _lookup< + late final _CFCalendarGetTimeRangeOfUnitPtr = _lookup< ffi.NativeFunction< Boolean Function( - CFNumberFormatterRef, - CFStringRef, - ffi.Pointer, + CFCalendarRef, ffi.Int32, - ffi.Pointer)>>('CFNumberFormatterGetValueFromString'); - late final _CFNumberFormatterGetValueFromString = - _CFNumberFormatterGetValueFromStringPtr.asFunction< - int Function(CFNumberFormatterRef, CFStringRef, ffi.Pointer, - int, ffi.Pointer)>(); + CFAbsoluteTime, + ffi.Pointer, + ffi.Pointer)>>('CFCalendarGetTimeRangeOfUnit'); + late final _CFCalendarGetTimeRangeOfUnit = + _CFCalendarGetTimeRangeOfUnitPtr.asFunction< + int Function(CFCalendarRef, int, double, ffi.Pointer, + ffi.Pointer)>(); - void CFNumberFormatterSetProperty( - CFNumberFormatterRef formatter, - CFNumberFormatterKey key, - CFTypeRef value, + int CFCalendarComposeAbsoluteTime( + CFCalendarRef calendar, + ffi.Pointer at, + ffi.Pointer componentDesc, ) { - return _CFNumberFormatterSetProperty( - formatter, - key, - value, + return _CFCalendarComposeAbsoluteTime( + calendar, + at, + componentDesc, ); } - late final _CFNumberFormatterSetPropertyPtr = _lookup< + late final _CFCalendarComposeAbsoluteTimePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFNumberFormatterRef, CFNumberFormatterKey, - CFTypeRef)>>('CFNumberFormatterSetProperty'); - late final _CFNumberFormatterSetProperty = - _CFNumberFormatterSetPropertyPtr.asFunction< - void Function( - CFNumberFormatterRef, CFNumberFormatterKey, CFTypeRef)>(); + Boolean Function(CFCalendarRef, ffi.Pointer, + ffi.Pointer)>>('CFCalendarComposeAbsoluteTime'); + late final _CFCalendarComposeAbsoluteTime = + _CFCalendarComposeAbsoluteTimePtr.asFunction< + int Function(CFCalendarRef, ffi.Pointer, + ffi.Pointer)>(); - CFTypeRef CFNumberFormatterCopyProperty( - CFNumberFormatterRef formatter, - CFNumberFormatterKey key, + int CFCalendarDecomposeAbsoluteTime( + CFCalendarRef calendar, + double at, + ffi.Pointer componentDesc, ) { - return _CFNumberFormatterCopyProperty( - formatter, - key, + return _CFCalendarDecomposeAbsoluteTime( + calendar, + at, + componentDesc, ); } - late final _CFNumberFormatterCopyPropertyPtr = _lookup< + late final _CFCalendarDecomposeAbsoluteTimePtr = _lookup< ffi.NativeFunction< - CFTypeRef Function(CFNumberFormatterRef, - CFNumberFormatterKey)>>('CFNumberFormatterCopyProperty'); - late final _CFNumberFormatterCopyProperty = - _CFNumberFormatterCopyPropertyPtr.asFunction< - CFTypeRef Function(CFNumberFormatterRef, CFNumberFormatterKey)>(); + Boolean Function(CFCalendarRef, CFAbsoluteTime, + ffi.Pointer)>>('CFCalendarDecomposeAbsoluteTime'); + late final _CFCalendarDecomposeAbsoluteTime = + _CFCalendarDecomposeAbsoluteTimePtr.asFunction< + int Function(CFCalendarRef, double, ffi.Pointer)>(); - late final ffi.Pointer _kCFNumberFormatterCurrencyCode = - _lookup('kCFNumberFormatterCurrencyCode'); + int CFCalendarAddComponents( + CFCalendarRef calendar, + ffi.Pointer at, + int options, + ffi.Pointer componentDesc, + ) { + return _CFCalendarAddComponents( + calendar, + at, + options, + componentDesc, + ); + } - CFNumberFormatterKey get kCFNumberFormatterCurrencyCode => - _kCFNumberFormatterCurrencyCode.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 kCFNumberFormatterCurrencyCode(CFNumberFormatterKey value) => - _kCFNumberFormatterCurrencyCode.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 - _kCFNumberFormatterDecimalSeparator = - _lookup('kCFNumberFormatterDecimalSeparator'); + 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 kCFNumberFormatterDecimalSeparator => - _kCFNumberFormatterDecimalSeparator.value; + CFStringRef CFDateFormatterCreateDateFormatFromTemplate( + CFAllocatorRef allocator, + CFStringRef tmplate, + int options, + CFLocaleRef locale, + ) { + return _CFDateFormatterCreateDateFormatFromTemplate( + allocator, + tmplate, + options, + locale, + ); + } - set kCFNumberFormatterDecimalSeparator(CFNumberFormatterKey value) => - _kCFNumberFormatterDecimalSeparator.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 - _kCFNumberFormatterCurrencyDecimalSeparator = - _lookup( - 'kCFNumberFormatterCurrencyDecimalSeparator'); + int CFDateFormatterGetTypeID() { + return _CFDateFormatterGetTypeID(); + } - CFNumberFormatterKey get kCFNumberFormatterCurrencyDecimalSeparator => - _kCFNumberFormatterCurrencyDecimalSeparator.value; + late final _CFDateFormatterGetTypeIDPtr = + _lookup>( + 'CFDateFormatterGetTypeID'); + late final _CFDateFormatterGetTypeID = + _CFDateFormatterGetTypeIDPtr.asFunction(); - set kCFNumberFormatterCurrencyDecimalSeparator(CFNumberFormatterKey value) => - _kCFNumberFormatterCurrencyDecimalSeparator.value = value; + CFDateFormatterRef CFDateFormatterCreateISO8601Formatter( + CFAllocatorRef allocator, + int formatOptions, + ) { + return _CFDateFormatterCreateISO8601Formatter( + allocator, + formatOptions, + ); + } - late final ffi.Pointer - _kCFNumberFormatterAlwaysShowDecimalSeparator = - _lookup( - 'kCFNumberFormatterAlwaysShowDecimalSeparator'); + late final _CFDateFormatterCreateISO8601FormatterPtr = _lookup< + ffi.NativeFunction< + CFDateFormatterRef Function(CFAllocatorRef, + ffi.Int32)>>('CFDateFormatterCreateISO8601Formatter'); + late final _CFDateFormatterCreateISO8601Formatter = + _CFDateFormatterCreateISO8601FormatterPtr.asFunction< + CFDateFormatterRef Function(CFAllocatorRef, int)>(); - CFNumberFormatterKey get kCFNumberFormatterAlwaysShowDecimalSeparator => - _kCFNumberFormatterAlwaysShowDecimalSeparator.value; + CFDateFormatterRef CFDateFormatterCreate( + CFAllocatorRef allocator, + CFLocaleRef locale, + int dateStyle, + int timeStyle, + ) { + return _CFDateFormatterCreate( + allocator, + locale, + dateStyle, + timeStyle, + ); + } - set kCFNumberFormatterAlwaysShowDecimalSeparator( - CFNumberFormatterKey value) => - _kCFNumberFormatterAlwaysShowDecimalSeparator.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 - _kCFNumberFormatterGroupingSeparator = - _lookup('kCFNumberFormatterGroupingSeparator'); + CFLocaleRef CFDateFormatterGetLocale( + CFDateFormatterRef formatter, + ) { + return _CFDateFormatterGetLocale( + formatter, + ); + } - CFNumberFormatterKey get kCFNumberFormatterGroupingSeparator => - _kCFNumberFormatterGroupingSeparator.value; + late final _CFDateFormatterGetLocalePtr = + _lookup>( + 'CFDateFormatterGetLocale'); + late final _CFDateFormatterGetLocale = _CFDateFormatterGetLocalePtr + .asFunction(); - set kCFNumberFormatterGroupingSeparator(CFNumberFormatterKey value) => - _kCFNumberFormatterGroupingSeparator.value = value; + int CFDateFormatterGetDateStyle( + CFDateFormatterRef formatter, + ) { + return _CFDateFormatterGetDateStyle( + formatter, + ); + } - late final ffi.Pointer - _kCFNumberFormatterUseGroupingSeparator = - _lookup('kCFNumberFormatterUseGroupingSeparator'); + late final _CFDateFormatterGetDateStylePtr = + _lookup>( + 'CFDateFormatterGetDateStyle'); + late final _CFDateFormatterGetDateStyle = _CFDateFormatterGetDateStylePtr + .asFunction(); - CFNumberFormatterKey get kCFNumberFormatterUseGroupingSeparator => - _kCFNumberFormatterUseGroupingSeparator.value; + int CFDateFormatterGetTimeStyle( + CFDateFormatterRef formatter, + ) { + return _CFDateFormatterGetTimeStyle( + formatter, + ); + } - set kCFNumberFormatterUseGroupingSeparator(CFNumberFormatterKey value) => - _kCFNumberFormatterUseGroupingSeparator.value = value; + late final _CFDateFormatterGetTimeStylePtr = + _lookup>( + 'CFDateFormatterGetTimeStyle'); + late final _CFDateFormatterGetTimeStyle = _CFDateFormatterGetTimeStylePtr + .asFunction(); - late final ffi.Pointer - _kCFNumberFormatterPercentSymbol = - _lookup('kCFNumberFormatterPercentSymbol'); + CFStringRef CFDateFormatterGetFormat( + CFDateFormatterRef formatter, + ) { + return _CFDateFormatterGetFormat( + formatter, + ); + } - CFNumberFormatterKey get kCFNumberFormatterPercentSymbol => - _kCFNumberFormatterPercentSymbol.value; + late final _CFDateFormatterGetFormatPtr = + _lookup>( + 'CFDateFormatterGetFormat'); + late final _CFDateFormatterGetFormat = _CFDateFormatterGetFormatPtr + .asFunction(); - set kCFNumberFormatterPercentSymbol(CFNumberFormatterKey value) => - _kCFNumberFormatterPercentSymbol.value = value; + void CFDateFormatterSetFormat( + CFDateFormatterRef formatter, + CFStringRef formatString, + ) { + return _CFDateFormatterSetFormat( + formatter, + formatString, + ); + } - late final ffi.Pointer _kCFNumberFormatterZeroSymbol = - _lookup('kCFNumberFormatterZeroSymbol'); + late final _CFDateFormatterSetFormatPtr = _lookup< + ffi + .NativeFunction>( + 'CFDateFormatterSetFormat'); + late final _CFDateFormatterSetFormat = _CFDateFormatterSetFormatPtr + .asFunction(); - CFNumberFormatterKey get kCFNumberFormatterZeroSymbol => - _kCFNumberFormatterZeroSymbol.value; + CFStringRef CFDateFormatterCreateStringWithDate( + CFAllocatorRef allocator, + CFDateFormatterRef formatter, + CFDateRef date, + ) { + return _CFDateFormatterCreateStringWithDate( + allocator, + formatter, + date, + ); + } - set kCFNumberFormatterZeroSymbol(CFNumberFormatterKey value) => - _kCFNumberFormatterZeroSymbol.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 _kCFNumberFormatterNaNSymbol = - _lookup('kCFNumberFormatterNaNSymbol'); + CFStringRef CFDateFormatterCreateStringWithAbsoluteTime( + CFAllocatorRef allocator, + CFDateFormatterRef formatter, + double at, + ) { + return _CFDateFormatterCreateStringWithAbsoluteTime( + allocator, + formatter, + at, + ); + } - CFNumberFormatterKey get kCFNumberFormatterNaNSymbol => - _kCFNumberFormatterNaNSymbol.value; + late final _CFDateFormatterCreateStringWithAbsoluteTimePtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, CFDateFormatterRef, + CFAbsoluteTime)>>('CFDateFormatterCreateStringWithAbsoluteTime'); + late final _CFDateFormatterCreateStringWithAbsoluteTime = + _CFDateFormatterCreateStringWithAbsoluteTimePtr.asFunction< + CFStringRef Function(CFAllocatorRef, CFDateFormatterRef, double)>(); - set kCFNumberFormatterNaNSymbol(CFNumberFormatterKey value) => - _kCFNumberFormatterNaNSymbol.value = value; + CFDateRef CFDateFormatterCreateDateFromString( + CFAllocatorRef allocator, + CFDateFormatterRef formatter, + CFStringRef string, + ffi.Pointer rangep, + ) { + return _CFDateFormatterCreateDateFromString( + allocator, + formatter, + string, + rangep, + ); + } - late final ffi.Pointer - _kCFNumberFormatterInfinitySymbol = - _lookup('kCFNumberFormatterInfinitySymbol'); + 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 kCFNumberFormatterInfinitySymbol => - _kCFNumberFormatterInfinitySymbol.value; + int CFDateFormatterGetAbsoluteTimeFromString( + CFDateFormatterRef formatter, + CFStringRef string, + ffi.Pointer rangep, + ffi.Pointer atp, + ) { + return _CFDateFormatterGetAbsoluteTimeFromString( + formatter, + string, + rangep, + atp, + ); + } - set kCFNumberFormatterInfinitySymbol(CFNumberFormatterKey value) => - _kCFNumberFormatterInfinitySymbol.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 _kCFNumberFormatterMinusSign = - _lookup('kCFNumberFormatterMinusSign'); + void CFDateFormatterSetProperty( + CFDateFormatterRef formatter, + CFStringRef key, + CFTypeRef value, + ) { + return _CFDateFormatterSetProperty( + formatter, + key, + value, + ); + } - CFNumberFormatterKey get kCFNumberFormatterMinusSign => - _kCFNumberFormatterMinusSign.value; + late final _CFDateFormatterSetPropertyPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFDateFormatterRef, CFStringRef, + CFTypeRef)>>('CFDateFormatterSetProperty'); + late final _CFDateFormatterSetProperty = _CFDateFormatterSetPropertyPtr + .asFunction(); - set kCFNumberFormatterMinusSign(CFNumberFormatterKey value) => - _kCFNumberFormatterMinusSign.value = value; + CFTypeRef CFDateFormatterCopyProperty( + CFDateFormatterRef formatter, + CFDateFormatterKey key, + ) { + return _CFDateFormatterCopyProperty( + formatter, + key, + ); + } - late final ffi.Pointer _kCFNumberFormatterPlusSign = - _lookup('kCFNumberFormatterPlusSign'); + late final _CFDateFormatterCopyPropertyPtr = _lookup< + ffi.NativeFunction< + CFTypeRef Function(CFDateFormatterRef, + CFDateFormatterKey)>>('CFDateFormatterCopyProperty'); + late final _CFDateFormatterCopyProperty = _CFDateFormatterCopyPropertyPtr + .asFunction(); - CFNumberFormatterKey get kCFNumberFormatterPlusSign => - _kCFNumberFormatterPlusSign.value; + late final ffi.Pointer _kCFDateFormatterIsLenient = + _lookup('kCFDateFormatterIsLenient'); - set kCFNumberFormatterPlusSign(CFNumberFormatterKey value) => - _kCFNumberFormatterPlusSign.value = value; + CFDateFormatterKey get kCFDateFormatterIsLenient => + _kCFDateFormatterIsLenient.value; - late final ffi.Pointer - _kCFNumberFormatterCurrencySymbol = - _lookup('kCFNumberFormatterCurrencySymbol'); + set kCFDateFormatterIsLenient(CFDateFormatterKey value) => + _kCFDateFormatterIsLenient.value = value; - CFNumberFormatterKey get kCFNumberFormatterCurrencySymbol => - _kCFNumberFormatterCurrencySymbol.value; + late final ffi.Pointer _kCFDateFormatterTimeZone = + _lookup('kCFDateFormatterTimeZone'); - set kCFNumberFormatterCurrencySymbol(CFNumberFormatterKey value) => - _kCFNumberFormatterCurrencySymbol.value = value; + CFDateFormatterKey get kCFDateFormatterTimeZone => + _kCFDateFormatterTimeZone.value; - late final ffi.Pointer - _kCFNumberFormatterExponentSymbol = - _lookup('kCFNumberFormatterExponentSymbol'); + set kCFDateFormatterTimeZone(CFDateFormatterKey value) => + _kCFDateFormatterTimeZone.value = value; - CFNumberFormatterKey get kCFNumberFormatterExponentSymbol => - _kCFNumberFormatterExponentSymbol.value; + late final ffi.Pointer _kCFDateFormatterCalendarName = + _lookup('kCFDateFormatterCalendarName'); - set kCFNumberFormatterExponentSymbol(CFNumberFormatterKey value) => - _kCFNumberFormatterExponentSymbol.value = value; + CFDateFormatterKey get kCFDateFormatterCalendarName => + _kCFDateFormatterCalendarName.value; - late final ffi.Pointer - _kCFNumberFormatterMinIntegerDigits = - _lookup('kCFNumberFormatterMinIntegerDigits'); + set kCFDateFormatterCalendarName(CFDateFormatterKey value) => + _kCFDateFormatterCalendarName.value = value; - CFNumberFormatterKey get kCFNumberFormatterMinIntegerDigits => - _kCFNumberFormatterMinIntegerDigits.value; + late final ffi.Pointer _kCFDateFormatterDefaultFormat = + _lookup('kCFDateFormatterDefaultFormat'); - set kCFNumberFormatterMinIntegerDigits(CFNumberFormatterKey value) => - _kCFNumberFormatterMinIntegerDigits.value = value; + CFDateFormatterKey get kCFDateFormatterDefaultFormat => + _kCFDateFormatterDefaultFormat.value; - late final ffi.Pointer - _kCFNumberFormatterMaxIntegerDigits = - _lookup('kCFNumberFormatterMaxIntegerDigits'); + set kCFDateFormatterDefaultFormat(CFDateFormatterKey value) => + _kCFDateFormatterDefaultFormat.value = value; - CFNumberFormatterKey get kCFNumberFormatterMaxIntegerDigits => - _kCFNumberFormatterMaxIntegerDigits.value; + late final ffi.Pointer + _kCFDateFormatterTwoDigitStartDate = + _lookup('kCFDateFormatterTwoDigitStartDate'); - set kCFNumberFormatterMaxIntegerDigits(CFNumberFormatterKey value) => - _kCFNumberFormatterMaxIntegerDigits.value = value; + CFDateFormatterKey get kCFDateFormatterTwoDigitStartDate => + _kCFDateFormatterTwoDigitStartDate.value; - late final ffi.Pointer - _kCFNumberFormatterMinFractionDigits = - _lookup('kCFNumberFormatterMinFractionDigits'); + set kCFDateFormatterTwoDigitStartDate(CFDateFormatterKey value) => + _kCFDateFormatterTwoDigitStartDate.value = value; - CFNumberFormatterKey get kCFNumberFormatterMinFractionDigits => - _kCFNumberFormatterMinFractionDigits.value; + late final ffi.Pointer _kCFDateFormatterDefaultDate = + _lookup('kCFDateFormatterDefaultDate'); - set kCFNumberFormatterMinFractionDigits(CFNumberFormatterKey value) => - _kCFNumberFormatterMinFractionDigits.value = value; + CFDateFormatterKey get kCFDateFormatterDefaultDate => + _kCFDateFormatterDefaultDate.value; - late final ffi.Pointer - _kCFNumberFormatterMaxFractionDigits = - _lookup('kCFNumberFormatterMaxFractionDigits'); + set kCFDateFormatterDefaultDate(CFDateFormatterKey value) => + _kCFDateFormatterDefaultDate.value = value; - CFNumberFormatterKey get kCFNumberFormatterMaxFractionDigits => - _kCFNumberFormatterMaxFractionDigits.value; + late final ffi.Pointer _kCFDateFormatterCalendar = + _lookup('kCFDateFormatterCalendar'); - set kCFNumberFormatterMaxFractionDigits(CFNumberFormatterKey value) => - _kCFNumberFormatterMaxFractionDigits.value = value; + CFDateFormatterKey get kCFDateFormatterCalendar => + _kCFDateFormatterCalendar.value; - late final ffi.Pointer _kCFNumberFormatterGroupingSize = - _lookup('kCFNumberFormatterGroupingSize'); + set kCFDateFormatterCalendar(CFDateFormatterKey value) => + _kCFDateFormatterCalendar.value = value; - CFNumberFormatterKey get kCFNumberFormatterGroupingSize => - _kCFNumberFormatterGroupingSize.value; + late final ffi.Pointer _kCFDateFormatterEraSymbols = + _lookup('kCFDateFormatterEraSymbols'); - set kCFNumberFormatterGroupingSize(CFNumberFormatterKey value) => - _kCFNumberFormatterGroupingSize.value = value; + CFDateFormatterKey get kCFDateFormatterEraSymbols => + _kCFDateFormatterEraSymbols.value; - late final ffi.Pointer - _kCFNumberFormatterSecondaryGroupingSize = - _lookup('kCFNumberFormatterSecondaryGroupingSize'); + set kCFDateFormatterEraSymbols(CFDateFormatterKey value) => + _kCFDateFormatterEraSymbols.value = value; - CFNumberFormatterKey get kCFNumberFormatterSecondaryGroupingSize => - _kCFNumberFormatterSecondaryGroupingSize.value; + late final ffi.Pointer _kCFDateFormatterMonthSymbols = + _lookup('kCFDateFormatterMonthSymbols'); - set kCFNumberFormatterSecondaryGroupingSize(CFNumberFormatterKey value) => - _kCFNumberFormatterSecondaryGroupingSize.value = value; + CFDateFormatterKey get kCFDateFormatterMonthSymbols => + _kCFDateFormatterMonthSymbols.value; - late final ffi.Pointer _kCFNumberFormatterRoundingMode = - _lookup('kCFNumberFormatterRoundingMode'); + set kCFDateFormatterMonthSymbols(CFDateFormatterKey value) => + _kCFDateFormatterMonthSymbols.value = value; - CFNumberFormatterKey get kCFNumberFormatterRoundingMode => - _kCFNumberFormatterRoundingMode.value; + late final ffi.Pointer + _kCFDateFormatterShortMonthSymbols = + _lookup('kCFDateFormatterShortMonthSymbols'); - set kCFNumberFormatterRoundingMode(CFNumberFormatterKey value) => - _kCFNumberFormatterRoundingMode.value = value; + CFDateFormatterKey get kCFDateFormatterShortMonthSymbols => + _kCFDateFormatterShortMonthSymbols.value; - late final ffi.Pointer - _kCFNumberFormatterRoundingIncrement = - _lookup('kCFNumberFormatterRoundingIncrement'); + set kCFDateFormatterShortMonthSymbols(CFDateFormatterKey value) => + _kCFDateFormatterShortMonthSymbols.value = value; - CFNumberFormatterKey get kCFNumberFormatterRoundingIncrement => - _kCFNumberFormatterRoundingIncrement.value; + late final ffi.Pointer _kCFDateFormatterWeekdaySymbols = + _lookup('kCFDateFormatterWeekdaySymbols'); - set kCFNumberFormatterRoundingIncrement(CFNumberFormatterKey value) => - _kCFNumberFormatterRoundingIncrement.value = value; + CFDateFormatterKey get kCFDateFormatterWeekdaySymbols => + _kCFDateFormatterWeekdaySymbols.value; - late final ffi.Pointer _kCFNumberFormatterFormatWidth = - _lookup('kCFNumberFormatterFormatWidth'); + set kCFDateFormatterWeekdaySymbols(CFDateFormatterKey value) => + _kCFDateFormatterWeekdaySymbols.value = value; - CFNumberFormatterKey get kCFNumberFormatterFormatWidth => - _kCFNumberFormatterFormatWidth.value; + late final ffi.Pointer + _kCFDateFormatterShortWeekdaySymbols = + _lookup('kCFDateFormatterShortWeekdaySymbols'); - set kCFNumberFormatterFormatWidth(CFNumberFormatterKey value) => - _kCFNumberFormatterFormatWidth.value = value; + CFDateFormatterKey get kCFDateFormatterShortWeekdaySymbols => + _kCFDateFormatterShortWeekdaySymbols.value; - late final ffi.Pointer - _kCFNumberFormatterPaddingPosition = - _lookup('kCFNumberFormatterPaddingPosition'); + set kCFDateFormatterShortWeekdaySymbols(CFDateFormatterKey value) => + _kCFDateFormatterShortWeekdaySymbols.value = value; - CFNumberFormatterKey get kCFNumberFormatterPaddingPosition => - _kCFNumberFormatterPaddingPosition.value; + late final ffi.Pointer _kCFDateFormatterAMSymbol = + _lookup('kCFDateFormatterAMSymbol'); - set kCFNumberFormatterPaddingPosition(CFNumberFormatterKey value) => - _kCFNumberFormatterPaddingPosition.value = value; + CFDateFormatterKey get kCFDateFormatterAMSymbol => + _kCFDateFormatterAMSymbol.value; - late final ffi.Pointer - _kCFNumberFormatterPaddingCharacter = - _lookup('kCFNumberFormatterPaddingCharacter'); + set kCFDateFormatterAMSymbol(CFDateFormatterKey value) => + _kCFDateFormatterAMSymbol.value = value; - CFNumberFormatterKey get kCFNumberFormatterPaddingCharacter => - _kCFNumberFormatterPaddingCharacter.value; + late final ffi.Pointer _kCFDateFormatterPMSymbol = + _lookup('kCFDateFormatterPMSymbol'); - set kCFNumberFormatterPaddingCharacter(CFNumberFormatterKey value) => - _kCFNumberFormatterPaddingCharacter.value = value; + CFDateFormatterKey get kCFDateFormatterPMSymbol => + _kCFDateFormatterPMSymbol.value; - late final ffi.Pointer - _kCFNumberFormatterDefaultFormat = - _lookup('kCFNumberFormatterDefaultFormat'); + set kCFDateFormatterPMSymbol(CFDateFormatterKey value) => + _kCFDateFormatterPMSymbol.value = value; - CFNumberFormatterKey get kCFNumberFormatterDefaultFormat => - _kCFNumberFormatterDefaultFormat.value; + late final ffi.Pointer _kCFDateFormatterLongEraSymbols = + _lookup('kCFDateFormatterLongEraSymbols'); - set kCFNumberFormatterDefaultFormat(CFNumberFormatterKey value) => - _kCFNumberFormatterDefaultFormat.value = value; + CFDateFormatterKey get kCFDateFormatterLongEraSymbols => + _kCFDateFormatterLongEraSymbols.value; - late final ffi.Pointer _kCFNumberFormatterMultiplier = - _lookup('kCFNumberFormatterMultiplier'); + set kCFDateFormatterLongEraSymbols(CFDateFormatterKey value) => + _kCFDateFormatterLongEraSymbols.value = value; - CFNumberFormatterKey get kCFNumberFormatterMultiplier => - _kCFNumberFormatterMultiplier.value; + late final ffi.Pointer + _kCFDateFormatterVeryShortMonthSymbols = + _lookup('kCFDateFormatterVeryShortMonthSymbols'); - set kCFNumberFormatterMultiplier(CFNumberFormatterKey value) => - _kCFNumberFormatterMultiplier.value = value; + CFDateFormatterKey get kCFDateFormatterVeryShortMonthSymbols => + _kCFDateFormatterVeryShortMonthSymbols.value; - late final ffi.Pointer - _kCFNumberFormatterPositivePrefix = - _lookup('kCFNumberFormatterPositivePrefix'); + set kCFDateFormatterVeryShortMonthSymbols(CFDateFormatterKey value) => + _kCFDateFormatterVeryShortMonthSymbols.value = value; - CFNumberFormatterKey get kCFNumberFormatterPositivePrefix => - _kCFNumberFormatterPositivePrefix.value; + late final ffi.Pointer + _kCFDateFormatterStandaloneMonthSymbols = + _lookup('kCFDateFormatterStandaloneMonthSymbols'); - set kCFNumberFormatterPositivePrefix(CFNumberFormatterKey value) => - _kCFNumberFormatterPositivePrefix.value = value; + CFDateFormatterKey get kCFDateFormatterStandaloneMonthSymbols => + _kCFDateFormatterStandaloneMonthSymbols.value; - late final ffi.Pointer - _kCFNumberFormatterPositiveSuffix = - _lookup('kCFNumberFormatterPositiveSuffix'); + set kCFDateFormatterStandaloneMonthSymbols(CFDateFormatterKey value) => + _kCFDateFormatterStandaloneMonthSymbols.value = value; - CFNumberFormatterKey get kCFNumberFormatterPositiveSuffix => - _kCFNumberFormatterPositiveSuffix.value; + late final ffi.Pointer + _kCFDateFormatterShortStandaloneMonthSymbols = + _lookup( + 'kCFDateFormatterShortStandaloneMonthSymbols'); - set kCFNumberFormatterPositiveSuffix(CFNumberFormatterKey value) => - _kCFNumberFormatterPositiveSuffix.value = value; + CFDateFormatterKey get kCFDateFormatterShortStandaloneMonthSymbols => + _kCFDateFormatterShortStandaloneMonthSymbols.value; - late final ffi.Pointer - _kCFNumberFormatterNegativePrefix = - _lookup('kCFNumberFormatterNegativePrefix'); + set kCFDateFormatterShortStandaloneMonthSymbols(CFDateFormatterKey value) => + _kCFDateFormatterShortStandaloneMonthSymbols.value = value; - CFNumberFormatterKey get kCFNumberFormatterNegativePrefix => - _kCFNumberFormatterNegativePrefix.value; + late final ffi.Pointer + _kCFDateFormatterVeryShortStandaloneMonthSymbols = + _lookup( + 'kCFDateFormatterVeryShortStandaloneMonthSymbols'); - set kCFNumberFormatterNegativePrefix(CFNumberFormatterKey value) => - _kCFNumberFormatterNegativePrefix.value = value; + CFDateFormatterKey get kCFDateFormatterVeryShortStandaloneMonthSymbols => + _kCFDateFormatterVeryShortStandaloneMonthSymbols.value; - late final ffi.Pointer - _kCFNumberFormatterNegativeSuffix = - _lookup('kCFNumberFormatterNegativeSuffix'); + set kCFDateFormatterVeryShortStandaloneMonthSymbols( + CFDateFormatterKey value) => + _kCFDateFormatterVeryShortStandaloneMonthSymbols.value = value; - CFNumberFormatterKey get kCFNumberFormatterNegativeSuffix => - _kCFNumberFormatterNegativeSuffix.value; + late final ffi.Pointer + _kCFDateFormatterVeryShortWeekdaySymbols = + _lookup('kCFDateFormatterVeryShortWeekdaySymbols'); - set kCFNumberFormatterNegativeSuffix(CFNumberFormatterKey value) => - _kCFNumberFormatterNegativeSuffix.value = value; + CFDateFormatterKey get kCFDateFormatterVeryShortWeekdaySymbols => + _kCFDateFormatterVeryShortWeekdaySymbols.value; - late final ffi.Pointer - _kCFNumberFormatterPerMillSymbol = - _lookup('kCFNumberFormatterPerMillSymbol'); + set kCFDateFormatterVeryShortWeekdaySymbols(CFDateFormatterKey value) => + _kCFDateFormatterVeryShortWeekdaySymbols.value = value; - CFNumberFormatterKey get kCFNumberFormatterPerMillSymbol => - _kCFNumberFormatterPerMillSymbol.value; + late final ffi.Pointer + _kCFDateFormatterStandaloneWeekdaySymbols = + _lookup('kCFDateFormatterStandaloneWeekdaySymbols'); - set kCFNumberFormatterPerMillSymbol(CFNumberFormatterKey value) => - _kCFNumberFormatterPerMillSymbol.value = value; + CFDateFormatterKey get kCFDateFormatterStandaloneWeekdaySymbols => + _kCFDateFormatterStandaloneWeekdaySymbols.value; - late final ffi.Pointer - _kCFNumberFormatterInternationalCurrencySymbol = - _lookup( - 'kCFNumberFormatterInternationalCurrencySymbol'); + set kCFDateFormatterStandaloneWeekdaySymbols(CFDateFormatterKey value) => + _kCFDateFormatterStandaloneWeekdaySymbols.value = value; - CFNumberFormatterKey get kCFNumberFormatterInternationalCurrencySymbol => - _kCFNumberFormatterInternationalCurrencySymbol.value; + late final ffi.Pointer + _kCFDateFormatterShortStandaloneWeekdaySymbols = + _lookup( + 'kCFDateFormatterShortStandaloneWeekdaySymbols'); - set kCFNumberFormatterInternationalCurrencySymbol( - CFNumberFormatterKey value) => - _kCFNumberFormatterInternationalCurrencySymbol.value = value; + CFDateFormatterKey get kCFDateFormatterShortStandaloneWeekdaySymbols => + _kCFDateFormatterShortStandaloneWeekdaySymbols.value; - late final ffi.Pointer - _kCFNumberFormatterCurrencyGroupingSeparator = - _lookup( - 'kCFNumberFormatterCurrencyGroupingSeparator'); + set kCFDateFormatterShortStandaloneWeekdaySymbols(CFDateFormatterKey value) => + _kCFDateFormatterShortStandaloneWeekdaySymbols.value = value; - CFNumberFormatterKey get kCFNumberFormatterCurrencyGroupingSeparator => - _kCFNumberFormatterCurrencyGroupingSeparator.value; + late final ffi.Pointer + _kCFDateFormatterVeryShortStandaloneWeekdaySymbols = + _lookup( + 'kCFDateFormatterVeryShortStandaloneWeekdaySymbols'); - set kCFNumberFormatterCurrencyGroupingSeparator(CFNumberFormatterKey value) => - _kCFNumberFormatterCurrencyGroupingSeparator.value = value; + CFDateFormatterKey get kCFDateFormatterVeryShortStandaloneWeekdaySymbols => + _kCFDateFormatterVeryShortStandaloneWeekdaySymbols.value; - late final ffi.Pointer _kCFNumberFormatterIsLenient = - _lookup('kCFNumberFormatterIsLenient'); + set kCFDateFormatterVeryShortStandaloneWeekdaySymbols( + CFDateFormatterKey value) => + _kCFDateFormatterVeryShortStandaloneWeekdaySymbols.value = value; - CFNumberFormatterKey get kCFNumberFormatterIsLenient => - _kCFNumberFormatterIsLenient.value; + late final ffi.Pointer _kCFDateFormatterQuarterSymbols = + _lookup('kCFDateFormatterQuarterSymbols'); - set kCFNumberFormatterIsLenient(CFNumberFormatterKey value) => - _kCFNumberFormatterIsLenient.value = value; + CFDateFormatterKey get kCFDateFormatterQuarterSymbols => + _kCFDateFormatterQuarterSymbols.value; - late final ffi.Pointer - _kCFNumberFormatterUseSignificantDigits = - _lookup('kCFNumberFormatterUseSignificantDigits'); + set kCFDateFormatterQuarterSymbols(CFDateFormatterKey value) => + _kCFDateFormatterQuarterSymbols.value = value; - CFNumberFormatterKey get kCFNumberFormatterUseSignificantDigits => - _kCFNumberFormatterUseSignificantDigits.value; + late final ffi.Pointer + _kCFDateFormatterShortQuarterSymbols = + _lookup('kCFDateFormatterShortQuarterSymbols'); - set kCFNumberFormatterUseSignificantDigits(CFNumberFormatterKey value) => - _kCFNumberFormatterUseSignificantDigits.value = value; + CFDateFormatterKey get kCFDateFormatterShortQuarterSymbols => + _kCFDateFormatterShortQuarterSymbols.value; - late final ffi.Pointer - _kCFNumberFormatterMinSignificantDigits = - _lookup('kCFNumberFormatterMinSignificantDigits'); + set kCFDateFormatterShortQuarterSymbols(CFDateFormatterKey value) => + _kCFDateFormatterShortQuarterSymbols.value = value; - CFNumberFormatterKey get kCFNumberFormatterMinSignificantDigits => - _kCFNumberFormatterMinSignificantDigits.value; + late final ffi.Pointer + _kCFDateFormatterStandaloneQuarterSymbols = + _lookup('kCFDateFormatterStandaloneQuarterSymbols'); - set kCFNumberFormatterMinSignificantDigits(CFNumberFormatterKey value) => - _kCFNumberFormatterMinSignificantDigits.value = value; + CFDateFormatterKey get kCFDateFormatterStandaloneQuarterSymbols => + _kCFDateFormatterStandaloneQuarterSymbols.value; - late final ffi.Pointer - _kCFNumberFormatterMaxSignificantDigits = - _lookup('kCFNumberFormatterMaxSignificantDigits'); + set kCFDateFormatterStandaloneQuarterSymbols(CFDateFormatterKey value) => + _kCFDateFormatterStandaloneQuarterSymbols.value = value; - CFNumberFormatterKey get kCFNumberFormatterMaxSignificantDigits => - _kCFNumberFormatterMaxSignificantDigits.value; + late final ffi.Pointer + _kCFDateFormatterShortStandaloneQuarterSymbols = + _lookup( + 'kCFDateFormatterShortStandaloneQuarterSymbols'); - set kCFNumberFormatterMaxSignificantDigits(CFNumberFormatterKey value) => - _kCFNumberFormatterMaxSignificantDigits.value = value; + CFDateFormatterKey get kCFDateFormatterShortStandaloneQuarterSymbols => + _kCFDateFormatterShortStandaloneQuarterSymbols.value; - int CFNumberFormatterGetDecimalInfoForCurrencyCode( - CFStringRef currencyCode, - ffi.Pointer defaultFractionDigits, - ffi.Pointer roundingIncrement, - ) { - return _CFNumberFormatterGetDecimalInfoForCurrencyCode( - currencyCode, - defaultFractionDigits, - roundingIncrement, - ); - } + set kCFDateFormatterShortStandaloneQuarterSymbols(CFDateFormatterKey value) => + _kCFDateFormatterShortStandaloneQuarterSymbols.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 + _kCFDateFormatterGregorianStartDate = + _lookup('kCFDateFormatterGregorianStartDate'); - late final ffi.Pointer _kCFPreferencesAnyApplication = - _lookup('kCFPreferencesAnyApplication'); + CFDateFormatterKey get kCFDateFormatterGregorianStartDate => + _kCFDateFormatterGregorianStartDate.value; - CFStringRef get kCFPreferencesAnyApplication => - _kCFPreferencesAnyApplication.value; + set kCFDateFormatterGregorianStartDate(CFDateFormatterKey value) => + _kCFDateFormatterGregorianStartDate.value = value; - set kCFPreferencesAnyApplication(CFStringRef value) => - _kCFPreferencesAnyApplication.value = value; + late final ffi.Pointer + _kCFDateFormatterDoesRelativeDateFormattingKey = + _lookup( + 'kCFDateFormatterDoesRelativeDateFormattingKey'); - late final ffi.Pointer _kCFPreferencesCurrentApplication = - _lookup('kCFPreferencesCurrentApplication'); + CFDateFormatterKey get kCFDateFormatterDoesRelativeDateFormattingKey => + _kCFDateFormatterDoesRelativeDateFormattingKey.value; - CFStringRef get kCFPreferencesCurrentApplication => - _kCFPreferencesCurrentApplication.value; + set kCFDateFormatterDoesRelativeDateFormattingKey(CFDateFormatterKey value) => + _kCFDateFormatterDoesRelativeDateFormattingKey.value = value; - set kCFPreferencesCurrentApplication(CFStringRef value) => - _kCFPreferencesCurrentApplication.value = value; + late final ffi.Pointer _kCFBooleanTrue = + _lookup('kCFBooleanTrue'); - late final ffi.Pointer _kCFPreferencesAnyHost = - _lookup('kCFPreferencesAnyHost'); + CFBooleanRef get kCFBooleanTrue => _kCFBooleanTrue.value; - CFStringRef get kCFPreferencesAnyHost => _kCFPreferencesAnyHost.value; + set kCFBooleanTrue(CFBooleanRef value) => _kCFBooleanTrue.value = value; - set kCFPreferencesAnyHost(CFStringRef value) => - _kCFPreferencesAnyHost.value = value; + late final ffi.Pointer _kCFBooleanFalse = + _lookup('kCFBooleanFalse'); - late final ffi.Pointer _kCFPreferencesCurrentHost = - _lookup('kCFPreferencesCurrentHost'); + CFBooleanRef get kCFBooleanFalse => _kCFBooleanFalse.value; - CFStringRef get kCFPreferencesCurrentHost => _kCFPreferencesCurrentHost.value; + set kCFBooleanFalse(CFBooleanRef value) => _kCFBooleanFalse.value = value; - set kCFPreferencesCurrentHost(CFStringRef value) => - _kCFPreferencesCurrentHost.value = value; + int CFBooleanGetTypeID() { + return _CFBooleanGetTypeID(); + } - late final ffi.Pointer _kCFPreferencesAnyUser = - _lookup('kCFPreferencesAnyUser'); + late final _CFBooleanGetTypeIDPtr = + _lookup>('CFBooleanGetTypeID'); + late final _CFBooleanGetTypeID = + _CFBooleanGetTypeIDPtr.asFunction(); - CFStringRef get kCFPreferencesAnyUser => _kCFPreferencesAnyUser.value; + int CFBooleanGetValue( + CFBooleanRef boolean, + ) { + return _CFBooleanGetValue( + boolean, + ); + } - set kCFPreferencesAnyUser(CFStringRef value) => - _kCFPreferencesAnyUser.value = value; + late final _CFBooleanGetValuePtr = + _lookup>( + 'CFBooleanGetValue'); + late final _CFBooleanGetValue = + _CFBooleanGetValuePtr.asFunction(); - late final ffi.Pointer _kCFPreferencesCurrentUser = - _lookup('kCFPreferencesCurrentUser'); + late final ffi.Pointer _kCFNumberPositiveInfinity = + _lookup('kCFNumberPositiveInfinity'); - CFStringRef get kCFPreferencesCurrentUser => _kCFPreferencesCurrentUser.value; + CFNumberRef get kCFNumberPositiveInfinity => _kCFNumberPositiveInfinity.value; - set kCFPreferencesCurrentUser(CFStringRef value) => - _kCFPreferencesCurrentUser.value = value; + set kCFNumberPositiveInfinity(CFNumberRef value) => + _kCFNumberPositiveInfinity.value = value; - CFPropertyListRef CFPreferencesCopyAppValue( - CFStringRef key, - CFStringRef applicationID, - ) { - return _CFPreferencesCopyAppValue( - key, - applicationID, - ); - } + late final ffi.Pointer _kCFNumberNegativeInfinity = + _lookup('kCFNumberNegativeInfinity'); - late final _CFPreferencesCopyAppValuePtr = _lookup< - ffi.NativeFunction< - CFPropertyListRef Function( - CFStringRef, CFStringRef)>>('CFPreferencesCopyAppValue'); - late final _CFPreferencesCopyAppValue = _CFPreferencesCopyAppValuePtr - .asFunction(); + CFNumberRef get kCFNumberNegativeInfinity => _kCFNumberNegativeInfinity.value; - int CFPreferencesGetAppBooleanValue( - CFStringRef key, - CFStringRef applicationID, - ffi.Pointer keyExistsAndHasValidFormat, - ) { - return _CFPreferencesGetAppBooleanValue( - key, - applicationID, - keyExistsAndHasValidFormat, - ); - } + set kCFNumberNegativeInfinity(CFNumberRef value) => + _kCFNumberNegativeInfinity.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 _kCFNumberNaN = + _lookup('kCFNumberNaN'); - int CFPreferencesGetAppIntegerValue( - CFStringRef key, - CFStringRef applicationID, - ffi.Pointer keyExistsAndHasValidFormat, - ) { - return _CFPreferencesGetAppIntegerValue( - key, - applicationID, - keyExistsAndHasValidFormat, - ); + 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)>(); + ffi.Int32 Function(CFNumberRef, CFNumberRef, + ffi.Pointer)>>('CFNumberCompare'); + late final _CFNumberCompare = _CFNumberComparePtr.asFunction< + int Function(CFNumberRef, CFNumberRef, ffi.Pointer)>(); - void CFPreferencesSetValue( - CFStringRef key, - CFPropertyListRef value, - CFStringRef applicationID, - CFStringRef userName, - CFStringRef hostName, - ) { - return _CFPreferencesSetValue( - key, - value, - applicationID, - userName, - hostName, - ); + 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, - ); - } - - 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, + formatter, + string, + rangep, + options, ); } - late final _CFURLCreateAbsoluteURLWithBytesPtr = _lookup< + late final _CFNumberFormatterCreateNumberFromStringPtr = _lookup< ffi.NativeFunction< - CFURLRef Function( + CFNumberRef Function( CFAllocatorRef, - ffi.Pointer, - CFIndex, - CFStringEncoding, - CFURLRef, - Boolean)>>('CFURLCreateAbsoluteURLWithBytes'); - late final _CFURLCreateAbsoluteURLWithBytes = - _CFURLCreateAbsoluteURLWithBytesPtr.asFunction< - CFURLRef Function( - CFAllocatorRef, ffi.Pointer, int, int, CFURLRef, int)>(); + CFNumberFormatterRef, + CFStringRef, + ffi.Pointer, + CFOptionFlags)>>('CFNumberFormatterCreateNumberFromString'); + late final _CFNumberFormatterCreateNumberFromString = + _CFNumberFormatterCreateNumberFromStringPtr.asFunction< + CFNumberRef Function(CFAllocatorRef, CFNumberFormatterRef, + CFStringRef, ffi.Pointer, int)>(); - CFURLRef CFURLCreateWithFileSystemPath( - CFAllocatorRef allocator, - CFStringRef filePath, - int pathStyle, - int isDirectory, + int CFNumberFormatterGetValueFromString( + CFNumberFormatterRef formatter, + CFStringRef string, + ffi.Pointer rangep, + int numberType, + ffi.Pointer valuePtr, ) { - return _CFURLCreateWithFileSystemPath( - allocator, - filePath, - pathStyle, - isDirectory, + return _CFNumberFormatterGetValueFromString( + formatter, + string, + rangep, + numberType, + valuePtr, ); } - late final _CFURLCreateWithFileSystemPathPtr = _lookup< + late final _CFNumberFormatterGetValueFromStringPtr = _lookup< ffi.NativeFunction< - CFURLRef Function(CFAllocatorRef, CFStringRef, ffi.Int32, - Boolean)>>('CFURLCreateWithFileSystemPath'); - late final _CFURLCreateWithFileSystemPath = _CFURLCreateWithFileSystemPathPtr - .asFunction(); + 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 CFURLCreateFromFileSystemRepresentation( - CFAllocatorRef allocator, - ffi.Pointer buffer, - int bufLen, - int isDirectory, + void CFNumberFormatterSetProperty( + CFNumberFormatterRef formatter, + CFNumberFormatterKey key, + CFTypeRef value, ) { - return _CFURLCreateFromFileSystemRepresentation( - allocator, - buffer, - bufLen, - isDirectory, + return _CFNumberFormatterSetProperty( + formatter, + key, + value, ); } - late final _CFURLCreateFromFileSystemRepresentationPtr = _lookup< + late final _CFNumberFormatterSetPropertyPtr = _lookup< ffi.NativeFunction< - CFURLRef Function(CFAllocatorRef, ffi.Pointer, CFIndex, - Boolean)>>('CFURLCreateFromFileSystemRepresentation'); - late final _CFURLCreateFromFileSystemRepresentation = - _CFURLCreateFromFileSystemRepresentationPtr.asFunction< - CFURLRef Function(CFAllocatorRef, ffi.Pointer, int, int)>(); + ffi.Void Function(CFNumberFormatterRef, CFNumberFormatterKey, + CFTypeRef)>>('CFNumberFormatterSetProperty'); + late final _CFNumberFormatterSetProperty = + _CFNumberFormatterSetPropertyPtr.asFunction< + void Function( + CFNumberFormatterRef, CFNumberFormatterKey, CFTypeRef)>(); - CFURLRef CFURLCreateWithFileSystemPathRelativeToBase( - CFAllocatorRef allocator, - CFStringRef filePath, - int pathStyle, - int isDirectory, - CFURLRef baseURL, + CFTypeRef CFNumberFormatterCopyProperty( + CFNumberFormatterRef formatter, + CFNumberFormatterKey key, ) { - return _CFURLCreateWithFileSystemPathRelativeToBase( - allocator, - filePath, - pathStyle, - isDirectory, - baseURL, + return _CFNumberFormatterCopyProperty( + formatter, + key, ); } - late final _CFURLCreateWithFileSystemPathRelativeToBasePtr = _lookup< + late final _CFNumberFormatterCopyPropertyPtr = _lookup< ffi.NativeFunction< - CFURLRef Function(CFAllocatorRef, CFStringRef, ffi.Int32, Boolean, - CFURLRef)>>('CFURLCreateWithFileSystemPathRelativeToBase'); - late final _CFURLCreateWithFileSystemPathRelativeToBase = - _CFURLCreateWithFileSystemPathRelativeToBasePtr.asFunction< - CFURLRef Function(CFAllocatorRef, CFStringRef, int, int, CFURLRef)>(); + CFTypeRef Function(CFNumberFormatterRef, + CFNumberFormatterKey)>>('CFNumberFormatterCopyProperty'); + late final _CFNumberFormatterCopyProperty = + _CFNumberFormatterCopyPropertyPtr.asFunction< + CFTypeRef Function(CFNumberFormatterRef, CFNumberFormatterKey)>(); - CFURLRef CFURLCreateFromFileSystemRepresentationRelativeToBase( - CFAllocatorRef allocator, - ffi.Pointer buffer, - int bufLen, - int isDirectory, - CFURLRef baseURL, - ) { - return _CFURLCreateFromFileSystemRepresentationRelativeToBase( - allocator, - buffer, - bufLen, - isDirectory, - baseURL, - ); - } + late final ffi.Pointer _kCFNumberFormatterCurrencyCode = + _lookup('kCFNumberFormatterCurrencyCode'); - 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)>(); + CFNumberFormatterKey get kCFNumberFormatterCurrencyCode => + _kCFNumberFormatterCurrencyCode.value; - int CFURLGetFileSystemRepresentation( - CFURLRef url, - int resolveAgainstBase, - ffi.Pointer buffer, - int maxBufLen, - ) { - return _CFURLGetFileSystemRepresentation( - url, - resolveAgainstBase, - buffer, - maxBufLen, - ); - } + set kCFNumberFormatterCurrencyCode(CFNumberFormatterKey value) => + _kCFNumberFormatterCurrencyCode.value = 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)>(); + late final ffi.Pointer + _kCFNumberFormatterDecimalSeparator = + _lookup('kCFNumberFormatterDecimalSeparator'); - CFURLRef CFURLCopyAbsoluteURL( - CFURLRef relativeURL, - ) { - return _CFURLCopyAbsoluteURL( - relativeURL, - ); - } + CFNumberFormatterKey get kCFNumberFormatterDecimalSeparator => + _kCFNumberFormatterDecimalSeparator.value; - late final _CFURLCopyAbsoluteURLPtr = - _lookup>( - 'CFURLCopyAbsoluteURL'); - late final _CFURLCopyAbsoluteURL = - _CFURLCopyAbsoluteURLPtr.asFunction(); + set kCFNumberFormatterDecimalSeparator(CFNumberFormatterKey value) => + _kCFNumberFormatterDecimalSeparator.value = value; - CFStringRef CFURLGetString( - CFURLRef anURL, - ) { - return _CFURLGetString( - anURL, - ); - } + late final ffi.Pointer + _kCFNumberFormatterCurrencyDecimalSeparator = + _lookup( + 'kCFNumberFormatterCurrencyDecimalSeparator'); - late final _CFURLGetStringPtr = - _lookup>( - 'CFURLGetString'); - late final _CFURLGetString = - _CFURLGetStringPtr.asFunction(); + CFNumberFormatterKey get kCFNumberFormatterCurrencyDecimalSeparator => + _kCFNumberFormatterCurrencyDecimalSeparator.value; - CFURLRef CFURLGetBaseURL( - CFURLRef anURL, - ) { - return _CFURLGetBaseURL( - anURL, - ); - } + set kCFNumberFormatterCurrencyDecimalSeparator(CFNumberFormatterKey value) => + _kCFNumberFormatterCurrencyDecimalSeparator.value = value; - late final _CFURLGetBaseURLPtr = - _lookup>( - 'CFURLGetBaseURL'); - late final _CFURLGetBaseURL = - _CFURLGetBaseURLPtr.asFunction(); + late final ffi.Pointer + _kCFNumberFormatterAlwaysShowDecimalSeparator = + _lookup( + 'kCFNumberFormatterAlwaysShowDecimalSeparator'); - int CFURLCanBeDecomposed( - CFURLRef anURL, - ) { - return _CFURLCanBeDecomposed( - anURL, - ); - } + CFNumberFormatterKey get kCFNumberFormatterAlwaysShowDecimalSeparator => + _kCFNumberFormatterAlwaysShowDecimalSeparator.value; - late final _CFURLCanBeDecomposedPtr = - _lookup>( - 'CFURLCanBeDecomposed'); - late final _CFURLCanBeDecomposed = - _CFURLCanBeDecomposedPtr.asFunction(); + set kCFNumberFormatterAlwaysShowDecimalSeparator( + CFNumberFormatterKey value) => + _kCFNumberFormatterAlwaysShowDecimalSeparator.value = value; - CFStringRef CFURLCopyScheme( - CFURLRef anURL, - ) { - return _CFURLCopyScheme( - anURL, - ); - } + late final ffi.Pointer + _kCFNumberFormatterGroupingSeparator = + _lookup('kCFNumberFormatterGroupingSeparator'); - late final _CFURLCopySchemePtr = - _lookup>( - 'CFURLCopyScheme'); - late final _CFURLCopyScheme = - _CFURLCopySchemePtr.asFunction(); + CFNumberFormatterKey get kCFNumberFormatterGroupingSeparator => + _kCFNumberFormatterGroupingSeparator.value; - CFStringRef CFURLCopyNetLocation( - CFURLRef anURL, - ) { - return _CFURLCopyNetLocation( - anURL, - ); - } + set kCFNumberFormatterGroupingSeparator(CFNumberFormatterKey value) => + _kCFNumberFormatterGroupingSeparator.value = value; - late final _CFURLCopyNetLocationPtr = - _lookup>( - 'CFURLCopyNetLocation'); - late final _CFURLCopyNetLocation = - _CFURLCopyNetLocationPtr.asFunction(); + late final ffi.Pointer + _kCFNumberFormatterUseGroupingSeparator = + _lookup('kCFNumberFormatterUseGroupingSeparator'); - CFStringRef CFURLCopyPath( - CFURLRef anURL, - ) { - return _CFURLCopyPath( - anURL, - ); - } + CFNumberFormatterKey get kCFNumberFormatterUseGroupingSeparator => + _kCFNumberFormatterUseGroupingSeparator.value; - late final _CFURLCopyPathPtr = - _lookup>( - 'CFURLCopyPath'); - late final _CFURLCopyPath = - _CFURLCopyPathPtr.asFunction(); + set kCFNumberFormatterUseGroupingSeparator(CFNumberFormatterKey value) => + _kCFNumberFormatterUseGroupingSeparator.value = value; - CFStringRef CFURLCopyStrictPath( - CFURLRef anURL, - ffi.Pointer isAbsolute, - ) { - return _CFURLCopyStrictPath( - anURL, - isAbsolute, - ); - } + late final ffi.Pointer + _kCFNumberFormatterPercentSymbol = + _lookup('kCFNumberFormatterPercentSymbol'); - late final _CFURLCopyStrictPathPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function( - CFURLRef, ffi.Pointer)>>('CFURLCopyStrictPath'); - late final _CFURLCopyStrictPath = _CFURLCopyStrictPathPtr.asFunction< - CFStringRef Function(CFURLRef, ffi.Pointer)>(); + CFNumberFormatterKey get kCFNumberFormatterPercentSymbol => + _kCFNumberFormatterPercentSymbol.value; - CFStringRef CFURLCopyFileSystemPath( - CFURLRef anURL, - int pathStyle, - ) { - return _CFURLCopyFileSystemPath( - anURL, - pathStyle, - ); - } + set kCFNumberFormatterPercentSymbol(CFNumberFormatterKey value) => + _kCFNumberFormatterPercentSymbol.value = value; - late final _CFURLCopyFileSystemPathPtr = - _lookup>( - 'CFURLCopyFileSystemPath'); - late final _CFURLCopyFileSystemPath = _CFURLCopyFileSystemPathPtr.asFunction< - CFStringRef Function(CFURLRef, int)>(); + late final ffi.Pointer _kCFNumberFormatterZeroSymbol = + _lookup('kCFNumberFormatterZeroSymbol'); - int CFURLHasDirectoryPath( - CFURLRef anURL, - ) { - return _CFURLHasDirectoryPath( - anURL, - ); - } + CFNumberFormatterKey get kCFNumberFormatterZeroSymbol => + _kCFNumberFormatterZeroSymbol.value; - late final _CFURLHasDirectoryPathPtr = - _lookup>( - 'CFURLHasDirectoryPath'); - late final _CFURLHasDirectoryPath = - _CFURLHasDirectoryPathPtr.asFunction(); + set kCFNumberFormatterZeroSymbol(CFNumberFormatterKey value) => + _kCFNumberFormatterZeroSymbol.value = value; - CFStringRef CFURLCopyResourceSpecifier( - CFURLRef anURL, - ) { - return _CFURLCopyResourceSpecifier( - anURL, - ); - } + late final ffi.Pointer _kCFNumberFormatterNaNSymbol = + _lookup('kCFNumberFormatterNaNSymbol'); - late final _CFURLCopyResourceSpecifierPtr = - _lookup>( - 'CFURLCopyResourceSpecifier'); - late final _CFURLCopyResourceSpecifier = _CFURLCopyResourceSpecifierPtr - .asFunction(); + CFNumberFormatterKey get kCFNumberFormatterNaNSymbol => + _kCFNumberFormatterNaNSymbol.value; - CFStringRef CFURLCopyHostName( - CFURLRef anURL, - ) { - return _CFURLCopyHostName( - anURL, - ); - } + set kCFNumberFormatterNaNSymbol(CFNumberFormatterKey value) => + _kCFNumberFormatterNaNSymbol.value = value; - late final _CFURLCopyHostNamePtr = - _lookup>( - 'CFURLCopyHostName'); - late final _CFURLCopyHostName = - _CFURLCopyHostNamePtr.asFunction(); + late final ffi.Pointer + _kCFNumberFormatterInfinitySymbol = + _lookup('kCFNumberFormatterInfinitySymbol'); - int CFURLGetPortNumber( - CFURLRef anURL, - ) { - return _CFURLGetPortNumber( - anURL, - ); - } + CFNumberFormatterKey get kCFNumberFormatterInfinitySymbol => + _kCFNumberFormatterInfinitySymbol.value; - late final _CFURLGetPortNumberPtr = - _lookup>( - 'CFURLGetPortNumber'); - late final _CFURLGetPortNumber = - _CFURLGetPortNumberPtr.asFunction(); + set kCFNumberFormatterInfinitySymbol(CFNumberFormatterKey value) => + _kCFNumberFormatterInfinitySymbol.value = value; - CFStringRef CFURLCopyUserName( - CFURLRef anURL, - ) { - return _CFURLCopyUserName( - anURL, - ); - } + late final ffi.Pointer _kCFNumberFormatterMinusSign = + _lookup('kCFNumberFormatterMinusSign'); - late final _CFURLCopyUserNamePtr = - _lookup>( - 'CFURLCopyUserName'); - late final _CFURLCopyUserName = - _CFURLCopyUserNamePtr.asFunction(); + CFNumberFormatterKey get kCFNumberFormatterMinusSign => + _kCFNumberFormatterMinusSign.value; - CFStringRef CFURLCopyPassword( - CFURLRef anURL, - ) { - return _CFURLCopyPassword( - anURL, - ); - } + set kCFNumberFormatterMinusSign(CFNumberFormatterKey value) => + _kCFNumberFormatterMinusSign.value = value; - late final _CFURLCopyPasswordPtr = - _lookup>( - 'CFURLCopyPassword'); - late final _CFURLCopyPassword = - _CFURLCopyPasswordPtr.asFunction(); + late final ffi.Pointer _kCFNumberFormatterPlusSign = + _lookup('kCFNumberFormatterPlusSign'); - CFStringRef CFURLCopyParameterString( - CFURLRef anURL, - CFStringRef charactersToLeaveEscaped, - ) { - return _CFURLCopyParameterString( - anURL, - charactersToLeaveEscaped, - ); - } + CFNumberFormatterKey get kCFNumberFormatterPlusSign => + _kCFNumberFormatterPlusSign.value; - late final _CFURLCopyParameterStringPtr = - _lookup>( - 'CFURLCopyParameterString'); - late final _CFURLCopyParameterString = _CFURLCopyParameterStringPtr - .asFunction(); + set kCFNumberFormatterPlusSign(CFNumberFormatterKey value) => + _kCFNumberFormatterPlusSign.value = value; - CFStringRef CFURLCopyQueryString( - CFURLRef anURL, - CFStringRef charactersToLeaveEscaped, - ) { - return _CFURLCopyQueryString( - anURL, - charactersToLeaveEscaped, - ); - } + late final ffi.Pointer + _kCFNumberFormatterCurrencySymbol = + _lookup('kCFNumberFormatterCurrencySymbol'); - late final _CFURLCopyQueryStringPtr = - _lookup>( - 'CFURLCopyQueryString'); - late final _CFURLCopyQueryString = _CFURLCopyQueryStringPtr.asFunction< - CFStringRef Function(CFURLRef, CFStringRef)>(); + CFNumberFormatterKey get kCFNumberFormatterCurrencySymbol => + _kCFNumberFormatterCurrencySymbol.value; - CFStringRef CFURLCopyFragment( - CFURLRef anURL, - CFStringRef charactersToLeaveEscaped, - ) { - return _CFURLCopyFragment( - anURL, - charactersToLeaveEscaped, - ); - } + set kCFNumberFormatterCurrencySymbol(CFNumberFormatterKey value) => + _kCFNumberFormatterCurrencySymbol.value = value; - late final _CFURLCopyFragmentPtr = - _lookup>( - 'CFURLCopyFragment'); - late final _CFURLCopyFragment = _CFURLCopyFragmentPtr.asFunction< - CFStringRef Function(CFURLRef, CFStringRef)>(); + late final ffi.Pointer + _kCFNumberFormatterExponentSymbol = + _lookup('kCFNumberFormatterExponentSymbol'); - CFStringRef CFURLCopyLastPathComponent( - CFURLRef url, - ) { - return _CFURLCopyLastPathComponent( - url, - ); - } + CFNumberFormatterKey get kCFNumberFormatterExponentSymbol => + _kCFNumberFormatterExponentSymbol.value; - late final _CFURLCopyLastPathComponentPtr = - _lookup>( - 'CFURLCopyLastPathComponent'); - late final _CFURLCopyLastPathComponent = _CFURLCopyLastPathComponentPtr - .asFunction(); + set kCFNumberFormatterExponentSymbol(CFNumberFormatterKey value) => + _kCFNumberFormatterExponentSymbol.value = value; - CFStringRef CFURLCopyPathExtension( - CFURLRef url, - ) { - return _CFURLCopyPathExtension( - url, - ); - } + late final ffi.Pointer + _kCFNumberFormatterMinIntegerDigits = + _lookup('kCFNumberFormatterMinIntegerDigits'); - late final _CFURLCopyPathExtensionPtr = - _lookup>( - 'CFURLCopyPathExtension'); - late final _CFURLCopyPathExtension = - _CFURLCopyPathExtensionPtr.asFunction(); + CFNumberFormatterKey get kCFNumberFormatterMinIntegerDigits => + _kCFNumberFormatterMinIntegerDigits.value; - CFURLRef CFURLCreateCopyAppendingPathComponent( - CFAllocatorRef allocator, - CFURLRef url, - CFStringRef pathComponent, - int isDirectory, - ) { - return _CFURLCreateCopyAppendingPathComponent( - allocator, - url, - pathComponent, - isDirectory, - ); - } + set kCFNumberFormatterMinIntegerDigits(CFNumberFormatterKey value) => + _kCFNumberFormatterMinIntegerDigits.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 + _kCFNumberFormatterMaxIntegerDigits = + _lookup('kCFNumberFormatterMaxIntegerDigits'); - CFURLRef CFURLCreateCopyDeletingLastPathComponent( - CFAllocatorRef allocator, - CFURLRef url, - ) { - return _CFURLCreateCopyDeletingLastPathComponent( - allocator, - url, - ); - } + CFNumberFormatterKey get kCFNumberFormatterMaxIntegerDigits => + _kCFNumberFormatterMaxIntegerDigits.value; - late final _CFURLCreateCopyDeletingLastPathComponentPtr = - _lookup>( - 'CFURLCreateCopyDeletingLastPathComponent'); - late final _CFURLCreateCopyDeletingLastPathComponent = - _CFURLCreateCopyDeletingLastPathComponentPtr.asFunction< - CFURLRef Function(CFAllocatorRef, CFURLRef)>(); + set kCFNumberFormatterMaxIntegerDigits(CFNumberFormatterKey value) => + _kCFNumberFormatterMaxIntegerDigits.value = value; - CFURLRef CFURLCreateCopyAppendingPathExtension( - CFAllocatorRef allocator, - CFURLRef url, - CFStringRef extension1, - ) { - return _CFURLCreateCopyAppendingPathExtension( - allocator, - url, - extension1, - ); - } + late final ffi.Pointer + _kCFNumberFormatterMinFractionDigits = + _lookup('kCFNumberFormatterMinFractionDigits'); - late final _CFURLCreateCopyAppendingPathExtensionPtr = _lookup< - ffi.NativeFunction< - CFURLRef Function(CFAllocatorRef, CFURLRef, - CFStringRef)>>('CFURLCreateCopyAppendingPathExtension'); - late final _CFURLCreateCopyAppendingPathExtension = - _CFURLCreateCopyAppendingPathExtensionPtr.asFunction< - CFURLRef Function(CFAllocatorRef, CFURLRef, CFStringRef)>(); + CFNumberFormatterKey get kCFNumberFormatterMinFractionDigits => + _kCFNumberFormatterMinFractionDigits.value; - CFURLRef CFURLCreateCopyDeletingPathExtension( - CFAllocatorRef allocator, - CFURLRef url, - ) { - return _CFURLCreateCopyDeletingPathExtension( - allocator, - url, - ); - } + set kCFNumberFormatterMinFractionDigits(CFNumberFormatterKey value) => + _kCFNumberFormatterMinFractionDigits.value = value; - late final _CFURLCreateCopyDeletingPathExtensionPtr = - _lookup>( - 'CFURLCreateCopyDeletingPathExtension'); - late final _CFURLCreateCopyDeletingPathExtension = - _CFURLCreateCopyDeletingPathExtensionPtr.asFunction< - CFURLRef Function(CFAllocatorRef, CFURLRef)>(); + late final ffi.Pointer + _kCFNumberFormatterMaxFractionDigits = + _lookup('kCFNumberFormatterMaxFractionDigits'); - int CFURLGetBytes( - CFURLRef url, - ffi.Pointer buffer, - int bufferLength, - ) { - return _CFURLGetBytes( - url, - buffer, - bufferLength, - ); - } + CFNumberFormatterKey get kCFNumberFormatterMaxFractionDigits => + _kCFNumberFormatterMaxFractionDigits.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 kCFNumberFormatterMaxFractionDigits(CFNumberFormatterKey value) => + _kCFNumberFormatterMaxFractionDigits.value = value; - CFRange CFURLGetByteRangeForComponent( - CFURLRef url, - int component, - ffi.Pointer rangeIncludingSeparators, - ) { - return _CFURLGetByteRangeForComponent( - url, - component, - rangeIncludingSeparators, - ); - } + late final ffi.Pointer _kCFNumberFormatterGroupingSize = + _lookup('kCFNumberFormatterGroupingSize'); - late final _CFURLGetByteRangeForComponentPtr = _lookup< - ffi.NativeFunction< - CFRange Function(CFURLRef, ffi.Int32, - ffi.Pointer)>>('CFURLGetByteRangeForComponent'); - late final _CFURLGetByteRangeForComponent = _CFURLGetByteRangeForComponentPtr - .asFunction)>(); + CFNumberFormatterKey get kCFNumberFormatterGroupingSize => + _kCFNumberFormatterGroupingSize.value; - CFStringRef CFURLCreateStringByReplacingPercentEscapes( - CFAllocatorRef allocator, - CFStringRef originalString, - CFStringRef charactersToLeaveEscaped, - ) { - return _CFURLCreateStringByReplacingPercentEscapes( - allocator, - originalString, - charactersToLeaveEscaped, - ); - } + set kCFNumberFormatterGroupingSize(CFNumberFormatterKey value) => + _kCFNumberFormatterGroupingSize.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 + _kCFNumberFormatterSecondaryGroupingSize = + _lookup('kCFNumberFormatterSecondaryGroupingSize'); - CFStringRef CFURLCreateStringByReplacingPercentEscapesUsingEncoding( - CFAllocatorRef allocator, - CFStringRef origString, - CFStringRef charsToLeaveEscaped, - int encoding, - ) { - return _CFURLCreateStringByReplacingPercentEscapesUsingEncoding( - allocator, - origString, - charsToLeaveEscaped, - encoding, - ); - } + CFNumberFormatterKey get kCFNumberFormatterSecondaryGroupingSize => + _kCFNumberFormatterSecondaryGroupingSize.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 kCFNumberFormatterSecondaryGroupingSize(CFNumberFormatterKey value) => + _kCFNumberFormatterSecondaryGroupingSize.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 _kCFNumberFormatterRoundingMode = + _lookup('kCFNumberFormatterRoundingMode'); - 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)>(); + CFNumberFormatterKey get kCFNumberFormatterRoundingMode => + _kCFNumberFormatterRoundingMode.value; - int CFURLIsFileReferenceURL( - CFURLRef url, - ) { - return _CFURLIsFileReferenceURL( - url, - ); - } + set kCFNumberFormatterRoundingMode(CFNumberFormatterKey value) => + _kCFNumberFormatterRoundingMode.value = value; - late final _CFURLIsFileReferenceURLPtr = - _lookup>( - 'CFURLIsFileReferenceURL'); - late final _CFURLIsFileReferenceURL = - _CFURLIsFileReferenceURLPtr.asFunction(); + late final ffi.Pointer + _kCFNumberFormatterRoundingIncrement = + _lookup('kCFNumberFormatterRoundingIncrement'); - CFURLRef CFURLCreateFileReferenceURL( - CFAllocatorRef allocator, - CFURLRef url, - ffi.Pointer error, - ) { - return _CFURLCreateFileReferenceURL( - allocator, - url, - error, - ); - } + CFNumberFormatterKey get kCFNumberFormatterRoundingIncrement => + _kCFNumberFormatterRoundingIncrement.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 kCFNumberFormatterRoundingIncrement(CFNumberFormatterKey value) => + _kCFNumberFormatterRoundingIncrement.value = value; - CFURLRef CFURLCreateFilePathURL( - CFAllocatorRef allocator, - CFURLRef url, - ffi.Pointer error, - ) { - return _CFURLCreateFilePathURL( - allocator, - url, - error, - ); - } + late final ffi.Pointer _kCFNumberFormatterFormatWidth = + _lookup('kCFNumberFormatterFormatWidth'); - late final _CFURLCreateFilePathURLPtr = _lookup< - ffi.NativeFunction< - CFURLRef Function(CFAllocatorRef, CFURLRef, - ffi.Pointer)>>('CFURLCreateFilePathURL'); - late final _CFURLCreateFilePathURL = _CFURLCreateFilePathURLPtr.asFunction< - CFURLRef Function(CFAllocatorRef, CFURLRef, ffi.Pointer)>(); + CFNumberFormatterKey get kCFNumberFormatterFormatWidth => + _kCFNumberFormatterFormatWidth.value; - CFURLRef CFURLCreateFromFSRef( - CFAllocatorRef allocator, - ffi.Pointer fsRef, - ) { - return _CFURLCreateFromFSRef( - allocator, - fsRef, - ); - } + set kCFNumberFormatterFormatWidth(CFNumberFormatterKey value) => + _kCFNumberFormatterFormatWidth.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 + _kCFNumberFormatterPaddingPosition = + _lookup('kCFNumberFormatterPaddingPosition'); - int CFURLGetFSRef( - CFURLRef url, - ffi.Pointer fsRef, - ) { - return _CFURLGetFSRef( - url, - fsRef, - ); - } + CFNumberFormatterKey get kCFNumberFormatterPaddingPosition => + _kCFNumberFormatterPaddingPosition.value; - late final _CFURLGetFSRefPtr = _lookup< - ffi.NativeFunction)>>( - 'CFURLGetFSRef'); - late final _CFURLGetFSRef = _CFURLGetFSRefPtr.asFunction< - int Function(CFURLRef, ffi.Pointer)>(); + set kCFNumberFormatterPaddingPosition(CFNumberFormatterKey value) => + _kCFNumberFormatterPaddingPosition.value = value; - int CFURLCopyResourcePropertyForKey( - CFURLRef url, - CFStringRef key, - ffi.Pointer propertyValueTypeRefPtr, - ffi.Pointer error, - ) { - return _CFURLCopyResourcePropertyForKey( - url, - key, - propertyValueTypeRefPtr, - error, - ); - } + late final ffi.Pointer + _kCFNumberFormatterPaddingCharacter = + _lookup('kCFNumberFormatterPaddingCharacter'); - 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)>(); + CFNumberFormatterKey get kCFNumberFormatterPaddingCharacter => + _kCFNumberFormatterPaddingCharacter.value; - CFDictionaryRef CFURLCopyResourcePropertiesForKeys( - CFURLRef url, - CFArrayRef keys, - ffi.Pointer error, - ) { - return _CFURLCopyResourcePropertiesForKeys( - url, - keys, - error, - ); - } + set kCFNumberFormatterPaddingCharacter(CFNumberFormatterKey value) => + _kCFNumberFormatterPaddingCharacter.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 + _kCFNumberFormatterDefaultFormat = + _lookup('kCFNumberFormatterDefaultFormat'); - int CFURLSetResourcePropertyForKey( - CFURLRef url, - CFStringRef key, - CFTypeRef propertyValue, - ffi.Pointer error, - ) { - return _CFURLSetResourcePropertyForKey( - url, - key, - propertyValue, - error, - ); - } + CFNumberFormatterKey get kCFNumberFormatterDefaultFormat => + _kCFNumberFormatterDefaultFormat.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 kCFNumberFormatterDefaultFormat(CFNumberFormatterKey value) => + _kCFNumberFormatterDefaultFormat.value = value; - int CFURLSetResourcePropertiesForKeys( - CFURLRef url, - CFDictionaryRef keyedPropertyValues, - ffi.Pointer error, - ) { - return _CFURLSetResourcePropertiesForKeys( - url, - keyedPropertyValues, - error, - ); - } + late final ffi.Pointer _kCFNumberFormatterMultiplier = + _lookup('kCFNumberFormatterMultiplier'); - late final _CFURLSetResourcePropertiesForKeysPtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFURLRef, CFDictionaryRef, - ffi.Pointer)>>('CFURLSetResourcePropertiesForKeys'); - late final _CFURLSetResourcePropertiesForKeys = - _CFURLSetResourcePropertiesForKeysPtr.asFunction< - int Function(CFURLRef, CFDictionaryRef, ffi.Pointer)>(); + CFNumberFormatterKey get kCFNumberFormatterMultiplier => + _kCFNumberFormatterMultiplier.value; - late final ffi.Pointer _kCFURLKeysOfUnsetValuesKey = - _lookup('kCFURLKeysOfUnsetValuesKey'); + set kCFNumberFormatterMultiplier(CFNumberFormatterKey value) => + _kCFNumberFormatterMultiplier.value = value; - CFStringRef get kCFURLKeysOfUnsetValuesKey => - _kCFURLKeysOfUnsetValuesKey.value; + late final ffi.Pointer + _kCFNumberFormatterPositivePrefix = + _lookup('kCFNumberFormatterPositivePrefix'); - set kCFURLKeysOfUnsetValuesKey(CFStringRef value) => - _kCFURLKeysOfUnsetValuesKey.value = value; + CFNumberFormatterKey get kCFNumberFormatterPositivePrefix => + _kCFNumberFormatterPositivePrefix.value; - void CFURLClearResourcePropertyCacheForKey( - CFURLRef url, - CFStringRef key, - ) { - return _CFURLClearResourcePropertyCacheForKey( - url, - key, - ); - } + set kCFNumberFormatterPositivePrefix(CFNumberFormatterKey value) => + _kCFNumberFormatterPositivePrefix.value = value; - late final _CFURLClearResourcePropertyCacheForKeyPtr = - _lookup>( - 'CFURLClearResourcePropertyCacheForKey'); - late final _CFURLClearResourcePropertyCacheForKey = - _CFURLClearResourcePropertyCacheForKeyPtr.asFunction< - void Function(CFURLRef, CFStringRef)>(); + late final ffi.Pointer + _kCFNumberFormatterPositiveSuffix = + _lookup('kCFNumberFormatterPositiveSuffix'); - void CFURLClearResourcePropertyCache( - CFURLRef url, - ) { - return _CFURLClearResourcePropertyCache( - url, - ); - } + CFNumberFormatterKey get kCFNumberFormatterPositiveSuffix => + _kCFNumberFormatterPositiveSuffix.value; - late final _CFURLClearResourcePropertyCachePtr = - _lookup>( - 'CFURLClearResourcePropertyCache'); - late final _CFURLClearResourcePropertyCache = - _CFURLClearResourcePropertyCachePtr.asFunction(); + set kCFNumberFormatterPositiveSuffix(CFNumberFormatterKey value) => + _kCFNumberFormatterPositiveSuffix.value = value; - void CFURLSetTemporaryResourcePropertyForKey( - CFURLRef url, - CFStringRef key, - CFTypeRef propertyValue, - ) { - return _CFURLSetTemporaryResourcePropertyForKey( - url, - key, - propertyValue, - ); - } + late final ffi.Pointer + _kCFNumberFormatterNegativePrefix = + _lookup('kCFNumberFormatterNegativePrefix'); - late final _CFURLSetTemporaryResourcePropertyForKeyPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFURLRef, CFStringRef, - CFTypeRef)>>('CFURLSetTemporaryResourcePropertyForKey'); - late final _CFURLSetTemporaryResourcePropertyForKey = - _CFURLSetTemporaryResourcePropertyForKeyPtr.asFunction< - void Function(CFURLRef, CFStringRef, CFTypeRef)>(); + CFNumberFormatterKey get kCFNumberFormatterNegativePrefix => + _kCFNumberFormatterNegativePrefix.value; - int CFURLResourceIsReachable( - CFURLRef url, - ffi.Pointer error, - ) { - return _CFURLResourceIsReachable( - url, - error, - ); - } + set kCFNumberFormatterNegativePrefix(CFNumberFormatterKey value) => + _kCFNumberFormatterNegativePrefix.value = value; - late final _CFURLResourceIsReachablePtr = _lookup< - ffi.NativeFunction< - Boolean Function( - CFURLRef, ffi.Pointer)>>('CFURLResourceIsReachable'); - late final _CFURLResourceIsReachable = _CFURLResourceIsReachablePtr - .asFunction)>(); + late final ffi.Pointer + _kCFNumberFormatterNegativeSuffix = + _lookup('kCFNumberFormatterNegativeSuffix'); - late final ffi.Pointer _kCFURLNameKey = - _lookup('kCFURLNameKey'); + CFNumberFormatterKey get kCFNumberFormatterNegativeSuffix => + _kCFNumberFormatterNegativeSuffix.value; - CFStringRef get kCFURLNameKey => _kCFURLNameKey.value; + set kCFNumberFormatterNegativeSuffix(CFNumberFormatterKey value) => + _kCFNumberFormatterNegativeSuffix.value = value; - set kCFURLNameKey(CFStringRef value) => _kCFURLNameKey.value = value; + late final ffi.Pointer + _kCFNumberFormatterPerMillSymbol = + _lookup('kCFNumberFormatterPerMillSymbol'); - late final ffi.Pointer _kCFURLLocalizedNameKey = - _lookup('kCFURLLocalizedNameKey'); + CFNumberFormatterKey get kCFNumberFormatterPerMillSymbol => + _kCFNumberFormatterPerMillSymbol.value; - CFStringRef get kCFURLLocalizedNameKey => _kCFURLLocalizedNameKey.value; + set kCFNumberFormatterPerMillSymbol(CFNumberFormatterKey value) => + _kCFNumberFormatterPerMillSymbol.value = value; - set kCFURLLocalizedNameKey(CFStringRef value) => - _kCFURLLocalizedNameKey.value = value; + late final ffi.Pointer + _kCFNumberFormatterInternationalCurrencySymbol = + _lookup( + 'kCFNumberFormatterInternationalCurrencySymbol'); - late final ffi.Pointer _kCFURLIsRegularFileKey = - _lookup('kCFURLIsRegularFileKey'); + CFNumberFormatterKey get kCFNumberFormatterInternationalCurrencySymbol => + _kCFNumberFormatterInternationalCurrencySymbol.value; - CFStringRef get kCFURLIsRegularFileKey => _kCFURLIsRegularFileKey.value; + set kCFNumberFormatterInternationalCurrencySymbol( + CFNumberFormatterKey value) => + _kCFNumberFormatterInternationalCurrencySymbol.value = value; - set kCFURLIsRegularFileKey(CFStringRef value) => - _kCFURLIsRegularFileKey.value = value; + late final ffi.Pointer + _kCFNumberFormatterCurrencyGroupingSeparator = + _lookup( + 'kCFNumberFormatterCurrencyGroupingSeparator'); - late final ffi.Pointer _kCFURLIsDirectoryKey = - _lookup('kCFURLIsDirectoryKey'); + CFNumberFormatterKey get kCFNumberFormatterCurrencyGroupingSeparator => + _kCFNumberFormatterCurrencyGroupingSeparator.value; - CFStringRef get kCFURLIsDirectoryKey => _kCFURLIsDirectoryKey.value; + set kCFNumberFormatterCurrencyGroupingSeparator(CFNumberFormatterKey value) => + _kCFNumberFormatterCurrencyGroupingSeparator.value = value; - set kCFURLIsDirectoryKey(CFStringRef value) => - _kCFURLIsDirectoryKey.value = value; + late final ffi.Pointer _kCFNumberFormatterIsLenient = + _lookup('kCFNumberFormatterIsLenient'); - late final ffi.Pointer _kCFURLIsSymbolicLinkKey = - _lookup('kCFURLIsSymbolicLinkKey'); + CFNumberFormatterKey get kCFNumberFormatterIsLenient => + _kCFNumberFormatterIsLenient.value; - CFStringRef get kCFURLIsSymbolicLinkKey => _kCFURLIsSymbolicLinkKey.value; + set kCFNumberFormatterIsLenient(CFNumberFormatterKey value) => + _kCFNumberFormatterIsLenient.value = value; - set kCFURLIsSymbolicLinkKey(CFStringRef value) => - _kCFURLIsSymbolicLinkKey.value = value; + late final ffi.Pointer + _kCFNumberFormatterUseSignificantDigits = + _lookup('kCFNumberFormatterUseSignificantDigits'); - late final ffi.Pointer _kCFURLIsVolumeKey = - _lookup('kCFURLIsVolumeKey'); + CFNumberFormatterKey get kCFNumberFormatterUseSignificantDigits => + _kCFNumberFormatterUseSignificantDigits.value; - CFStringRef get kCFURLIsVolumeKey => _kCFURLIsVolumeKey.value; + set kCFNumberFormatterUseSignificantDigits(CFNumberFormatterKey value) => + _kCFNumberFormatterUseSignificantDigits.value = value; - set kCFURLIsVolumeKey(CFStringRef value) => _kCFURLIsVolumeKey.value = value; + late final ffi.Pointer + _kCFNumberFormatterMinSignificantDigits = + _lookup('kCFNumberFormatterMinSignificantDigits'); - late final ffi.Pointer _kCFURLIsPackageKey = - _lookup('kCFURLIsPackageKey'); + CFNumberFormatterKey get kCFNumberFormatterMinSignificantDigits => + _kCFNumberFormatterMinSignificantDigits.value; - CFStringRef get kCFURLIsPackageKey => _kCFURLIsPackageKey.value; + set kCFNumberFormatterMinSignificantDigits(CFNumberFormatterKey value) => + _kCFNumberFormatterMinSignificantDigits.value = value; - set kCFURLIsPackageKey(CFStringRef value) => - _kCFURLIsPackageKey.value = value; + late final ffi.Pointer + _kCFNumberFormatterMaxSignificantDigits = + _lookup('kCFNumberFormatterMaxSignificantDigits'); - late final ffi.Pointer _kCFURLIsApplicationKey = - _lookup('kCFURLIsApplicationKey'); + CFNumberFormatterKey get kCFNumberFormatterMaxSignificantDigits => + _kCFNumberFormatterMaxSignificantDigits.value; - CFStringRef get kCFURLIsApplicationKey => _kCFURLIsApplicationKey.value; + set kCFNumberFormatterMaxSignificantDigits(CFNumberFormatterKey value) => + _kCFNumberFormatterMaxSignificantDigits.value = value; - set kCFURLIsApplicationKey(CFStringRef value) => - _kCFURLIsApplicationKey.value = value; + int CFNumberFormatterGetDecimalInfoForCurrencyCode( + CFStringRef currencyCode, + ffi.Pointer defaultFractionDigits, + ffi.Pointer roundingIncrement, + ) { + return _CFNumberFormatterGetDecimalInfoForCurrencyCode( + currencyCode, + defaultFractionDigits, + roundingIncrement, + ); + } - late final ffi.Pointer _kCFURLApplicationIsScriptableKey = - _lookup('kCFURLApplicationIsScriptableKey'); + 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)>(); - CFStringRef get kCFURLApplicationIsScriptableKey => - _kCFURLApplicationIsScriptableKey.value; + late final ffi.Pointer _kCFPreferencesAnyApplication = + _lookup('kCFPreferencesAnyApplication'); - set kCFURLApplicationIsScriptableKey(CFStringRef value) => - _kCFURLApplicationIsScriptableKey.value = value; + CFStringRef get kCFPreferencesAnyApplication => + _kCFPreferencesAnyApplication.value; - late final ffi.Pointer _kCFURLIsSystemImmutableKey = - _lookup('kCFURLIsSystemImmutableKey'); + set kCFPreferencesAnyApplication(CFStringRef value) => + _kCFPreferencesAnyApplication.value = value; - CFStringRef get kCFURLIsSystemImmutableKey => - _kCFURLIsSystemImmutableKey.value; + late final ffi.Pointer _kCFPreferencesCurrentApplication = + _lookup('kCFPreferencesCurrentApplication'); - set kCFURLIsSystemImmutableKey(CFStringRef value) => - _kCFURLIsSystemImmutableKey.value = value; + CFStringRef get kCFPreferencesCurrentApplication => + _kCFPreferencesCurrentApplication.value; - late final ffi.Pointer _kCFURLIsUserImmutableKey = - _lookup('kCFURLIsUserImmutableKey'); + set kCFPreferencesCurrentApplication(CFStringRef value) => + _kCFPreferencesCurrentApplication.value = value; - CFStringRef get kCFURLIsUserImmutableKey => _kCFURLIsUserImmutableKey.value; + late final ffi.Pointer _kCFPreferencesAnyHost = + _lookup('kCFPreferencesAnyHost'); - set kCFURLIsUserImmutableKey(CFStringRef value) => - _kCFURLIsUserImmutableKey.value = value; + CFStringRef get kCFPreferencesAnyHost => _kCFPreferencesAnyHost.value; - late final ffi.Pointer _kCFURLIsHiddenKey = - _lookup('kCFURLIsHiddenKey'); + set kCFPreferencesAnyHost(CFStringRef value) => + _kCFPreferencesAnyHost.value = value; - CFStringRef get kCFURLIsHiddenKey => _kCFURLIsHiddenKey.value; + late final ffi.Pointer _kCFPreferencesCurrentHost = + _lookup('kCFPreferencesCurrentHost'); - set kCFURLIsHiddenKey(CFStringRef value) => _kCFURLIsHiddenKey.value = value; + CFStringRef get kCFPreferencesCurrentHost => _kCFPreferencesCurrentHost.value; - late final ffi.Pointer _kCFURLHasHiddenExtensionKey = - _lookup('kCFURLHasHiddenExtensionKey'); + set kCFPreferencesCurrentHost(CFStringRef value) => + _kCFPreferencesCurrentHost.value = value; - CFStringRef get kCFURLHasHiddenExtensionKey => - _kCFURLHasHiddenExtensionKey.value; + late final ffi.Pointer _kCFPreferencesAnyUser = + _lookup('kCFPreferencesAnyUser'); - set kCFURLHasHiddenExtensionKey(CFStringRef value) => - _kCFURLHasHiddenExtensionKey.value = value; + CFStringRef get kCFPreferencesAnyUser => _kCFPreferencesAnyUser.value; - late final ffi.Pointer _kCFURLCreationDateKey = - _lookup('kCFURLCreationDateKey'); + set kCFPreferencesAnyUser(CFStringRef value) => + _kCFPreferencesAnyUser.value = value; - CFStringRef get kCFURLCreationDateKey => _kCFURLCreationDateKey.value; + late final ffi.Pointer _kCFPreferencesCurrentUser = + _lookup('kCFPreferencesCurrentUser'); - set kCFURLCreationDateKey(CFStringRef value) => - _kCFURLCreationDateKey.value = value; + CFStringRef get kCFPreferencesCurrentUser => _kCFPreferencesCurrentUser.value; - late final ffi.Pointer _kCFURLContentAccessDateKey = - _lookup('kCFURLContentAccessDateKey'); + set kCFPreferencesCurrentUser(CFStringRef value) => + _kCFPreferencesCurrentUser.value = value; - CFStringRef get kCFURLContentAccessDateKey => - _kCFURLContentAccessDateKey.value; + CFPropertyListRef CFPreferencesCopyAppValue( + CFStringRef key, + CFStringRef applicationID, + ) { + return _CFPreferencesCopyAppValue( + key, + applicationID, + ); + } - set kCFURLContentAccessDateKey(CFStringRef value) => - _kCFURLContentAccessDateKey.value = value; + late final _CFPreferencesCopyAppValuePtr = _lookup< + ffi.NativeFunction< + CFPropertyListRef Function( + CFStringRef, CFStringRef)>>('CFPreferencesCopyAppValue'); + late final _CFPreferencesCopyAppValue = _CFPreferencesCopyAppValuePtr + .asFunction(); - late final ffi.Pointer _kCFURLContentModificationDateKey = - _lookup('kCFURLContentModificationDateKey'); + int CFPreferencesGetAppBooleanValue( + CFStringRef key, + CFStringRef applicationID, + ffi.Pointer keyExistsAndHasValidFormat, + ) { + return _CFPreferencesGetAppBooleanValue( + key, + applicationID, + keyExistsAndHasValidFormat, + ); + } - CFStringRef get kCFURLContentModificationDateKey => - _kCFURLContentModificationDateKey.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)>(); - set kCFURLContentModificationDateKey(CFStringRef value) => - _kCFURLContentModificationDateKey.value = value; + int CFPreferencesGetAppIntegerValue( + CFStringRef key, + CFStringRef applicationID, + ffi.Pointer keyExistsAndHasValidFormat, + ) { + return _CFPreferencesGetAppIntegerValue( + key, + applicationID, + keyExistsAndHasValidFormat, + ); + } - late final ffi.Pointer _kCFURLAttributeModificationDateKey = - _lookup('kCFURLAttributeModificationDateKey'); + late final _CFPreferencesGetAppIntegerValuePtr = _lookup< + ffi.NativeFunction< + CFIndex Function(CFStringRef, CFStringRef, + ffi.Pointer)>>('CFPreferencesGetAppIntegerValue'); + late final _CFPreferencesGetAppIntegerValue = + _CFPreferencesGetAppIntegerValuePtr.asFunction< + int Function(CFStringRef, CFStringRef, ffi.Pointer)>(); - CFStringRef get kCFURLAttributeModificationDateKey => - _kCFURLAttributeModificationDateKey.value; + void CFPreferencesSetAppValue( + CFStringRef key, + CFPropertyListRef value, + CFStringRef applicationID, + ) { + return _CFPreferencesSetAppValue( + key, + value, + applicationID, + ); + } - set kCFURLAttributeModificationDateKey(CFStringRef value) => - _kCFURLAttributeModificationDateKey.value = value; + late final _CFPreferencesSetAppValuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFStringRef, CFPropertyListRef, + CFStringRef)>>('CFPreferencesSetAppValue'); + late final _CFPreferencesSetAppValue = _CFPreferencesSetAppValuePtr + .asFunction(); - late final ffi.Pointer _kCFURLFileContentIdentifierKey = - _lookup('kCFURLFileContentIdentifierKey'); + void CFPreferencesAddSuitePreferencesToApp( + CFStringRef applicationID, + CFStringRef suiteID, + ) { + return _CFPreferencesAddSuitePreferencesToApp( + applicationID, + suiteID, + ); + } - CFStringRef get kCFURLFileContentIdentifierKey => - _kCFURLFileContentIdentifierKey.value; + late final _CFPreferencesAddSuitePreferencesToAppPtr = + _lookup>( + 'CFPreferencesAddSuitePreferencesToApp'); + late final _CFPreferencesAddSuitePreferencesToApp = + _CFPreferencesAddSuitePreferencesToAppPtr.asFunction< + void Function(CFStringRef, CFStringRef)>(); - set kCFURLFileContentIdentifierKey(CFStringRef value) => - _kCFURLFileContentIdentifierKey.value = value; + void CFPreferencesRemoveSuitePreferencesFromApp( + CFStringRef applicationID, + CFStringRef suiteID, + ) { + return _CFPreferencesRemoveSuitePreferencesFromApp( + applicationID, + suiteID, + ); + } - late final ffi.Pointer _kCFURLMayShareFileContentKey = - _lookup('kCFURLMayShareFileContentKey'); + late final _CFPreferencesRemoveSuitePreferencesFromAppPtr = + _lookup>( + 'CFPreferencesRemoveSuitePreferencesFromApp'); + late final _CFPreferencesRemoveSuitePreferencesFromApp = + _CFPreferencesRemoveSuitePreferencesFromAppPtr.asFunction< + void Function(CFStringRef, CFStringRef)>(); - CFStringRef get kCFURLMayShareFileContentKey => - _kCFURLMayShareFileContentKey.value; + int CFPreferencesAppSynchronize( + CFStringRef applicationID, + ) { + return _CFPreferencesAppSynchronize( + applicationID, + ); + } - set kCFURLMayShareFileContentKey(CFStringRef value) => - _kCFURLMayShareFileContentKey.value = value; + late final _CFPreferencesAppSynchronizePtr = + _lookup>( + 'CFPreferencesAppSynchronize'); + late final _CFPreferencesAppSynchronize = + _CFPreferencesAppSynchronizePtr.asFunction(); - late final ffi.Pointer _kCFURLMayHaveExtendedAttributesKey = - _lookup('kCFURLMayHaveExtendedAttributesKey'); + CFPropertyListRef CFPreferencesCopyValue( + CFStringRef key, + CFStringRef applicationID, + CFStringRef userName, + CFStringRef hostName, + ) { + return _CFPreferencesCopyValue( + key, + applicationID, + userName, + hostName, + ); + } - CFStringRef get kCFURLMayHaveExtendedAttributesKey => - _kCFURLMayHaveExtendedAttributesKey.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)>(); - set kCFURLMayHaveExtendedAttributesKey(CFStringRef value) => - _kCFURLMayHaveExtendedAttributesKey.value = value; + CFDictionaryRef CFPreferencesCopyMultiple( + CFArrayRef keysToFetch, + CFStringRef applicationID, + CFStringRef userName, + CFStringRef hostName, + ) { + return _CFPreferencesCopyMultiple( + keysToFetch, + applicationID, + userName, + hostName, + ); + } - late final ffi.Pointer _kCFURLIsPurgeableKey = - _lookup('kCFURLIsPurgeableKey'); + late final _CFPreferencesCopyMultiplePtr = _lookup< + ffi.NativeFunction< + CFDictionaryRef Function(CFArrayRef, CFStringRef, CFStringRef, + CFStringRef)>>('CFPreferencesCopyMultiple'); + late final _CFPreferencesCopyMultiple = + _CFPreferencesCopyMultiplePtr.asFunction< + CFDictionaryRef Function( + CFArrayRef, CFStringRef, CFStringRef, CFStringRef)>(); - CFStringRef get kCFURLIsPurgeableKey => _kCFURLIsPurgeableKey.value; + void CFPreferencesSetValue( + CFStringRef key, + CFPropertyListRef value, + CFStringRef applicationID, + CFStringRef userName, + CFStringRef hostName, + ) { + return _CFPreferencesSetValue( + key, + value, + applicationID, + userName, + hostName, + ); + } - set kCFURLIsPurgeableKey(CFStringRef value) => - _kCFURLIsPurgeableKey.value = value; + 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 ffi.Pointer _kCFURLIsSparseKey = - _lookup('kCFURLIsSparseKey'); + void CFPreferencesSetMultiple( + CFDictionaryRef keysToSet, + CFArrayRef keysToRemove, + CFStringRef applicationID, + CFStringRef userName, + CFStringRef hostName, + ) { + return _CFPreferencesSetMultiple( + keysToSet, + keysToRemove, + applicationID, + userName, + hostName, + ); + } - CFStringRef get kCFURLIsSparseKey => _kCFURLIsSparseKey.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)>(); - set kCFURLIsSparseKey(CFStringRef value) => _kCFURLIsSparseKey.value = value; + int CFPreferencesSynchronize( + CFStringRef applicationID, + CFStringRef userName, + CFStringRef hostName, + ) { + return _CFPreferencesSynchronize( + applicationID, + userName, + hostName, + ); + } - late final ffi.Pointer _kCFURLLinkCountKey = - _lookup('kCFURLLinkCountKey'); + late final _CFPreferencesSynchronizePtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFStringRef, CFStringRef, + CFStringRef)>>('CFPreferencesSynchronize'); + late final _CFPreferencesSynchronize = _CFPreferencesSynchronizePtr + .asFunction(); - CFStringRef get kCFURLLinkCountKey => _kCFURLLinkCountKey.value; + CFArrayRef CFPreferencesCopyApplicationList( + CFStringRef userName, + CFStringRef hostName, + ) { + return _CFPreferencesCopyApplicationList( + userName, + hostName, + ); + } - set kCFURLLinkCountKey(CFStringRef value) => - _kCFURLLinkCountKey.value = value; + late final _CFPreferencesCopyApplicationListPtr = _lookup< + ffi.NativeFunction>( + 'CFPreferencesCopyApplicationList'); + late final _CFPreferencesCopyApplicationList = + _CFPreferencesCopyApplicationListPtr.asFunction< + CFArrayRef Function(CFStringRef, CFStringRef)>(); - late final ffi.Pointer _kCFURLParentDirectoryURLKey = - _lookup('kCFURLParentDirectoryURLKey'); + CFArrayRef CFPreferencesCopyKeyList( + CFStringRef applicationID, + CFStringRef userName, + CFStringRef hostName, + ) { + return _CFPreferencesCopyKeyList( + applicationID, + userName, + hostName, + ); + } - CFStringRef get kCFURLParentDirectoryURLKey => - _kCFURLParentDirectoryURLKey.value; + late final _CFPreferencesCopyKeyListPtr = _lookup< + ffi.NativeFunction< + CFArrayRef Function(CFStringRef, CFStringRef, + CFStringRef)>>('CFPreferencesCopyKeyList'); + late final _CFPreferencesCopyKeyList = _CFPreferencesCopyKeyListPtr + .asFunction(); - set kCFURLParentDirectoryURLKey(CFStringRef value) => - _kCFURLParentDirectoryURLKey.value = value; + int CFPreferencesAppValueIsForced( + CFStringRef key, + CFStringRef applicationID, + ) { + return _CFPreferencesAppValueIsForced( + key, + applicationID, + ); + } - late final ffi.Pointer _kCFURLVolumeURLKey = - _lookup('kCFURLVolumeURLKey'); + late final _CFPreferencesAppValueIsForcedPtr = + _lookup>( + 'CFPreferencesAppValueIsForced'); + late final _CFPreferencesAppValueIsForced = _CFPreferencesAppValueIsForcedPtr + .asFunction(); - CFStringRef get kCFURLVolumeURLKey => _kCFURLVolumeURLKey.value; + int CFURLGetTypeID() { + return _CFURLGetTypeID(); + } - set kCFURLVolumeURLKey(CFStringRef value) => - _kCFURLVolumeURLKey.value = value; + late final _CFURLGetTypeIDPtr = + _lookup>('CFURLGetTypeID'); + late final _CFURLGetTypeID = _CFURLGetTypeIDPtr.asFunction(); - late final ffi.Pointer _kCFURLTypeIdentifierKey = - _lookup('kCFURLTypeIdentifierKey'); + CFURLRef CFURLCreateWithBytes( + CFAllocatorRef allocator, + ffi.Pointer URLBytes, + int length, + int encoding, + CFURLRef baseURL, + ) { + return _CFURLCreateWithBytes( + allocator, + URLBytes, + length, + encoding, + baseURL, + ); + } - CFStringRef get kCFURLTypeIdentifierKey => _kCFURLTypeIdentifierKey.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)>(); - set kCFURLTypeIdentifierKey(CFStringRef value) => - _kCFURLTypeIdentifierKey.value = value; + CFDataRef CFURLCreateData( + CFAllocatorRef allocator, + CFURLRef url, + int encoding, + int escapeWhitespace, + ) { + return _CFURLCreateData( + allocator, + url, + encoding, + escapeWhitespace, + ); + } - late final ffi.Pointer _kCFURLLocalizedTypeDescriptionKey = - _lookup('kCFURLLocalizedTypeDescriptionKey'); + late final _CFURLCreateDataPtr = _lookup< + ffi.NativeFunction< + CFDataRef Function(CFAllocatorRef, CFURLRef, CFStringEncoding, + Boolean)>>('CFURLCreateData'); + late final _CFURLCreateData = _CFURLCreateDataPtr.asFunction< + CFDataRef Function(CFAllocatorRef, CFURLRef, int, int)>(); - CFStringRef get kCFURLLocalizedTypeDescriptionKey => - _kCFURLLocalizedTypeDescriptionKey.value; + CFURLRef CFURLCreateWithString( + CFAllocatorRef allocator, + CFStringRef URLString, + CFURLRef baseURL, + ) { + return _CFURLCreateWithString( + allocator, + URLString, + baseURL, + ); + } - set kCFURLLocalizedTypeDescriptionKey(CFStringRef value) => - _kCFURLLocalizedTypeDescriptionKey.value = value; + late final _CFURLCreateWithStringPtr = _lookup< + ffi.NativeFunction< + CFURLRef Function( + CFAllocatorRef, CFStringRef, CFURLRef)>>('CFURLCreateWithString'); + late final _CFURLCreateWithString = _CFURLCreateWithStringPtr.asFunction< + CFURLRef Function(CFAllocatorRef, CFStringRef, CFURLRef)>(); - late final ffi.Pointer _kCFURLLabelNumberKey = - _lookup('kCFURLLabelNumberKey'); + CFURLRef CFURLCreateAbsoluteURLWithBytes( + CFAllocatorRef alloc, + ffi.Pointer relativeURLBytes, + int length, + int encoding, + CFURLRef baseURL, + int useCompatibilityMode, + ) { + return _CFURLCreateAbsoluteURLWithBytes( + alloc, + relativeURLBytes, + length, + encoding, + baseURL, + useCompatibilityMode, + ); + } - CFStringRef get kCFURLLabelNumberKey => _kCFURLLabelNumberKey.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)>(); - set kCFURLLabelNumberKey(CFStringRef value) => - _kCFURLLabelNumberKey.value = value; + CFURLRef CFURLCreateWithFileSystemPath( + CFAllocatorRef allocator, + CFStringRef filePath, + int pathStyle, + int isDirectory, + ) { + return _CFURLCreateWithFileSystemPath( + allocator, + filePath, + pathStyle, + isDirectory, + ); + } - late final ffi.Pointer _kCFURLLabelColorKey = - _lookup('kCFURLLabelColorKey'); + late final _CFURLCreateWithFileSystemPathPtr = _lookup< + ffi.NativeFunction< + CFURLRef Function(CFAllocatorRef, CFStringRef, ffi.Int32, + Boolean)>>('CFURLCreateWithFileSystemPath'); + late final _CFURLCreateWithFileSystemPath = _CFURLCreateWithFileSystemPathPtr + .asFunction(); - CFStringRef get kCFURLLabelColorKey => _kCFURLLabelColorKey.value; + CFURLRef CFURLCreateFromFileSystemRepresentation( + CFAllocatorRef allocator, + ffi.Pointer buffer, + int bufLen, + int isDirectory, + ) { + return _CFURLCreateFromFileSystemRepresentation( + allocator, + buffer, + bufLen, + isDirectory, + ); + } - set kCFURLLabelColorKey(CFStringRef value) => - _kCFURLLabelColorKey.value = value; + 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)>(); - late final ffi.Pointer _kCFURLLocalizedLabelKey = - _lookup('kCFURLLocalizedLabelKey'); + CFURLRef CFURLCreateWithFileSystemPathRelativeToBase( + CFAllocatorRef allocator, + CFStringRef filePath, + int pathStyle, + int isDirectory, + CFURLRef baseURL, + ) { + return _CFURLCreateWithFileSystemPathRelativeToBase( + allocator, + filePath, + pathStyle, + isDirectory, + baseURL, + ); + } - CFStringRef get kCFURLLocalizedLabelKey => _kCFURLLocalizedLabelKey.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)>(); - set kCFURLLocalizedLabelKey(CFStringRef value) => - _kCFURLLocalizedLabelKey.value = value; + CFURLRef CFURLCreateFromFileSystemRepresentationRelativeToBase( + CFAllocatorRef allocator, + ffi.Pointer buffer, + int bufLen, + int isDirectory, + CFURLRef baseURL, + ) { + return _CFURLCreateFromFileSystemRepresentationRelativeToBase( + allocator, + buffer, + bufLen, + isDirectory, + baseURL, + ); + } - late final ffi.Pointer _kCFURLEffectiveIconKey = - _lookup('kCFURLEffectiveIconKey'); + 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)>(); - CFStringRef get kCFURLEffectiveIconKey => _kCFURLEffectiveIconKey.value; + int CFURLGetFileSystemRepresentation( + CFURLRef url, + int resolveAgainstBase, + ffi.Pointer buffer, + int maxBufLen, + ) { + return _CFURLGetFileSystemRepresentation( + url, + resolveAgainstBase, + buffer, + maxBufLen, + ); + } - set kCFURLEffectiveIconKey(CFStringRef value) => - _kCFURLEffectiveIconKey.value = 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)>(); - late final ffi.Pointer _kCFURLCustomIconKey = - _lookup('kCFURLCustomIconKey'); + CFURLRef CFURLCopyAbsoluteURL( + CFURLRef relativeURL, + ) { + return _CFURLCopyAbsoluteURL( + relativeURL, + ); + } - CFStringRef get kCFURLCustomIconKey => _kCFURLCustomIconKey.value; + late final _CFURLCopyAbsoluteURLPtr = + _lookup>( + 'CFURLCopyAbsoluteURL'); + late final _CFURLCopyAbsoluteURL = + _CFURLCopyAbsoluteURLPtr.asFunction(); - set kCFURLCustomIconKey(CFStringRef value) => - _kCFURLCustomIconKey.value = value; + CFStringRef CFURLGetString( + CFURLRef anURL, + ) { + return _CFURLGetString( + anURL, + ); + } - late final ffi.Pointer _kCFURLFileResourceIdentifierKey = - _lookup('kCFURLFileResourceIdentifierKey'); + late final _CFURLGetStringPtr = + _lookup>( + 'CFURLGetString'); + late final _CFURLGetString = + _CFURLGetStringPtr.asFunction(); - CFStringRef get kCFURLFileResourceIdentifierKey => - _kCFURLFileResourceIdentifierKey.value; + CFURLRef CFURLGetBaseURL( + CFURLRef anURL, + ) { + return _CFURLGetBaseURL( + anURL, + ); + } - set kCFURLFileResourceIdentifierKey(CFStringRef value) => - _kCFURLFileResourceIdentifierKey.value = value; + late final _CFURLGetBaseURLPtr = + _lookup>( + 'CFURLGetBaseURL'); + late final _CFURLGetBaseURL = + _CFURLGetBaseURLPtr.asFunction(); - 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; - - late final ffi.Pointer _kCFURLCanonicalPathKey = - _lookup('kCFURLCanonicalPathKey'); + CFStringRef CFURLCopyQueryString( + CFURLRef anURL, + CFStringRef charactersToLeaveEscaped, + ) { + return _CFURLCopyQueryString( + anURL, + charactersToLeaveEscaped, + ); + } - CFStringRef get kCFURLCanonicalPathKey => _kCFURLCanonicalPathKey.value; + late final _CFURLCopyQueryStringPtr = + _lookup>( + 'CFURLCopyQueryString'); + late final _CFURLCopyQueryString = _CFURLCopyQueryStringPtr.asFunction< + CFStringRef Function(CFURLRef, CFStringRef)>(); - set kCFURLCanonicalPathKey(CFStringRef value) => - _kCFURLCanonicalPathKey.value = value; + CFStringRef CFURLCopyFragment( + CFURLRef anURL, + CFStringRef charactersToLeaveEscaped, + ) { + return _CFURLCopyFragment( + anURL, + charactersToLeaveEscaped, + ); + } - late final ffi.Pointer _kCFURLIsMountTriggerKey = - _lookup('kCFURLIsMountTriggerKey'); + late final _CFURLCopyFragmentPtr = + _lookup>( + 'CFURLCopyFragment'); + late final _CFURLCopyFragment = _CFURLCopyFragmentPtr.asFunction< + CFStringRef Function(CFURLRef, CFStringRef)>(); - CFStringRef get kCFURLIsMountTriggerKey => _kCFURLIsMountTriggerKey.value; + CFStringRef CFURLCopyLastPathComponent( + CFURLRef url, + ) { + return _CFURLCopyLastPathComponent( + url, + ); + } - set kCFURLIsMountTriggerKey(CFStringRef value) => - _kCFURLIsMountTriggerKey.value = value; + late final _CFURLCopyLastPathComponentPtr = + _lookup>( + 'CFURLCopyLastPathComponent'); + late final _CFURLCopyLastPathComponent = _CFURLCopyLastPathComponentPtr + .asFunction(); - late final ffi.Pointer _kCFURLGenerationIdentifierKey = - _lookup('kCFURLGenerationIdentifierKey'); + CFStringRef CFURLCopyPathExtension( + CFURLRef url, + ) { + return _CFURLCopyPathExtension( + url, + ); + } - CFStringRef get kCFURLGenerationIdentifierKey => - _kCFURLGenerationIdentifierKey.value; + late final _CFURLCopyPathExtensionPtr = + _lookup>( + 'CFURLCopyPathExtension'); + late final _CFURLCopyPathExtension = + _CFURLCopyPathExtensionPtr.asFunction(); - set kCFURLGenerationIdentifierKey(CFStringRef value) => - _kCFURLGenerationIdentifierKey.value = value; + CFURLRef CFURLCreateCopyAppendingPathComponent( + CFAllocatorRef allocator, + CFURLRef url, + CFStringRef pathComponent, + int isDirectory, + ) { + return _CFURLCreateCopyAppendingPathComponent( + allocator, + url, + pathComponent, + isDirectory, + ); + } - late final ffi.Pointer _kCFURLDocumentIdentifierKey = - _lookup('kCFURLDocumentIdentifierKey'); + late final _CFURLCreateCopyAppendingPathComponentPtr = _lookup< + ffi.NativeFunction< + CFURLRef Function(CFAllocatorRef, CFURLRef, CFStringRef, + Boolean)>>('CFURLCreateCopyAppendingPathComponent'); + late final _CFURLCreateCopyAppendingPathComponent = + _CFURLCreateCopyAppendingPathComponentPtr.asFunction< + CFURLRef Function(CFAllocatorRef, CFURLRef, CFStringRef, int)>(); - CFStringRef get kCFURLDocumentIdentifierKey => - _kCFURLDocumentIdentifierKey.value; + CFURLRef CFURLCreateCopyDeletingLastPathComponent( + CFAllocatorRef allocator, + CFURLRef url, + ) { + return _CFURLCreateCopyDeletingLastPathComponent( + allocator, + url, + ); + } - set kCFURLDocumentIdentifierKey(CFStringRef value) => - _kCFURLDocumentIdentifierKey.value = value; + late final _CFURLCreateCopyDeletingLastPathComponentPtr = + _lookup>( + 'CFURLCreateCopyDeletingLastPathComponent'); + late final _CFURLCreateCopyDeletingLastPathComponent = + _CFURLCreateCopyDeletingLastPathComponentPtr.asFunction< + CFURLRef Function(CFAllocatorRef, CFURLRef)>(); - late final ffi.Pointer _kCFURLAddedToDirectoryDateKey = - _lookup('kCFURLAddedToDirectoryDateKey'); + CFURLRef CFURLCreateCopyAppendingPathExtension( + CFAllocatorRef allocator, + CFURLRef url, + CFStringRef extension1, + ) { + return _CFURLCreateCopyAppendingPathExtension( + allocator, + url, + extension1, + ); + } - CFStringRef get kCFURLAddedToDirectoryDateKey => - _kCFURLAddedToDirectoryDateKey.value; + late final _CFURLCreateCopyAppendingPathExtensionPtr = _lookup< + ffi.NativeFunction< + CFURLRef Function(CFAllocatorRef, CFURLRef, + CFStringRef)>>('CFURLCreateCopyAppendingPathExtension'); + late final _CFURLCreateCopyAppendingPathExtension = + _CFURLCreateCopyAppendingPathExtensionPtr.asFunction< + CFURLRef Function(CFAllocatorRef, CFURLRef, CFStringRef)>(); - set kCFURLAddedToDirectoryDateKey(CFStringRef value) => - _kCFURLAddedToDirectoryDateKey.value = value; + CFURLRef CFURLCreateCopyDeletingPathExtension( + CFAllocatorRef allocator, + CFURLRef url, + ) { + return _CFURLCreateCopyDeletingPathExtension( + allocator, + url, + ); + } - late final ffi.Pointer _kCFURLQuarantinePropertiesKey = - _lookup('kCFURLQuarantinePropertiesKey'); + late final _CFURLCreateCopyDeletingPathExtensionPtr = + _lookup>( + 'CFURLCreateCopyDeletingPathExtension'); + late final _CFURLCreateCopyDeletingPathExtension = + _CFURLCreateCopyDeletingPathExtensionPtr.asFunction< + CFURLRef Function(CFAllocatorRef, CFURLRef)>(); - CFStringRef get kCFURLQuarantinePropertiesKey => - _kCFURLQuarantinePropertiesKey.value; + int CFURLGetBytes( + CFURLRef url, + ffi.Pointer buffer, + int bufferLength, + ) { + return _CFURLGetBytes( + url, + buffer, + bufferLength, + ); + } - set kCFURLQuarantinePropertiesKey(CFStringRef value) => - _kCFURLQuarantinePropertiesKey.value = 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)>(); - late final ffi.Pointer _kCFURLFileResourceTypeKey = - _lookup('kCFURLFileResourceTypeKey'); + CFRange CFURLGetByteRangeForComponent( + CFURLRef url, + int component, + ffi.Pointer rangeIncludingSeparators, + ) { + return _CFURLGetByteRangeForComponent( + url, + component, + rangeIncludingSeparators, + ); + } - CFStringRef get kCFURLFileResourceTypeKey => _kCFURLFileResourceTypeKey.value; + late final _CFURLGetByteRangeForComponentPtr = _lookup< + ffi.NativeFunction< + CFRange Function(CFURLRef, ffi.Int32, + ffi.Pointer)>>('CFURLGetByteRangeForComponent'); + late final _CFURLGetByteRangeForComponent = _CFURLGetByteRangeForComponentPtr + .asFunction)>(); - set kCFURLFileResourceTypeKey(CFStringRef value) => - _kCFURLFileResourceTypeKey.value = value; + CFStringRef CFURLCreateStringByReplacingPercentEscapes( + CFAllocatorRef allocator, + CFStringRef originalString, + CFStringRef charactersToLeaveEscaped, + ) { + return _CFURLCreateStringByReplacingPercentEscapes( + allocator, + originalString, + charactersToLeaveEscaped, + ); + } - late final ffi.Pointer _kCFURLFileResourceTypeNamedPipe = - _lookup('kCFURLFileResourceTypeNamedPipe'); + late final _CFURLCreateStringByReplacingPercentEscapesPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, CFStringRef, + CFStringRef)>>('CFURLCreateStringByReplacingPercentEscapes'); + late final _CFURLCreateStringByReplacingPercentEscapes = + _CFURLCreateStringByReplacingPercentEscapesPtr.asFunction< + CFStringRef Function(CFAllocatorRef, CFStringRef, CFStringRef)>(); - CFStringRef get kCFURLFileResourceTypeNamedPipe => - _kCFURLFileResourceTypeNamedPipe.value; + CFStringRef CFURLCreateStringByReplacingPercentEscapesUsingEncoding( + CFAllocatorRef allocator, + CFStringRef origString, + CFStringRef charsToLeaveEscaped, + int encoding, + ) { + return _CFURLCreateStringByReplacingPercentEscapesUsingEncoding( + allocator, + origString, + charsToLeaveEscaped, + encoding, + ); + } - set kCFURLFileResourceTypeNamedPipe(CFStringRef value) => - _kCFURLFileResourceTypeNamedPipe.value = 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)>(); - late final ffi.Pointer _kCFURLFileResourceTypeCharacterSpecial = - _lookup('kCFURLFileResourceTypeCharacterSpecial'); + CFStringRef CFURLCreateStringByAddingPercentEscapes( + CFAllocatorRef allocator, + CFStringRef originalString, + CFStringRef charactersToLeaveUnescaped, + CFStringRef legalURLCharactersToBeEscaped, + int encoding, + ) { + return _CFURLCreateStringByAddingPercentEscapes( + allocator, + originalString, + charactersToLeaveUnescaped, + legalURLCharactersToBeEscaped, + encoding, + ); + } - CFStringRef get kCFURLFileResourceTypeCharacterSpecial => - _kCFURLFileResourceTypeCharacterSpecial.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)>(); - set kCFURLFileResourceTypeCharacterSpecial(CFStringRef value) => - _kCFURLFileResourceTypeCharacterSpecial.value = value; + int CFURLIsFileReferenceURL( + CFURLRef url, + ) { + return _CFURLIsFileReferenceURL( + url, + ); + } - late final ffi.Pointer _kCFURLFileResourceTypeDirectory = - _lookup('kCFURLFileResourceTypeDirectory'); + late final _CFURLIsFileReferenceURLPtr = + _lookup>( + 'CFURLIsFileReferenceURL'); + late final _CFURLIsFileReferenceURL = + _CFURLIsFileReferenceURLPtr.asFunction(); - CFStringRef get kCFURLFileResourceTypeDirectory => - _kCFURLFileResourceTypeDirectory.value; + CFURLRef CFURLCreateFileReferenceURL( + CFAllocatorRef allocator, + CFURLRef url, + ffi.Pointer error, + ) { + return _CFURLCreateFileReferenceURL( + allocator, + url, + error, + ); + } - 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>( + '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)>>( + '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; - - set kCFURLVolumeSupportsFileCloningKey(CFStringRef value) => - _kCFURLVolumeSupportsFileCloningKey.value = value; + late final ffi.Pointer _kCFURLCanonicalPathKey = + _lookup('kCFURLCanonicalPathKey'); - late final ffi.Pointer _kCFURLVolumeSupportsSwapRenamingKey = - _lookup('kCFURLVolumeSupportsSwapRenamingKey'); + CFStringRef get kCFURLCanonicalPathKey => _kCFURLCanonicalPathKey.value; - CFStringRef get kCFURLVolumeSupportsSwapRenamingKey => - _kCFURLVolumeSupportsSwapRenamingKey.value; + set kCFURLCanonicalPathKey(CFStringRef value) => + _kCFURLCanonicalPathKey.value = value; - set kCFURLVolumeSupportsSwapRenamingKey(CFStringRef value) => - _kCFURLVolumeSupportsSwapRenamingKey.value = value; + late final ffi.Pointer _kCFURLIsMountTriggerKey = + _lookup('kCFURLIsMountTriggerKey'); - late final ffi.Pointer - _kCFURLVolumeSupportsExclusiveRenamingKey = - _lookup('kCFURLVolumeSupportsExclusiveRenamingKey'); + CFStringRef get kCFURLIsMountTriggerKey => _kCFURLIsMountTriggerKey.value; - CFStringRef get kCFURLVolumeSupportsExclusiveRenamingKey => - _kCFURLVolumeSupportsExclusiveRenamingKey.value; + set kCFURLIsMountTriggerKey(CFStringRef value) => + _kCFURLIsMountTriggerKey.value = value; - set kCFURLVolumeSupportsExclusiveRenamingKey(CFStringRef value) => - _kCFURLVolumeSupportsExclusiveRenamingKey.value = value; + late final ffi.Pointer _kCFURLGenerationIdentifierKey = + _lookup('kCFURLGenerationIdentifierKey'); - late final ffi.Pointer _kCFURLVolumeSupportsImmutableFilesKey = - _lookup('kCFURLVolumeSupportsImmutableFilesKey'); + CFStringRef get kCFURLGenerationIdentifierKey => + _kCFURLGenerationIdentifierKey.value; - CFStringRef get kCFURLVolumeSupportsImmutableFilesKey => - _kCFURLVolumeSupportsImmutableFilesKey.value; + set kCFURLGenerationIdentifierKey(CFStringRef value) => + _kCFURLGenerationIdentifierKey.value = value; - set kCFURLVolumeSupportsImmutableFilesKey(CFStringRef value) => - _kCFURLVolumeSupportsImmutableFilesKey.value = value; + late final ffi.Pointer _kCFURLDocumentIdentifierKey = + _lookup('kCFURLDocumentIdentifierKey'); - late final ffi.Pointer - _kCFURLVolumeSupportsAccessPermissionsKey = - _lookup('kCFURLVolumeSupportsAccessPermissionsKey'); + CFStringRef get kCFURLDocumentIdentifierKey => + _kCFURLDocumentIdentifierKey.value; - CFStringRef get kCFURLVolumeSupportsAccessPermissionsKey => - _kCFURLVolumeSupportsAccessPermissionsKey.value; + set kCFURLDocumentIdentifierKey(CFStringRef value) => + _kCFURLDocumentIdentifierKey.value = value; - set kCFURLVolumeSupportsAccessPermissionsKey(CFStringRef value) => - _kCFURLVolumeSupportsAccessPermissionsKey.value = value; + late final ffi.Pointer _kCFURLAddedToDirectoryDateKey = + _lookup('kCFURLAddedToDirectoryDateKey'); - late final ffi.Pointer _kCFURLVolumeSupportsFileProtectionKey = - _lookup('kCFURLVolumeSupportsFileProtectionKey'); + CFStringRef get kCFURLAddedToDirectoryDateKey => + _kCFURLAddedToDirectoryDateKey.value; - CFStringRef get kCFURLVolumeSupportsFileProtectionKey => - _kCFURLVolumeSupportsFileProtectionKey.value; + set kCFURLAddedToDirectoryDateKey(CFStringRef value) => + _kCFURLAddedToDirectoryDateKey.value = value; - set kCFURLVolumeSupportsFileProtectionKey(CFStringRef value) => - _kCFURLVolumeSupportsFileProtectionKey.value = value; + late final ffi.Pointer _kCFURLQuarantinePropertiesKey = + _lookup('kCFURLQuarantinePropertiesKey'); - late final ffi.Pointer _kCFURLIsUbiquitousItemKey = - _lookup('kCFURLIsUbiquitousItemKey'); + CFStringRef get kCFURLQuarantinePropertiesKey => + _kCFURLQuarantinePropertiesKey.value; - CFStringRef get kCFURLIsUbiquitousItemKey => _kCFURLIsUbiquitousItemKey.value; + set kCFURLQuarantinePropertiesKey(CFStringRef value) => + _kCFURLQuarantinePropertiesKey.value = value; - set kCFURLIsUbiquitousItemKey(CFStringRef value) => - _kCFURLIsUbiquitousItemKey.value = value; + late final ffi.Pointer _kCFURLFileResourceTypeKey = + _lookup('kCFURLFileResourceTypeKey'); - late final ffi.Pointer - _kCFURLUbiquitousItemHasUnresolvedConflictsKey = - _lookup('kCFURLUbiquitousItemHasUnresolvedConflictsKey'); + CFStringRef get kCFURLFileResourceTypeKey => _kCFURLFileResourceTypeKey.value; - CFStringRef get kCFURLUbiquitousItemHasUnresolvedConflictsKey => - _kCFURLUbiquitousItemHasUnresolvedConflictsKey.value; + set kCFURLFileResourceTypeKey(CFStringRef value) => + _kCFURLFileResourceTypeKey.value = value; - set kCFURLUbiquitousItemHasUnresolvedConflictsKey(CFStringRef value) => - _kCFURLUbiquitousItemHasUnresolvedConflictsKey.value = value; + late final ffi.Pointer _kCFURLFileResourceTypeNamedPipe = + _lookup('kCFURLFileResourceTypeNamedPipe'); - late final ffi.Pointer _kCFURLUbiquitousItemIsDownloadedKey = - _lookup('kCFURLUbiquitousItemIsDownloadedKey'); + CFStringRef get kCFURLFileResourceTypeNamedPipe => + _kCFURLFileResourceTypeNamedPipe.value; - CFStringRef get kCFURLUbiquitousItemIsDownloadedKey => - _kCFURLUbiquitousItemIsDownloadedKey.value; + set kCFURLFileResourceTypeNamedPipe(CFStringRef value) => + _kCFURLFileResourceTypeNamedPipe.value = value; - set kCFURLUbiquitousItemIsDownloadedKey(CFStringRef value) => - _kCFURLUbiquitousItemIsDownloadedKey.value = value; + late final ffi.Pointer _kCFURLFileResourceTypeCharacterSpecial = + _lookup('kCFURLFileResourceTypeCharacterSpecial'); - late final ffi.Pointer _kCFURLUbiquitousItemIsDownloadingKey = - _lookup('kCFURLUbiquitousItemIsDownloadingKey'); + CFStringRef get kCFURLFileResourceTypeCharacterSpecial => + _kCFURLFileResourceTypeCharacterSpecial.value; - CFStringRef get kCFURLUbiquitousItemIsDownloadingKey => - _kCFURLUbiquitousItemIsDownloadingKey.value; + set kCFURLFileResourceTypeCharacterSpecial(CFStringRef value) => + _kCFURLFileResourceTypeCharacterSpecial.value = value; - set kCFURLUbiquitousItemIsDownloadingKey(CFStringRef value) => - _kCFURLUbiquitousItemIsDownloadingKey.value = value; + late final ffi.Pointer _kCFURLFileResourceTypeDirectory = + _lookup('kCFURLFileResourceTypeDirectory'); - late final ffi.Pointer _kCFURLUbiquitousItemIsUploadedKey = - _lookup('kCFURLUbiquitousItemIsUploadedKey'); + CFStringRef get kCFURLFileResourceTypeDirectory => + _kCFURLFileResourceTypeDirectory.value; - CFStringRef get kCFURLUbiquitousItemIsUploadedKey => - _kCFURLUbiquitousItemIsUploadedKey.value; + set kCFURLFileResourceTypeDirectory(CFStringRef value) => + _kCFURLFileResourceTypeDirectory.value = value; - set kCFURLUbiquitousItemIsUploadedKey(CFStringRef value) => - _kCFURLUbiquitousItemIsUploadedKey.value = value; + late final ffi.Pointer _kCFURLFileResourceTypeBlockSpecial = + _lookup('kCFURLFileResourceTypeBlockSpecial'); - late final ffi.Pointer _kCFURLUbiquitousItemIsUploadingKey = - _lookup('kCFURLUbiquitousItemIsUploadingKey'); + CFStringRef get kCFURLFileResourceTypeBlockSpecial => + _kCFURLFileResourceTypeBlockSpecial.value; - CFStringRef get kCFURLUbiquitousItemIsUploadingKey => - _kCFURLUbiquitousItemIsUploadingKey.value; + set kCFURLFileResourceTypeBlockSpecial(CFStringRef value) => + _kCFURLFileResourceTypeBlockSpecial.value = value; - set kCFURLUbiquitousItemIsUploadingKey(CFStringRef value) => - _kCFURLUbiquitousItemIsUploadingKey.value = value; + late final ffi.Pointer _kCFURLFileResourceTypeRegular = + _lookup('kCFURLFileResourceTypeRegular'); - late final ffi.Pointer - _kCFURLUbiquitousItemPercentDownloadedKey = - _lookup('kCFURLUbiquitousItemPercentDownloadedKey'); + CFStringRef get kCFURLFileResourceTypeRegular => + _kCFURLFileResourceTypeRegular.value; - CFStringRef get kCFURLUbiquitousItemPercentDownloadedKey => - _kCFURLUbiquitousItemPercentDownloadedKey.value; + set kCFURLFileResourceTypeRegular(CFStringRef value) => + _kCFURLFileResourceTypeRegular.value = value; - set kCFURLUbiquitousItemPercentDownloadedKey(CFStringRef value) => - _kCFURLUbiquitousItemPercentDownloadedKey.value = value; + late final ffi.Pointer _kCFURLFileResourceTypeSymbolicLink = + _lookup('kCFURLFileResourceTypeSymbolicLink'); - late final ffi.Pointer _kCFURLUbiquitousItemPercentUploadedKey = - _lookup('kCFURLUbiquitousItemPercentUploadedKey'); + CFStringRef get kCFURLFileResourceTypeSymbolicLink => + _kCFURLFileResourceTypeSymbolicLink.value; - CFStringRef get kCFURLUbiquitousItemPercentUploadedKey => - _kCFURLUbiquitousItemPercentUploadedKey.value; + set kCFURLFileResourceTypeSymbolicLink(CFStringRef value) => + _kCFURLFileResourceTypeSymbolicLink.value = value; - set kCFURLUbiquitousItemPercentUploadedKey(CFStringRef value) => - _kCFURLUbiquitousItemPercentUploadedKey.value = value; + late final ffi.Pointer _kCFURLFileResourceTypeSocket = + _lookup('kCFURLFileResourceTypeSocket'); - late final ffi.Pointer - _kCFURLUbiquitousItemDownloadingStatusKey = - _lookup('kCFURLUbiquitousItemDownloadingStatusKey'); + CFStringRef get kCFURLFileResourceTypeSocket => + _kCFURLFileResourceTypeSocket.value; - CFStringRef get kCFURLUbiquitousItemDownloadingStatusKey => - _kCFURLUbiquitousItemDownloadingStatusKey.value; + set kCFURLFileResourceTypeSocket(CFStringRef value) => + _kCFURLFileResourceTypeSocket.value = value; - set kCFURLUbiquitousItemDownloadingStatusKey(CFStringRef value) => - _kCFURLUbiquitousItemDownloadingStatusKey.value = value; + late final ffi.Pointer _kCFURLFileResourceTypeUnknown = + _lookup('kCFURLFileResourceTypeUnknown'); - late final ffi.Pointer _kCFURLUbiquitousItemDownloadingErrorKey = - _lookup('kCFURLUbiquitousItemDownloadingErrorKey'); + CFStringRef get kCFURLFileResourceTypeUnknown => + _kCFURLFileResourceTypeUnknown.value; - CFStringRef get kCFURLUbiquitousItemDownloadingErrorKey => - _kCFURLUbiquitousItemDownloadingErrorKey.value; + set kCFURLFileResourceTypeUnknown(CFStringRef value) => + _kCFURLFileResourceTypeUnknown.value = value; - set kCFURLUbiquitousItemDownloadingErrorKey(CFStringRef value) => - _kCFURLUbiquitousItemDownloadingErrorKey.value = value; + late final ffi.Pointer _kCFURLFileSizeKey = + _lookup('kCFURLFileSizeKey'); - late final ffi.Pointer _kCFURLUbiquitousItemUploadingErrorKey = - _lookup('kCFURLUbiquitousItemUploadingErrorKey'); + CFStringRef get kCFURLFileSizeKey => _kCFURLFileSizeKey.value; - CFStringRef get kCFURLUbiquitousItemUploadingErrorKey => - _kCFURLUbiquitousItemUploadingErrorKey.value; + set kCFURLFileSizeKey(CFStringRef value) => _kCFURLFileSizeKey.value = value; - set kCFURLUbiquitousItemUploadingErrorKey(CFStringRef value) => - _kCFURLUbiquitousItemUploadingErrorKey.value = value; + late final ffi.Pointer _kCFURLFileAllocatedSizeKey = + _lookup('kCFURLFileAllocatedSizeKey'); - late final ffi.Pointer - _kCFURLUbiquitousItemIsExcludedFromSyncKey = - _lookup('kCFURLUbiquitousItemIsExcludedFromSyncKey'); + CFStringRef get kCFURLFileAllocatedSizeKey => + _kCFURLFileAllocatedSizeKey.value; - CFStringRef get kCFURLUbiquitousItemIsExcludedFromSyncKey => - _kCFURLUbiquitousItemIsExcludedFromSyncKey.value; + set kCFURLFileAllocatedSizeKey(CFStringRef value) => + _kCFURLFileAllocatedSizeKey.value = value; - set kCFURLUbiquitousItemIsExcludedFromSyncKey(CFStringRef value) => - _kCFURLUbiquitousItemIsExcludedFromSyncKey.value = value; + late final ffi.Pointer _kCFURLTotalFileSizeKey = + _lookup('kCFURLTotalFileSizeKey'); - late final ffi.Pointer - _kCFURLUbiquitousItemDownloadingStatusNotDownloaded = - _lookup( - 'kCFURLUbiquitousItemDownloadingStatusNotDownloaded'); + CFStringRef get kCFURLTotalFileSizeKey => _kCFURLTotalFileSizeKey.value; - CFStringRef get kCFURLUbiquitousItemDownloadingStatusNotDownloaded => - _kCFURLUbiquitousItemDownloadingStatusNotDownloaded.value; + set kCFURLTotalFileSizeKey(CFStringRef value) => + _kCFURLTotalFileSizeKey.value = value; - set kCFURLUbiquitousItemDownloadingStatusNotDownloaded(CFStringRef value) => - _kCFURLUbiquitousItemDownloadingStatusNotDownloaded.value = value; + late final ffi.Pointer _kCFURLTotalFileAllocatedSizeKey = + _lookup('kCFURLTotalFileAllocatedSizeKey'); - late final ffi.Pointer - _kCFURLUbiquitousItemDownloadingStatusDownloaded = - _lookup('kCFURLUbiquitousItemDownloadingStatusDownloaded'); + CFStringRef get kCFURLTotalFileAllocatedSizeKey => + _kCFURLTotalFileAllocatedSizeKey.value; - CFStringRef get kCFURLUbiquitousItemDownloadingStatusDownloaded => - _kCFURLUbiquitousItemDownloadingStatusDownloaded.value; + set kCFURLTotalFileAllocatedSizeKey(CFStringRef value) => + _kCFURLTotalFileAllocatedSizeKey.value = value; - set kCFURLUbiquitousItemDownloadingStatusDownloaded(CFStringRef value) => - _kCFURLUbiquitousItemDownloadingStatusDownloaded.value = value; + late final ffi.Pointer _kCFURLIsAliasFileKey = + _lookup('kCFURLIsAliasFileKey'); - late final ffi.Pointer - _kCFURLUbiquitousItemDownloadingStatusCurrent = - _lookup('kCFURLUbiquitousItemDownloadingStatusCurrent'); + CFStringRef get kCFURLIsAliasFileKey => _kCFURLIsAliasFileKey.value; - CFStringRef get kCFURLUbiquitousItemDownloadingStatusCurrent => - _kCFURLUbiquitousItemDownloadingStatusCurrent.value; + set kCFURLIsAliasFileKey(CFStringRef value) => + _kCFURLIsAliasFileKey.value = value; - set kCFURLUbiquitousItemDownloadingStatusCurrent(CFStringRef value) => - _kCFURLUbiquitousItemDownloadingStatusCurrent.value = value; + late final ffi.Pointer _kCFURLFileProtectionKey = + _lookup('kCFURLFileProtectionKey'); - CFDataRef CFURLCreateBookmarkData( - CFAllocatorRef allocator, - CFURLRef url, - int options, - CFArrayRef resourcePropertiesToInclude, - CFURLRef relativeToURL, - ffi.Pointer error, - ) { - return _CFURLCreateBookmarkData( - allocator, - url, - options, - resourcePropertiesToInclude, - relativeToURL, - error, - ); - } + CFStringRef get kCFURLFileProtectionKey => _kCFURLFileProtectionKey.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)>(); + set kCFURLFileProtectionKey(CFStringRef value) => + _kCFURLFileProtectionKey.value = 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, - ); - } + late final ffi.Pointer _kCFURLFileProtectionNone = + _lookup('kCFURLFileProtectionNone'); - 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)>(); + CFStringRef get kCFURLFileProtectionNone => _kCFURLFileProtectionNone.value; - CFDictionaryRef CFURLCreateResourcePropertiesForKeysFromBookmarkData( - CFAllocatorRef allocator, - CFArrayRef resourcePropertiesToReturn, - CFDataRef bookmark, - ) { - return _CFURLCreateResourcePropertiesForKeysFromBookmarkData( - allocator, - resourcePropertiesToReturn, - bookmark, - ); - } + set kCFURLFileProtectionNone(CFStringRef value) => + _kCFURLFileProtectionNone.value = value; - late final _CFURLCreateResourcePropertiesForKeysFromBookmarkDataPtr = _lookup< - ffi.NativeFunction< - CFDictionaryRef Function(CFAllocatorRef, CFArrayRef, CFDataRef)>>( - 'CFURLCreateResourcePropertiesForKeysFromBookmarkData'); - late final _CFURLCreateResourcePropertiesForKeysFromBookmarkData = - _CFURLCreateResourcePropertiesForKeysFromBookmarkDataPtr.asFunction< - CFDictionaryRef Function(CFAllocatorRef, CFArrayRef, CFDataRef)>(); + late final ffi.Pointer _kCFURLFileProtectionComplete = + _lookup('kCFURLFileProtectionComplete'); - CFTypeRef CFURLCreateResourcePropertyForKeyFromBookmarkData( - CFAllocatorRef allocator, - CFStringRef resourcePropertyKey, - CFDataRef bookmark, - ) { - return _CFURLCreateResourcePropertyForKeyFromBookmarkData( - allocator, - resourcePropertyKey, - bookmark, - ); - } + CFStringRef get kCFURLFileProtectionComplete => + _kCFURLFileProtectionComplete.value; - late final _CFURLCreateResourcePropertyForKeyFromBookmarkDataPtr = _lookup< - ffi.NativeFunction< - CFTypeRef Function(CFAllocatorRef, CFStringRef, - CFDataRef)>>('CFURLCreateResourcePropertyForKeyFromBookmarkData'); - late final _CFURLCreateResourcePropertyForKeyFromBookmarkData = - _CFURLCreateResourcePropertyForKeyFromBookmarkDataPtr.asFunction< - CFTypeRef Function(CFAllocatorRef, CFStringRef, CFDataRef)>(); + set kCFURLFileProtectionComplete(CFStringRef value) => + _kCFURLFileProtectionComplete.value = value; - CFDataRef CFURLCreateBookmarkDataFromFile( - CFAllocatorRef allocator, - CFURLRef fileURL, - ffi.Pointer errorRef, - ) { - return _CFURLCreateBookmarkDataFromFile( - allocator, - fileURL, - errorRef, - ); - } + late final ffi.Pointer _kCFURLFileProtectionCompleteUnlessOpen = + _lookup('kCFURLFileProtectionCompleteUnlessOpen'); - late final _CFURLCreateBookmarkDataFromFilePtr = _lookup< - ffi.NativeFunction< - CFDataRef Function(CFAllocatorRef, CFURLRef, - ffi.Pointer)>>('CFURLCreateBookmarkDataFromFile'); - late final _CFURLCreateBookmarkDataFromFile = - _CFURLCreateBookmarkDataFromFilePtr.asFunction< - CFDataRef Function( - CFAllocatorRef, CFURLRef, ffi.Pointer)>(); + CFStringRef get kCFURLFileProtectionCompleteUnlessOpen => + _kCFURLFileProtectionCompleteUnlessOpen.value; - int CFURLWriteBookmarkDataToFile( - CFDataRef bookmarkRef, - CFURLRef fileURL, - int options, - ffi.Pointer errorRef, - ) { - return _CFURLWriteBookmarkDataToFile( - bookmarkRef, - fileURL, - options, - errorRef, - ); - } + set kCFURLFileProtectionCompleteUnlessOpen(CFStringRef value) => + _kCFURLFileProtectionCompleteUnlessOpen.value = 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)>(); + late final ffi.Pointer + _kCFURLFileProtectionCompleteUntilFirstUserAuthentication = + _lookup( + 'kCFURLFileProtectionCompleteUntilFirstUserAuthentication'); - CFDataRef CFURLCreateBookmarkDataFromAliasRecord( - CFAllocatorRef allocatorRef, - CFDataRef aliasRecordDataRef, - ) { - return _CFURLCreateBookmarkDataFromAliasRecord( - allocatorRef, - aliasRecordDataRef, - ); - } + CFStringRef get kCFURLFileProtectionCompleteUntilFirstUserAuthentication => + _kCFURLFileProtectionCompleteUntilFirstUserAuthentication.value; - late final _CFURLCreateBookmarkDataFromAliasRecordPtr = _lookup< - ffi.NativeFunction>( - 'CFURLCreateBookmarkDataFromAliasRecord'); - late final _CFURLCreateBookmarkDataFromAliasRecord = - _CFURLCreateBookmarkDataFromAliasRecordPtr.asFunction< - CFDataRef Function(CFAllocatorRef, CFDataRef)>(); + set kCFURLFileProtectionCompleteUntilFirstUserAuthentication( + CFStringRef value) => + _kCFURLFileProtectionCompleteUntilFirstUserAuthentication.value = value; - int CFURLStartAccessingSecurityScopedResource( - CFURLRef url, - ) { - return _CFURLStartAccessingSecurityScopedResource( - url, - ); - } + late final ffi.Pointer + _kCFURLVolumeLocalizedFormatDescriptionKey = + _lookup('kCFURLVolumeLocalizedFormatDescriptionKey'); - late final _CFURLStartAccessingSecurityScopedResourcePtr = - _lookup>( - 'CFURLStartAccessingSecurityScopedResource'); - late final _CFURLStartAccessingSecurityScopedResource = - _CFURLStartAccessingSecurityScopedResourcePtr.asFunction< - int Function(CFURLRef)>(); + CFStringRef get kCFURLVolumeLocalizedFormatDescriptionKey => + _kCFURLVolumeLocalizedFormatDescriptionKey.value; - void CFURLStopAccessingSecurityScopedResource( - CFURLRef url, - ) { - return _CFURLStopAccessingSecurityScopedResource( - url, - ); - } + set kCFURLVolumeLocalizedFormatDescriptionKey(CFStringRef value) => + _kCFURLVolumeLocalizedFormatDescriptionKey.value = value; - late final _CFURLStopAccessingSecurityScopedResourcePtr = - _lookup>( - 'CFURLStopAccessingSecurityScopedResource'); - late final _CFURLStopAccessingSecurityScopedResource = - _CFURLStopAccessingSecurityScopedResourcePtr.asFunction< - void Function(CFURLRef)>(); + late final ffi.Pointer _kCFURLVolumeTotalCapacityKey = + _lookup('kCFURLVolumeTotalCapacityKey'); - late final ffi.Pointer _kCFRunLoopDefaultMode = - _lookup('kCFRunLoopDefaultMode'); + CFStringRef get kCFURLVolumeTotalCapacityKey => + _kCFURLVolumeTotalCapacityKey.value; - CFRunLoopMode get kCFRunLoopDefaultMode => _kCFRunLoopDefaultMode.value; + set kCFURLVolumeTotalCapacityKey(CFStringRef value) => + _kCFURLVolumeTotalCapacityKey.value = value; - set kCFRunLoopDefaultMode(CFRunLoopMode value) => - _kCFRunLoopDefaultMode.value = value; + late final ffi.Pointer _kCFURLVolumeAvailableCapacityKey = + _lookup('kCFURLVolumeAvailableCapacityKey'); - late final ffi.Pointer _kCFRunLoopCommonModes = - _lookup('kCFRunLoopCommonModes'); + CFStringRef get kCFURLVolumeAvailableCapacityKey => + _kCFURLVolumeAvailableCapacityKey.value; - CFRunLoopMode get kCFRunLoopCommonModes => _kCFRunLoopCommonModes.value; + set kCFURLVolumeAvailableCapacityKey(CFStringRef value) => + _kCFURLVolumeAvailableCapacityKey.value = value; - set kCFRunLoopCommonModes(CFRunLoopMode value) => - _kCFRunLoopCommonModes.value = value; + late final ffi.Pointer + _kCFURLVolumeAvailableCapacityForImportantUsageKey = + _lookup('kCFURLVolumeAvailableCapacityForImportantUsageKey'); - int CFRunLoopGetTypeID() { - return _CFRunLoopGetTypeID(); - } + CFStringRef get kCFURLVolumeAvailableCapacityForImportantUsageKey => + _kCFURLVolumeAvailableCapacityForImportantUsageKey.value; - late final _CFRunLoopGetTypeIDPtr = - _lookup>('CFRunLoopGetTypeID'); - late final _CFRunLoopGetTypeID = - _CFRunLoopGetTypeIDPtr.asFunction(); + set kCFURLVolumeAvailableCapacityForImportantUsageKey(CFStringRef value) => + _kCFURLVolumeAvailableCapacityForImportantUsageKey.value = value; - CFRunLoopRef CFRunLoopGetCurrent() { - return _CFRunLoopGetCurrent(); - } + late final ffi.Pointer + _kCFURLVolumeAvailableCapacityForOpportunisticUsageKey = + _lookup( + 'kCFURLVolumeAvailableCapacityForOpportunisticUsageKey'); - late final _CFRunLoopGetCurrentPtr = - _lookup>( - 'CFRunLoopGetCurrent'); - late final _CFRunLoopGetCurrent = - _CFRunLoopGetCurrentPtr.asFunction(); + CFStringRef get kCFURLVolumeAvailableCapacityForOpportunisticUsageKey => + _kCFURLVolumeAvailableCapacityForOpportunisticUsageKey.value; - CFRunLoopRef CFRunLoopGetMain() { - return _CFRunLoopGetMain(); - } + set kCFURLVolumeAvailableCapacityForOpportunisticUsageKey( + CFStringRef value) => + _kCFURLVolumeAvailableCapacityForOpportunisticUsageKey.value = value; - late final _CFRunLoopGetMainPtr = - _lookup>('CFRunLoopGetMain'); - late final _CFRunLoopGetMain = - _CFRunLoopGetMainPtr.asFunction(); + late final ffi.Pointer _kCFURLVolumeResourceCountKey = + _lookup('kCFURLVolumeResourceCountKey'); - CFRunLoopMode CFRunLoopCopyCurrentMode( - CFRunLoopRef rl, - ) { - return _CFRunLoopCopyCurrentMode( - rl, - ); - } + CFStringRef get kCFURLVolumeResourceCountKey => + _kCFURLVolumeResourceCountKey.value; - late final _CFRunLoopCopyCurrentModePtr = - _lookup>( - 'CFRunLoopCopyCurrentMode'); - late final _CFRunLoopCopyCurrentMode = _CFRunLoopCopyCurrentModePtr - .asFunction(); + set kCFURLVolumeResourceCountKey(CFStringRef value) => + _kCFURLVolumeResourceCountKey.value = value; - CFArrayRef CFRunLoopCopyAllModes( - CFRunLoopRef rl, - ) { - return _CFRunLoopCopyAllModes( - rl, - ); - } + late final ffi.Pointer _kCFURLVolumeSupportsPersistentIDsKey = + _lookup('kCFURLVolumeSupportsPersistentIDsKey'); - late final _CFRunLoopCopyAllModesPtr = - _lookup>( - 'CFRunLoopCopyAllModes'); - late final _CFRunLoopCopyAllModes = - _CFRunLoopCopyAllModesPtr.asFunction(); + CFStringRef get kCFURLVolumeSupportsPersistentIDsKey => + _kCFURLVolumeSupportsPersistentIDsKey.value; - void CFRunLoopAddCommonMode( - CFRunLoopRef rl, - CFRunLoopMode mode, - ) { - return _CFRunLoopAddCommonMode( - rl, - mode, - ); - } + set kCFURLVolumeSupportsPersistentIDsKey(CFStringRef value) => + _kCFURLVolumeSupportsPersistentIDsKey.value = value; - late final _CFRunLoopAddCommonModePtr = _lookup< - ffi.NativeFunction>( - 'CFRunLoopAddCommonMode'); - late final _CFRunLoopAddCommonMode = _CFRunLoopAddCommonModePtr.asFunction< - void Function(CFRunLoopRef, CFRunLoopMode)>(); + late final ffi.Pointer _kCFURLVolumeSupportsSymbolicLinksKey = + _lookup('kCFURLVolumeSupportsSymbolicLinksKey'); - double CFRunLoopGetNextTimerFireDate( - CFRunLoopRef rl, - CFRunLoopMode mode, - ) { - return _CFRunLoopGetNextTimerFireDate( - rl, - mode, - ); - } + CFStringRef get kCFURLVolumeSupportsSymbolicLinksKey => + _kCFURLVolumeSupportsSymbolicLinksKey.value; - late final _CFRunLoopGetNextTimerFireDatePtr = _lookup< - ffi.NativeFunction< - CFAbsoluteTime Function( - CFRunLoopRef, CFRunLoopMode)>>('CFRunLoopGetNextTimerFireDate'); - late final _CFRunLoopGetNextTimerFireDate = _CFRunLoopGetNextTimerFireDatePtr - .asFunction(); + set kCFURLVolumeSupportsSymbolicLinksKey(CFStringRef value) => + _kCFURLVolumeSupportsSymbolicLinksKey.value = value; - void CFRunLoopRun() { - return _CFRunLoopRun(); - } + late final ffi.Pointer _kCFURLVolumeSupportsHardLinksKey = + _lookup('kCFURLVolumeSupportsHardLinksKey'); - late final _CFRunLoopRunPtr = - _lookup>('CFRunLoopRun'); - late final _CFRunLoopRun = _CFRunLoopRunPtr.asFunction(); + CFStringRef get kCFURLVolumeSupportsHardLinksKey => + _kCFURLVolumeSupportsHardLinksKey.value; - int CFRunLoopRunInMode( - CFRunLoopMode mode, - double seconds, - int returnAfterSourceHandled, - ) { - return _CFRunLoopRunInMode( - mode, - seconds, - returnAfterSourceHandled, - ); - } + set kCFURLVolumeSupportsHardLinksKey(CFStringRef value) => + _kCFURLVolumeSupportsHardLinksKey.value = value; - 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 ffi.Pointer _kCFURLVolumeSupportsJournalingKey = + _lookup('kCFURLVolumeSupportsJournalingKey'); - int CFRunLoopIsWaiting( - CFRunLoopRef rl, - ) { - return _CFRunLoopIsWaiting( - rl, - ); - } + CFStringRef get kCFURLVolumeSupportsJournalingKey => + _kCFURLVolumeSupportsJournalingKey.value; - late final _CFRunLoopIsWaitingPtr = - _lookup>( - 'CFRunLoopIsWaiting'); - late final _CFRunLoopIsWaiting = - _CFRunLoopIsWaitingPtr.asFunction(); + set kCFURLVolumeSupportsJournalingKey(CFStringRef value) => + _kCFURLVolumeSupportsJournalingKey.value = value; - void CFRunLoopWakeUp( - CFRunLoopRef rl, - ) { - return _CFRunLoopWakeUp( - rl, - ); - } + late final ffi.Pointer _kCFURLVolumeIsJournalingKey = + _lookup('kCFURLVolumeIsJournalingKey'); - late final _CFRunLoopWakeUpPtr = - _lookup>( - 'CFRunLoopWakeUp'); - late final _CFRunLoopWakeUp = - _CFRunLoopWakeUpPtr.asFunction(); + CFStringRef get kCFURLVolumeIsJournalingKey => + _kCFURLVolumeIsJournalingKey.value; - void CFRunLoopStop( - CFRunLoopRef rl, - ) { - return _CFRunLoopStop( - rl, - ); - } + set kCFURLVolumeIsJournalingKey(CFStringRef value) => + _kCFURLVolumeIsJournalingKey.value = value; - late final _CFRunLoopStopPtr = - _lookup>( - 'CFRunLoopStop'); - late final _CFRunLoopStop = - _CFRunLoopStopPtr.asFunction(); + late final ffi.Pointer _kCFURLVolumeSupportsSparseFilesKey = + _lookup('kCFURLVolumeSupportsSparseFilesKey'); - void CFRunLoopPerformBlock( - CFRunLoopRef rl, - CFTypeRef mode, - ffi.Pointer<_ObjCBlock> block, - ) { - return _CFRunLoopPerformBlock( - rl, - mode, - block, - ); - } + CFStringRef get kCFURLVolumeSupportsSparseFilesKey => + _kCFURLVolumeSupportsSparseFilesKey.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>)>(); + set kCFURLVolumeSupportsSparseFilesKey(CFStringRef value) => + _kCFURLVolumeSupportsSparseFilesKey.value = value; - int CFRunLoopContainsSource( - CFRunLoopRef rl, - CFRunLoopSourceRef source, - CFRunLoopMode mode, - ) { - return _CFRunLoopContainsSource( - rl, - source, - mode, - ); - } + late final ffi.Pointer _kCFURLVolumeSupportsZeroRunsKey = + _lookup('kCFURLVolumeSupportsZeroRunsKey'); - late final _CFRunLoopContainsSourcePtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFRunLoopRef, CFRunLoopSourceRef, - CFRunLoopMode)>>('CFRunLoopContainsSource'); - late final _CFRunLoopContainsSource = _CFRunLoopContainsSourcePtr.asFunction< - int Function(CFRunLoopRef, CFRunLoopSourceRef, CFRunLoopMode)>(); + CFStringRef get kCFURLVolumeSupportsZeroRunsKey => + _kCFURLVolumeSupportsZeroRunsKey.value; - void CFRunLoopAddSource( - CFRunLoopRef rl, - CFRunLoopSourceRef source, - CFRunLoopMode mode, - ) { - return _CFRunLoopAddSource( - rl, - source, - mode, - ); - } + set kCFURLVolumeSupportsZeroRunsKey(CFStringRef value) => + _kCFURLVolumeSupportsZeroRunsKey.value = value; - late final _CFRunLoopAddSourcePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFRunLoopRef, CFRunLoopSourceRef, - CFRunLoopMode)>>('CFRunLoopAddSource'); - late final _CFRunLoopAddSource = _CFRunLoopAddSourcePtr.asFunction< - void Function(CFRunLoopRef, CFRunLoopSourceRef, CFRunLoopMode)>(); + late final ffi.Pointer + _kCFURLVolumeSupportsCaseSensitiveNamesKey = + _lookup('kCFURLVolumeSupportsCaseSensitiveNamesKey'); - void CFRunLoopRemoveSource( - CFRunLoopRef rl, - CFRunLoopSourceRef source, - CFRunLoopMode mode, - ) { - return _CFRunLoopRemoveSource( - rl, - source, - mode, - ); - } + CFStringRef get kCFURLVolumeSupportsCaseSensitiveNamesKey => + _kCFURLVolumeSupportsCaseSensitiveNamesKey.value; - late final _CFRunLoopRemoveSourcePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFRunLoopRef, CFRunLoopSourceRef, - CFRunLoopMode)>>('CFRunLoopRemoveSource'); - late final _CFRunLoopRemoveSource = _CFRunLoopRemoveSourcePtr.asFunction< - void Function(CFRunLoopRef, CFRunLoopSourceRef, CFRunLoopMode)>(); + set kCFURLVolumeSupportsCaseSensitiveNamesKey(CFStringRef value) => + _kCFURLVolumeSupportsCaseSensitiveNamesKey.value = value; - int CFRunLoopContainsObserver( - CFRunLoopRef rl, - CFRunLoopObserverRef observer, - CFRunLoopMode mode, - ) { - return _CFRunLoopContainsObserver( - rl, - observer, - mode, - ); - } + late final ffi.Pointer + _kCFURLVolumeSupportsCasePreservedNamesKey = + _lookup('kCFURLVolumeSupportsCasePreservedNamesKey'); - late final _CFRunLoopContainsObserverPtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFRunLoopRef, CFRunLoopObserverRef, - CFRunLoopMode)>>('CFRunLoopContainsObserver'); - late final _CFRunLoopContainsObserver = - _CFRunLoopContainsObserverPtr.asFunction< - int Function(CFRunLoopRef, CFRunLoopObserverRef, CFRunLoopMode)>(); + CFStringRef get kCFURLVolumeSupportsCasePreservedNamesKey => + _kCFURLVolumeSupportsCasePreservedNamesKey.value; - void CFRunLoopAddObserver( - CFRunLoopRef rl, - CFRunLoopObserverRef observer, - CFRunLoopMode mode, - ) { - return _CFRunLoopAddObserver( - rl, - observer, - mode, - ); - } + set kCFURLVolumeSupportsCasePreservedNamesKey(CFStringRef value) => + _kCFURLVolumeSupportsCasePreservedNamesKey.value = value; - late final _CFRunLoopAddObserverPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFRunLoopRef, CFRunLoopObserverRef, - CFRunLoopMode)>>('CFRunLoopAddObserver'); - late final _CFRunLoopAddObserver = _CFRunLoopAddObserverPtr.asFunction< - void Function(CFRunLoopRef, CFRunLoopObserverRef, CFRunLoopMode)>(); + late final ffi.Pointer + _kCFURLVolumeSupportsRootDirectoryDatesKey = + _lookup('kCFURLVolumeSupportsRootDirectoryDatesKey'); - void CFRunLoopRemoveObserver( - CFRunLoopRef rl, - CFRunLoopObserverRef observer, - CFRunLoopMode mode, - ) { - return _CFRunLoopRemoveObserver( - rl, - observer, - mode, - ); - } + CFStringRef get kCFURLVolumeSupportsRootDirectoryDatesKey => + _kCFURLVolumeSupportsRootDirectoryDatesKey.value; - late final _CFRunLoopRemoveObserverPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFRunLoopRef, CFRunLoopObserverRef, - CFRunLoopMode)>>('CFRunLoopRemoveObserver'); - late final _CFRunLoopRemoveObserver = _CFRunLoopRemoveObserverPtr.asFunction< - void Function(CFRunLoopRef, CFRunLoopObserverRef, CFRunLoopMode)>(); + set kCFURLVolumeSupportsRootDirectoryDatesKey(CFStringRef value) => + _kCFURLVolumeSupportsRootDirectoryDatesKey.value = value; - int CFRunLoopContainsTimer( - CFRunLoopRef rl, - CFRunLoopTimerRef timer, - CFRunLoopMode mode, - ) { - return _CFRunLoopContainsTimer( - rl, - timer, - mode, - ); - } + late final ffi.Pointer _kCFURLVolumeSupportsVolumeSizesKey = + _lookup('kCFURLVolumeSupportsVolumeSizesKey'); - late final _CFRunLoopContainsTimerPtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFRunLoopRef, CFRunLoopTimerRef, - CFRunLoopMode)>>('CFRunLoopContainsTimer'); - late final _CFRunLoopContainsTimer = _CFRunLoopContainsTimerPtr.asFunction< - int Function(CFRunLoopRef, CFRunLoopTimerRef, CFRunLoopMode)>(); + CFStringRef get kCFURLVolumeSupportsVolumeSizesKey => + _kCFURLVolumeSupportsVolumeSizesKey.value; - void CFRunLoopAddTimer( - CFRunLoopRef rl, - CFRunLoopTimerRef timer, - CFRunLoopMode mode, - ) { - return _CFRunLoopAddTimer( - rl, - timer, - mode, - ); - } + set kCFURLVolumeSupportsVolumeSizesKey(CFStringRef value) => + _kCFURLVolumeSupportsVolumeSizesKey.value = value; - late final _CFRunLoopAddTimerPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFRunLoopRef, CFRunLoopTimerRef, - CFRunLoopMode)>>('CFRunLoopAddTimer'); - late final _CFRunLoopAddTimer = _CFRunLoopAddTimerPtr.asFunction< - void Function(CFRunLoopRef, CFRunLoopTimerRef, CFRunLoopMode)>(); + late final ffi.Pointer _kCFURLVolumeSupportsRenamingKey = + _lookup('kCFURLVolumeSupportsRenamingKey'); - void CFRunLoopRemoveTimer( - CFRunLoopRef rl, - CFRunLoopTimerRef timer, - CFRunLoopMode mode, - ) { - return _CFRunLoopRemoveTimer( - rl, - timer, - mode, - ); - } + CFStringRef get kCFURLVolumeSupportsRenamingKey => + _kCFURLVolumeSupportsRenamingKey.value; - late final _CFRunLoopRemoveTimerPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFRunLoopRef, CFRunLoopTimerRef, - CFRunLoopMode)>>('CFRunLoopRemoveTimer'); - late final _CFRunLoopRemoveTimer = _CFRunLoopRemoveTimerPtr.asFunction< - void Function(CFRunLoopRef, CFRunLoopTimerRef, CFRunLoopMode)>(); + set kCFURLVolumeSupportsRenamingKey(CFStringRef value) => + _kCFURLVolumeSupportsRenamingKey.value = value; - int CFRunLoopSourceGetTypeID() { - return _CFRunLoopSourceGetTypeID(); - } + late final ffi.Pointer + _kCFURLVolumeSupportsAdvisoryFileLockingKey = + _lookup('kCFURLVolumeSupportsAdvisoryFileLockingKey'); - late final _CFRunLoopSourceGetTypeIDPtr = - _lookup>( - 'CFRunLoopSourceGetTypeID'); - late final _CFRunLoopSourceGetTypeID = - _CFRunLoopSourceGetTypeIDPtr.asFunction(); + CFStringRef get kCFURLVolumeSupportsAdvisoryFileLockingKey => + _kCFURLVolumeSupportsAdvisoryFileLockingKey.value; - CFRunLoopSourceRef CFRunLoopSourceCreate( - CFAllocatorRef allocator, - int order, - ffi.Pointer context, - ) { - return _CFRunLoopSourceCreate( - allocator, - order, - context, - ); - } + set kCFURLVolumeSupportsAdvisoryFileLockingKey(CFStringRef value) => + _kCFURLVolumeSupportsAdvisoryFileLockingKey.value = 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)>(); + late final ffi.Pointer _kCFURLVolumeSupportsExtendedSecurityKey = + _lookup('kCFURLVolumeSupportsExtendedSecurityKey'); - int CFRunLoopSourceGetOrder( - CFRunLoopSourceRef source, - ) { - return _CFRunLoopSourceGetOrder( - source, - ); - } + CFStringRef get kCFURLVolumeSupportsExtendedSecurityKey => + _kCFURLVolumeSupportsExtendedSecurityKey.value; - late final _CFRunLoopSourceGetOrderPtr = - _lookup>( - 'CFRunLoopSourceGetOrder'); - late final _CFRunLoopSourceGetOrder = _CFRunLoopSourceGetOrderPtr.asFunction< - int Function(CFRunLoopSourceRef)>(); + set kCFURLVolumeSupportsExtendedSecurityKey(CFStringRef value) => + _kCFURLVolumeSupportsExtendedSecurityKey.value = value; - void CFRunLoopSourceInvalidate( - CFRunLoopSourceRef source, - ) { - return _CFRunLoopSourceInvalidate( - source, - ); - } + late final ffi.Pointer _kCFURLVolumeIsBrowsableKey = + _lookup('kCFURLVolumeIsBrowsableKey'); - late final _CFRunLoopSourceInvalidatePtr = - _lookup>( - 'CFRunLoopSourceInvalidate'); - late final _CFRunLoopSourceInvalidate = _CFRunLoopSourceInvalidatePtr - .asFunction(); + CFStringRef get kCFURLVolumeIsBrowsableKey => + _kCFURLVolumeIsBrowsableKey.value; - int CFRunLoopSourceIsValid( - CFRunLoopSourceRef source, - ) { - return _CFRunLoopSourceIsValid( - source, - ); - } + set kCFURLVolumeIsBrowsableKey(CFStringRef value) => + _kCFURLVolumeIsBrowsableKey.value = value; - late final _CFRunLoopSourceIsValidPtr = - _lookup>( - 'CFRunLoopSourceIsValid'); - late final _CFRunLoopSourceIsValid = - _CFRunLoopSourceIsValidPtr.asFunction(); + late final ffi.Pointer _kCFURLVolumeMaximumFileSizeKey = + _lookup('kCFURLVolumeMaximumFileSizeKey'); - void CFRunLoopSourceGetContext( - CFRunLoopSourceRef source, - ffi.Pointer context, - ) { - return _CFRunLoopSourceGetContext( - source, - context, - ); - } + CFStringRef get kCFURLVolumeMaximumFileSizeKey => + _kCFURLVolumeMaximumFileSizeKey.value; - late final _CFRunLoopSourceGetContextPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFRunLoopSourceRef, ffi.Pointer)>>( - 'CFRunLoopSourceGetContext'); - late final _CFRunLoopSourceGetContext = - _CFRunLoopSourceGetContextPtr.asFunction< - void Function( - CFRunLoopSourceRef, ffi.Pointer)>(); + set kCFURLVolumeMaximumFileSizeKey(CFStringRef value) => + _kCFURLVolumeMaximumFileSizeKey.value = value; - void CFRunLoopSourceSignal( - CFRunLoopSourceRef source, - ) { - return _CFRunLoopSourceSignal( - source, - ); - } + late final ffi.Pointer _kCFURLVolumeIsEjectableKey = + _lookup('kCFURLVolumeIsEjectableKey'); - late final _CFRunLoopSourceSignalPtr = - _lookup>( - 'CFRunLoopSourceSignal'); - late final _CFRunLoopSourceSignal = - _CFRunLoopSourceSignalPtr.asFunction(); + CFStringRef get kCFURLVolumeIsEjectableKey => + _kCFURLVolumeIsEjectableKey.value; - int CFRunLoopObserverGetTypeID() { - return _CFRunLoopObserverGetTypeID(); - } + set kCFURLVolumeIsEjectableKey(CFStringRef value) => + _kCFURLVolumeIsEjectableKey.value = value; - late final _CFRunLoopObserverGetTypeIDPtr = - _lookup>( - 'CFRunLoopObserverGetTypeID'); - late final _CFRunLoopObserverGetTypeID = - _CFRunLoopObserverGetTypeIDPtr.asFunction(); + late final ffi.Pointer _kCFURLVolumeIsRemovableKey = + _lookup('kCFURLVolumeIsRemovableKey'); - CFRunLoopObserverRef CFRunLoopObserverCreate( - CFAllocatorRef allocator, - int activities, - int repeats, - int order, - CFRunLoopObserverCallBack callout, - ffi.Pointer context, - ) { - return _CFRunLoopObserverCreate( - allocator, - activities, - repeats, - order, - callout, - context, - ); - } + CFStringRef get kCFURLVolumeIsRemovableKey => + _kCFURLVolumeIsRemovableKey.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)>(); + set kCFURLVolumeIsRemovableKey(CFStringRef value) => + _kCFURLVolumeIsRemovableKey.value = value; - CFRunLoopObserverRef CFRunLoopObserverCreateWithHandler( - CFAllocatorRef allocator, - int activities, - int repeats, - int order, - ffi.Pointer<_ObjCBlock> block, - ) { - return _CFRunLoopObserverCreateWithHandler( - allocator, - activities, - repeats, - order, - block, - ); - } + late final ffi.Pointer _kCFURLVolumeIsInternalKey = + _lookup('kCFURLVolumeIsInternalKey'); - 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>)>(); + CFStringRef get kCFURLVolumeIsInternalKey => _kCFURLVolumeIsInternalKey.value; - int CFRunLoopObserverGetActivities( - CFRunLoopObserverRef observer, - ) { - return _CFRunLoopObserverGetActivities( - observer, - ); - } + set kCFURLVolumeIsInternalKey(CFStringRef value) => + _kCFURLVolumeIsInternalKey.value = value; - late final _CFRunLoopObserverGetActivitiesPtr = - _lookup>( - 'CFRunLoopObserverGetActivities'); - late final _CFRunLoopObserverGetActivities = - _CFRunLoopObserverGetActivitiesPtr.asFunction< - int Function(CFRunLoopObserverRef)>(); + late final ffi.Pointer _kCFURLVolumeIsAutomountedKey = + _lookup('kCFURLVolumeIsAutomountedKey'); - int CFRunLoopObserverDoesRepeat( - CFRunLoopObserverRef observer, - ) { - return _CFRunLoopObserverDoesRepeat( - observer, - ); - } + CFStringRef get kCFURLVolumeIsAutomountedKey => + _kCFURLVolumeIsAutomountedKey.value; - late final _CFRunLoopObserverDoesRepeatPtr = - _lookup>( - 'CFRunLoopObserverDoesRepeat'); - late final _CFRunLoopObserverDoesRepeat = _CFRunLoopObserverDoesRepeatPtr - .asFunction(); + set kCFURLVolumeIsAutomountedKey(CFStringRef value) => + _kCFURLVolumeIsAutomountedKey.value = value; - int CFRunLoopObserverGetOrder( - CFRunLoopObserverRef observer, - ) { - return _CFRunLoopObserverGetOrder( - observer, - ); - } + late final ffi.Pointer _kCFURLVolumeIsLocalKey = + _lookup('kCFURLVolumeIsLocalKey'); - late final _CFRunLoopObserverGetOrderPtr = - _lookup>( - 'CFRunLoopObserverGetOrder'); - late final _CFRunLoopObserverGetOrder = _CFRunLoopObserverGetOrderPtr - .asFunction(); + CFStringRef get kCFURLVolumeIsLocalKey => _kCFURLVolumeIsLocalKey.value; - void CFRunLoopObserverInvalidate( - CFRunLoopObserverRef observer, - ) { - return _CFRunLoopObserverInvalidate( - observer, - ); - } + set kCFURLVolumeIsLocalKey(CFStringRef value) => + _kCFURLVolumeIsLocalKey.value = value; - late final _CFRunLoopObserverInvalidatePtr = - _lookup>( - 'CFRunLoopObserverInvalidate'); - late final _CFRunLoopObserverInvalidate = _CFRunLoopObserverInvalidatePtr - .asFunction(); + late final ffi.Pointer _kCFURLVolumeIsReadOnlyKey = + _lookup('kCFURLVolumeIsReadOnlyKey'); - int CFRunLoopObserverIsValid( - CFRunLoopObserverRef observer, - ) { - return _CFRunLoopObserverIsValid( - observer, - ); - } + CFStringRef get kCFURLVolumeIsReadOnlyKey => _kCFURLVolumeIsReadOnlyKey.value; - late final _CFRunLoopObserverIsValidPtr = - _lookup>( - 'CFRunLoopObserverIsValid'); - late final _CFRunLoopObserverIsValid = _CFRunLoopObserverIsValidPtr - .asFunction(); + set kCFURLVolumeIsReadOnlyKey(CFStringRef value) => + _kCFURLVolumeIsReadOnlyKey.value = value; - void CFRunLoopObserverGetContext( - CFRunLoopObserverRef observer, - ffi.Pointer context, - ) { - return _CFRunLoopObserverGetContext( - observer, - context, - ); - } + late final ffi.Pointer _kCFURLVolumeCreationDateKey = + _lookup('kCFURLVolumeCreationDateKey'); - late final _CFRunLoopObserverGetContextPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFRunLoopObserverRef, - ffi.Pointer)>>( - 'CFRunLoopObserverGetContext'); - late final _CFRunLoopObserverGetContext = - _CFRunLoopObserverGetContextPtr.asFunction< - void Function( - CFRunLoopObserverRef, ffi.Pointer)>(); + CFStringRef get kCFURLVolumeCreationDateKey => + _kCFURLVolumeCreationDateKey.value; - int CFRunLoopTimerGetTypeID() { - return _CFRunLoopTimerGetTypeID(); - } + set kCFURLVolumeCreationDateKey(CFStringRef value) => + _kCFURLVolumeCreationDateKey.value = value; - late final _CFRunLoopTimerGetTypeIDPtr = - _lookup>( - 'CFRunLoopTimerGetTypeID'); - late final _CFRunLoopTimerGetTypeID = - _CFRunLoopTimerGetTypeIDPtr.asFunction(); + late final ffi.Pointer _kCFURLVolumeURLForRemountingKey = + _lookup('kCFURLVolumeURLForRemountingKey'); - 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, - ); - } + CFStringRef get kCFURLVolumeURLForRemountingKey => + _kCFURLVolumeURLForRemountingKey.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)>(); + set kCFURLVolumeURLForRemountingKey(CFStringRef value) => + _kCFURLVolumeURLForRemountingKey.value = 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, - ); - } + late final ffi.Pointer _kCFURLVolumeUUIDStringKey = + _lookup('kCFURLVolumeUUIDStringKey'); - 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>)>(); + CFStringRef get kCFURLVolumeUUIDStringKey => _kCFURLVolumeUUIDStringKey.value; - double CFRunLoopTimerGetNextFireDate( - CFRunLoopTimerRef timer, - ) { - return _CFRunLoopTimerGetNextFireDate( - timer, - ); - } + set kCFURLVolumeUUIDStringKey(CFStringRef value) => + _kCFURLVolumeUUIDStringKey.value = value; - late final _CFRunLoopTimerGetNextFireDatePtr = - _lookup>( - 'CFRunLoopTimerGetNextFireDate'); - late final _CFRunLoopTimerGetNextFireDate = _CFRunLoopTimerGetNextFireDatePtr - .asFunction(); + late final ffi.Pointer _kCFURLVolumeNameKey = + _lookup('kCFURLVolumeNameKey'); - void CFRunLoopTimerSetNextFireDate( - CFRunLoopTimerRef timer, - double fireDate, - ) { - return _CFRunLoopTimerSetNextFireDate( - timer, - fireDate, - ); - } + CFStringRef get kCFURLVolumeNameKey => _kCFURLVolumeNameKey.value; - late final _CFRunLoopTimerSetNextFireDatePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFRunLoopTimerRef, - CFAbsoluteTime)>>('CFRunLoopTimerSetNextFireDate'); - late final _CFRunLoopTimerSetNextFireDate = _CFRunLoopTimerSetNextFireDatePtr - .asFunction(); + set kCFURLVolumeNameKey(CFStringRef value) => + _kCFURLVolumeNameKey.value = value; - double CFRunLoopTimerGetInterval( - CFRunLoopTimerRef timer, - ) { - return _CFRunLoopTimerGetInterval( - timer, - ); - } + late final ffi.Pointer _kCFURLVolumeLocalizedNameKey = + _lookup('kCFURLVolumeLocalizedNameKey'); - late final _CFRunLoopTimerGetIntervalPtr = - _lookup>( - 'CFRunLoopTimerGetInterval'); - late final _CFRunLoopTimerGetInterval = _CFRunLoopTimerGetIntervalPtr - .asFunction(); + CFStringRef get kCFURLVolumeLocalizedNameKey => + _kCFURLVolumeLocalizedNameKey.value; - int CFRunLoopTimerDoesRepeat( - CFRunLoopTimerRef timer, - ) { - return _CFRunLoopTimerDoesRepeat( - timer, - ); - } + set kCFURLVolumeLocalizedNameKey(CFStringRef value) => + _kCFURLVolumeLocalizedNameKey.value = value; - late final _CFRunLoopTimerDoesRepeatPtr = - _lookup>( - 'CFRunLoopTimerDoesRepeat'); - late final _CFRunLoopTimerDoesRepeat = _CFRunLoopTimerDoesRepeatPtr - .asFunction(); + late final ffi.Pointer _kCFURLVolumeIsEncryptedKey = + _lookup('kCFURLVolumeIsEncryptedKey'); - int CFRunLoopTimerGetOrder( - CFRunLoopTimerRef timer, - ) { - return _CFRunLoopTimerGetOrder( - timer, - ); - } + CFStringRef get kCFURLVolumeIsEncryptedKey => + _kCFURLVolumeIsEncryptedKey.value; - late final _CFRunLoopTimerGetOrderPtr = - _lookup>( - 'CFRunLoopTimerGetOrder'); - late final _CFRunLoopTimerGetOrder = - _CFRunLoopTimerGetOrderPtr.asFunction(); + set kCFURLVolumeIsEncryptedKey(CFStringRef value) => + _kCFURLVolumeIsEncryptedKey.value = value; - void CFRunLoopTimerInvalidate( - CFRunLoopTimerRef timer, - ) { - return _CFRunLoopTimerInvalidate( - timer, - ); - } + late final ffi.Pointer _kCFURLVolumeIsRootFileSystemKey = + _lookup('kCFURLVolumeIsRootFileSystemKey'); - late final _CFRunLoopTimerInvalidatePtr = - _lookup>( - 'CFRunLoopTimerInvalidate'); - late final _CFRunLoopTimerInvalidate = _CFRunLoopTimerInvalidatePtr - .asFunction(); + CFStringRef get kCFURLVolumeIsRootFileSystemKey => + _kCFURLVolumeIsRootFileSystemKey.value; - int CFRunLoopTimerIsValid( - CFRunLoopTimerRef timer, - ) { - return _CFRunLoopTimerIsValid( - timer, - ); - } + set kCFURLVolumeIsRootFileSystemKey(CFStringRef value) => + _kCFURLVolumeIsRootFileSystemKey.value = value; - late final _CFRunLoopTimerIsValidPtr = - _lookup>( - 'CFRunLoopTimerIsValid'); - late final _CFRunLoopTimerIsValid = - _CFRunLoopTimerIsValidPtr.asFunction(); + late final ffi.Pointer _kCFURLVolumeSupportsCompressionKey = + _lookup('kCFURLVolumeSupportsCompressionKey'); - void CFRunLoopTimerGetContext( - CFRunLoopTimerRef timer, - ffi.Pointer context, - ) { - return _CFRunLoopTimerGetContext( - timer, - context, - ); - } + CFStringRef get kCFURLVolumeSupportsCompressionKey => + _kCFURLVolumeSupportsCompressionKey.value; - late final _CFRunLoopTimerGetContextPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFRunLoopTimerRef, - ffi.Pointer)>>('CFRunLoopTimerGetContext'); - late final _CFRunLoopTimerGetContext = - _CFRunLoopTimerGetContextPtr.asFunction< - void Function( - CFRunLoopTimerRef, ffi.Pointer)>(); + set kCFURLVolumeSupportsCompressionKey(CFStringRef value) => + _kCFURLVolumeSupportsCompressionKey.value = value; - double CFRunLoopTimerGetTolerance( - CFRunLoopTimerRef timer, - ) { - return _CFRunLoopTimerGetTolerance( - timer, - ); - } + late final ffi.Pointer _kCFURLVolumeSupportsFileCloningKey = + _lookup('kCFURLVolumeSupportsFileCloningKey'); - late final _CFRunLoopTimerGetTolerancePtr = - _lookup>( - 'CFRunLoopTimerGetTolerance'); - late final _CFRunLoopTimerGetTolerance = _CFRunLoopTimerGetTolerancePtr - .asFunction(); + CFStringRef get kCFURLVolumeSupportsFileCloningKey => + _kCFURLVolumeSupportsFileCloningKey.value; - void CFRunLoopTimerSetTolerance( - CFRunLoopTimerRef timer, - double tolerance, - ) { - return _CFRunLoopTimerSetTolerance( - timer, - tolerance, - ); - } + set kCFURLVolumeSupportsFileCloningKey(CFStringRef value) => + _kCFURLVolumeSupportsFileCloningKey.value = value; - late final _CFRunLoopTimerSetTolerancePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFRunLoopTimerRef, - CFTimeInterval)>>('CFRunLoopTimerSetTolerance'); - late final _CFRunLoopTimerSetTolerance = _CFRunLoopTimerSetTolerancePtr - .asFunction(); + late final ffi.Pointer _kCFURLVolumeSupportsSwapRenamingKey = + _lookup('kCFURLVolumeSupportsSwapRenamingKey'); - int CFSocketGetTypeID() { - return _CFSocketGetTypeID(); - } + CFStringRef get kCFURLVolumeSupportsSwapRenamingKey => + _kCFURLVolumeSupportsSwapRenamingKey.value; - late final _CFSocketGetTypeIDPtr = - _lookup>('CFSocketGetTypeID'); - late final _CFSocketGetTypeID = - _CFSocketGetTypeIDPtr.asFunction(); + set kCFURLVolumeSupportsSwapRenamingKey(CFStringRef value) => + _kCFURLVolumeSupportsSwapRenamingKey.value = value; - 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 ffi.Pointer + _kCFURLVolumeSupportsExclusiveRenamingKey = + _lookup('kCFURLVolumeSupportsExclusiveRenamingKey'); - 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)>(); + CFStringRef get kCFURLVolumeSupportsExclusiveRenamingKey => + _kCFURLVolumeSupportsExclusiveRenamingKey.value; - CFSocketRef CFSocketCreateWithNative( - CFAllocatorRef allocator, - int sock, - int callBackTypes, - CFSocketCallBack callout, - ffi.Pointer context, - ) { - return _CFSocketCreateWithNative( - allocator, - sock, - callBackTypes, - callout, - context, - ); - } + set kCFURLVolumeSupportsExclusiveRenamingKey(CFStringRef value) => + _kCFURLVolumeSupportsExclusiveRenamingKey.value = value; - 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)>(); + late final ffi.Pointer _kCFURLVolumeSupportsImmutableFilesKey = + _lookup('kCFURLVolumeSupportsImmutableFilesKey'); - CFSocketRef CFSocketCreateWithSocketSignature( - CFAllocatorRef allocator, - ffi.Pointer signature, - int callBackTypes, - CFSocketCallBack callout, - ffi.Pointer context, - ) { - return _CFSocketCreateWithSocketSignature( - allocator, - signature, - callBackTypes, - callout, - context, - ); - } + CFStringRef get kCFURLVolumeSupportsImmutableFilesKey => + _kCFURLVolumeSupportsImmutableFilesKey.value; - 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)>(); + set kCFURLVolumeSupportsImmutableFilesKey(CFStringRef value) => + _kCFURLVolumeSupportsImmutableFilesKey.value = value; - 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 ffi.Pointer + _kCFURLVolumeSupportsAccessPermissionsKey = + _lookup('kCFURLVolumeSupportsAccessPermissionsKey'); - 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)>(); + CFStringRef get kCFURLVolumeSupportsAccessPermissionsKey => + _kCFURLVolumeSupportsAccessPermissionsKey.value; - int CFSocketSetAddress( - CFSocketRef s, - CFDataRef address, - ) { - return _CFSocketSetAddress( - s, - address, - ); - } + set kCFURLVolumeSupportsAccessPermissionsKey(CFStringRef value) => + _kCFURLVolumeSupportsAccessPermissionsKey.value = value; - late final _CFSocketSetAddressPtr = - _lookup>( - 'CFSocketSetAddress'); - late final _CFSocketSetAddress = - _CFSocketSetAddressPtr.asFunction(); + late final ffi.Pointer _kCFURLVolumeSupportsFileProtectionKey = + _lookup('kCFURLVolumeSupportsFileProtectionKey'); - int CFSocketConnectToAddress( - CFSocketRef s, - CFDataRef address, - double timeout, - ) { - return _CFSocketConnectToAddress( - s, - address, - timeout, - ); - } + CFStringRef get kCFURLVolumeSupportsFileProtectionKey => + _kCFURLVolumeSupportsFileProtectionKey.value; - late final _CFSocketConnectToAddressPtr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function(CFSocketRef, CFDataRef, - CFTimeInterval)>>('CFSocketConnectToAddress'); - late final _CFSocketConnectToAddress = _CFSocketConnectToAddressPtr - .asFunction(); + set kCFURLVolumeSupportsFileProtectionKey(CFStringRef value) => + _kCFURLVolumeSupportsFileProtectionKey.value = value; - void CFSocketInvalidate( - CFSocketRef s, - ) { - return _CFSocketInvalidate( - s, - ); - } + late final ffi.Pointer _kCFURLVolumeTypeNameKey = + _lookup('kCFURLVolumeTypeNameKey'); - late final _CFSocketInvalidatePtr = - _lookup>( - 'CFSocketInvalidate'); - late final _CFSocketInvalidate = - _CFSocketInvalidatePtr.asFunction(); + CFStringRef get kCFURLVolumeTypeNameKey => _kCFURLVolumeTypeNameKey.value; - int CFSocketIsValid( - CFSocketRef s, - ) { - return _CFSocketIsValid( - s, - ); - } + set kCFURLVolumeTypeNameKey(CFStringRef value) => + _kCFURLVolumeTypeNameKey.value = value; - late final _CFSocketIsValidPtr = - _lookup>( - 'CFSocketIsValid'); - late final _CFSocketIsValid = - _CFSocketIsValidPtr.asFunction(); + late final ffi.Pointer _kCFURLVolumeSubtypeKey = + _lookup('kCFURLVolumeSubtypeKey'); - CFDataRef CFSocketCopyAddress( - CFSocketRef s, - ) { - return _CFSocketCopyAddress( - s, - ); - } + CFStringRef get kCFURLVolumeSubtypeKey => _kCFURLVolumeSubtypeKey.value; - late final _CFSocketCopyAddressPtr = - _lookup>( - 'CFSocketCopyAddress'); - late final _CFSocketCopyAddress = - _CFSocketCopyAddressPtr.asFunction(); + set kCFURLVolumeSubtypeKey(CFStringRef value) => + _kCFURLVolumeSubtypeKey.value = value; - CFDataRef CFSocketCopyPeerAddress( - CFSocketRef s, + 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, + CFURLRef url, + int options, + CFArrayRef resourcePropertiesToInclude, + CFURLRef relativeToURL, + ffi.Pointer error, ) { - return _CFSocketCopyPeerAddress( - s, + return _CFURLCreateBookmarkData( + allocator, + url, + options, + resourcePropertiesToInclude, + relativeToURL, + error, ); } - late final _CFSocketCopyPeerAddressPtr = - _lookup>( - 'CFSocketCopyPeerAddress'); - late final _CFSocketCopyPeerAddress = - _CFSocketCopyPeerAddressPtr.asFunction(); + 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)>(); - void CFSocketGetContext( - CFSocketRef s, - ffi.Pointer context, + CFURLRef CFURLCreateByResolvingBookmarkData( + CFAllocatorRef allocator, + CFDataRef bookmark, + int options, + CFURLRef relativeToURL, + CFArrayRef resourcePropertiesToInclude, + ffi.Pointer isStale, + ffi.Pointer error, ) { - return _CFSocketGetContext( - s, - context, + return _CFURLCreateByResolvingBookmarkData( + allocator, + bookmark, + options, + relativeToURL, + resourcePropertiesToInclude, + isStale, + error, ); } - late final _CFSocketGetContextPtr = _lookup< + late final _CFURLCreateByResolvingBookmarkDataPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFSocketRef, - ffi.Pointer)>>('CFSocketGetContext'); - late final _CFSocketGetContext = _CFSocketGetContextPtr.asFunction< - void Function(CFSocketRef, ffi.Pointer)>(); + 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)>(); - int CFSocketGetNative( - CFSocketRef s, + CFDictionaryRef CFURLCreateResourcePropertiesForKeysFromBookmarkData( + CFAllocatorRef allocator, + CFArrayRef resourcePropertiesToReturn, + CFDataRef bookmark, ) { - return _CFSocketGetNative( - s, + return _CFURLCreateResourcePropertiesForKeysFromBookmarkData( + allocator, + resourcePropertiesToReturn, + bookmark, ); } - late final _CFSocketGetNativePtr = - _lookup>( - 'CFSocketGetNative'); - late final _CFSocketGetNative = - _CFSocketGetNativePtr.asFunction(); + late final _CFURLCreateResourcePropertiesForKeysFromBookmarkDataPtr = _lookup< + ffi.NativeFunction< + CFDictionaryRef Function(CFAllocatorRef, CFArrayRef, CFDataRef)>>( + 'CFURLCreateResourcePropertiesForKeysFromBookmarkData'); + late final _CFURLCreateResourcePropertiesForKeysFromBookmarkData = + _CFURLCreateResourcePropertiesForKeysFromBookmarkDataPtr.asFunction< + CFDictionaryRef Function(CFAllocatorRef, CFArrayRef, CFDataRef)>(); - CFRunLoopSourceRef CFSocketCreateRunLoopSource( + CFTypeRef CFURLCreateResourcePropertyForKeyFromBookmarkData( CFAllocatorRef allocator, - CFSocketRef s, - int order, + CFStringRef resourcePropertyKey, + CFDataRef bookmark, ) { - return _CFSocketCreateRunLoopSource( + return _CFURLCreateResourcePropertyForKeyFromBookmarkData( allocator, - s, - order, + resourcePropertyKey, + bookmark, ); } - late final _CFSocketCreateRunLoopSourcePtr = _lookup< + late final _CFURLCreateResourcePropertyForKeyFromBookmarkDataPtr = _lookup< ffi.NativeFunction< - CFRunLoopSourceRef Function(CFAllocatorRef, CFSocketRef, - CFIndex)>>('CFSocketCreateRunLoopSource'); - late final _CFSocketCreateRunLoopSource = - _CFSocketCreateRunLoopSourcePtr.asFunction< - CFRunLoopSourceRef Function(CFAllocatorRef, CFSocketRef, int)>(); + CFTypeRef Function(CFAllocatorRef, CFStringRef, + CFDataRef)>>('CFURLCreateResourcePropertyForKeyFromBookmarkData'); + late final _CFURLCreateResourcePropertyForKeyFromBookmarkData = + _CFURLCreateResourcePropertyForKeyFromBookmarkDataPtr.asFunction< + CFTypeRef Function(CFAllocatorRef, CFStringRef, CFDataRef)>(); - int CFSocketGetSocketFlags( - CFSocketRef s, + CFDataRef CFURLCreateBookmarkDataFromFile( + CFAllocatorRef allocator, + CFURLRef fileURL, + ffi.Pointer errorRef, ) { - return _CFSocketGetSocketFlags( - s, + return _CFURLCreateBookmarkDataFromFile( + allocator, + fileURL, + errorRef, ); } - late final _CFSocketGetSocketFlagsPtr = - _lookup>( - 'CFSocketGetSocketFlags'); - late final _CFSocketGetSocketFlags = - _CFSocketGetSocketFlagsPtr.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)>(); - void CFSocketSetSocketFlags( - CFSocketRef s, - int flags, + int CFURLWriteBookmarkDataToFile( + CFDataRef bookmarkRef, + CFURLRef fileURL, + int options, + ffi.Pointer errorRef, ) { - return _CFSocketSetSocketFlags( - s, - flags, + return _CFURLWriteBookmarkDataToFile( + bookmarkRef, + fileURL, + options, + errorRef, ); } - late final _CFSocketSetSocketFlagsPtr = _lookup< - ffi.NativeFunction>( - 'CFSocketSetSocketFlags'); - late final _CFSocketSetSocketFlags = - _CFSocketSetSocketFlagsPtr.asFunction(); + 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)>(); - void CFSocketDisableCallBacks( - CFSocketRef s, - int callBackTypes, + CFDataRef CFURLCreateBookmarkDataFromAliasRecord( + CFAllocatorRef allocatorRef, + CFDataRef aliasRecordDataRef, ) { - return _CFSocketDisableCallBacks( - s, - callBackTypes, + return _CFURLCreateBookmarkDataFromAliasRecord( + allocatorRef, + aliasRecordDataRef, ); } - late final _CFSocketDisableCallBacksPtr = _lookup< - ffi.NativeFunction>( - 'CFSocketDisableCallBacks'); - late final _CFSocketDisableCallBacks = _CFSocketDisableCallBacksPtr - .asFunction(); + late final _CFURLCreateBookmarkDataFromAliasRecordPtr = _lookup< + ffi.NativeFunction>( + 'CFURLCreateBookmarkDataFromAliasRecord'); + late final _CFURLCreateBookmarkDataFromAliasRecord = + _CFURLCreateBookmarkDataFromAliasRecordPtr.asFunction< + CFDataRef Function(CFAllocatorRef, CFDataRef)>(); - void CFSocketEnableCallBacks( - CFSocketRef s, - int callBackTypes, + int CFURLStartAccessingSecurityScopedResource( + CFURLRef url, ) { - return _CFSocketEnableCallBacks( - s, - callBackTypes, + return _CFURLStartAccessingSecurityScopedResource( + url, ); } - late final _CFSocketEnableCallBacksPtr = _lookup< - ffi.NativeFunction>( - 'CFSocketEnableCallBacks'); - late final _CFSocketEnableCallBacks = - _CFSocketEnableCallBacksPtr.asFunction(); + late final _CFURLStartAccessingSecurityScopedResourcePtr = + _lookup>( + 'CFURLStartAccessingSecurityScopedResource'); + late final _CFURLStartAccessingSecurityScopedResource = + _CFURLStartAccessingSecurityScopedResourcePtr.asFunction< + int Function(CFURLRef)>(); - int CFSocketSendData( - CFSocketRef s, - CFDataRef address, - CFDataRef data, - double timeout, + void CFURLStopAccessingSecurityScopedResource( + CFURLRef url, ) { - return _CFSocketSendData( - s, - address, - data, - timeout, + return _CFURLStopAccessingSecurityScopedResource( + url, ); } - 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 _CFURLStopAccessingSecurityScopedResourcePtr = + _lookup>( + 'CFURLStopAccessingSecurityScopedResource'); + late final _CFURLStopAccessingSecurityScopedResource = + _CFURLStopAccessingSecurityScopedResourcePtr.asFunction< + void Function(CFURLRef)>(); - int CFSocketRegisterValue( - ffi.Pointer nameServerSignature, - double timeout, - CFStringRef name, - CFPropertyListRef value, - ) { - return _CFSocketRegisterValue( - nameServerSignature, - timeout, - name, - value, - ); + 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 _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 _CFRunLoopGetTypeIDPtr = + _lookup>('CFRunLoopGetTypeID'); + late final _CFRunLoopGetTypeID = + _CFRunLoopGetTypeIDPtr.asFunction(); - int CFSocketCopyRegisteredValue( - ffi.Pointer nameServerSignature, - double timeout, - CFStringRef name, - ffi.Pointer value, - ffi.Pointer nameServerAddress, - ) { - return _CFSocketCopyRegisteredValue( - nameServerSignature, - timeout, - name, - value, - nameServerAddress, - ); + CFRunLoopRef CFRunLoopGetCurrent() { + return _CFRunLoopGetCurrent(); } - 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)>(); + late final _CFRunLoopGetCurrentPtr = + _lookup>( + 'CFRunLoopGetCurrent'); + late final _CFRunLoopGetCurrent = + _CFRunLoopGetCurrentPtr.asFunction(); - int CFSocketRegisterSocketSignature( - ffi.Pointer nameServerSignature, - double timeout, - CFStringRef name, - ffi.Pointer signature, - ) { - return _CFSocketRegisterSocketSignature( - nameServerSignature, - timeout, - name, - signature, - ); + CFRunLoopRef CFRunLoopGetMain() { + return _CFRunLoopGetMain(); } - 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 _CFRunLoopGetMainPtr = + _lookup>('CFRunLoopGetMain'); + late final _CFRunLoopGetMain = + _CFRunLoopGetMainPtr.asFunction(); - int CFSocketCopyRegisteredSocketSignature( - ffi.Pointer nameServerSignature, - double timeout, - CFStringRef name, - ffi.Pointer signature, - ffi.Pointer nameServerAddress, + CFRunLoopMode CFRunLoopCopyCurrentMode( + CFRunLoopRef rl, ) { - return _CFSocketCopyRegisteredSocketSignature( - nameServerSignature, - timeout, - name, - signature, - nameServerAddress, + return _CFRunLoopCopyCurrentMode( + rl, ); } - 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 _CFRunLoopCopyCurrentModePtr = + _lookup>( + 'CFRunLoopCopyCurrentMode'); + late final _CFRunLoopCopyCurrentMode = _CFRunLoopCopyCurrentModePtr + .asFunction(); - int CFSocketUnregister( - ffi.Pointer nameServerSignature, - double timeout, - CFStringRef name, + CFArrayRef CFRunLoopCopyAllModes( + CFRunLoopRef rl, ) { - return _CFSocketUnregister( - nameServerSignature, - timeout, - name, + return _CFRunLoopCopyAllModes( + rl, ); } - 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)>(); + late final _CFRunLoopCopyAllModesPtr = + _lookup>( + 'CFRunLoopCopyAllModes'); + late final _CFRunLoopCopyAllModes = + _CFRunLoopCopyAllModesPtr.asFunction(); - void CFSocketSetDefaultNameRegistryPortNumber( - int port, + void CFRunLoopAddCommonMode( + CFRunLoopRef rl, + CFRunLoopMode mode, ) { - return _CFSocketSetDefaultNameRegistryPortNumber( - port, + return _CFRunLoopAddCommonMode( + rl, + mode, ); } - late final _CFSocketSetDefaultNameRegistryPortNumberPtr = - _lookup>( - 'CFSocketSetDefaultNameRegistryPortNumber'); - late final _CFSocketSetDefaultNameRegistryPortNumber = - _CFSocketSetDefaultNameRegistryPortNumberPtr.asFunction< - void Function(int)>(); + late final _CFRunLoopAddCommonModePtr = _lookup< + ffi.NativeFunction>( + 'CFRunLoopAddCommonMode'); + late final _CFRunLoopAddCommonMode = _CFRunLoopAddCommonModePtr.asFunction< + void Function(CFRunLoopRef, CFRunLoopMode)>(); - int CFSocketGetDefaultNameRegistryPortNumber() { - return _CFSocketGetDefaultNameRegistryPortNumber(); + double CFRunLoopGetNextTimerFireDate( + CFRunLoopRef rl, + CFRunLoopMode mode, + ) { + return _CFRunLoopGetNextTimerFireDate( + rl, + mode, + ); } - 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'); + late final _CFRunLoopGetNextTimerFireDatePtr = _lookup< + ffi.NativeFunction< + CFAbsoluteTime Function( + CFRunLoopRef, CFRunLoopMode)>>('CFRunLoopGetNextTimerFireDate'); + late final _CFRunLoopGetNextTimerFireDate = _CFRunLoopGetNextTimerFireDatePtr + .asFunction(); - CFStringRef get kCFSocketRetrieveCommand => _kCFSocketRetrieveCommand.value; + void CFRunLoopRun() { + return _CFRunLoopRun(); + } - set kCFSocketRetrieveCommand(CFStringRef value) => - _kCFSocketRetrieveCommand.value = value; + late final _CFRunLoopRunPtr = + _lookup>('CFRunLoopRun'); + late final _CFRunLoopRun = _CFRunLoopRunPtr.asFunction(); - int getattrlistbulk( - int arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - int arg3, - int arg4, + int CFRunLoopRunInMode( + CFRunLoopMode mode, + double seconds, + int returnAfterSourceHandled, ) { - return _getattrlistbulk( - arg0, - arg1, - arg2, - arg3, - arg4, + return _CFRunLoopRunInMode( + mode, + seconds, + returnAfterSourceHandled, ); } - late final _getattrlistbulkPtr = _lookup< + late final _CFRunLoopRunInModePtr = _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)>(); + ffi.Int32 Function( + CFRunLoopMode, CFTimeInterval, Boolean)>>('CFRunLoopRunInMode'); + late final _CFRunLoopRunInMode = _CFRunLoopRunInModePtr.asFunction< + int Function(CFRunLoopMode, double, int)>(); - int getattrlistat( - int arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3, - int arg4, - int arg5, + int CFRunLoopIsWaiting( + CFRunLoopRef rl, ) { - return _getattrlistat( - arg0, - arg1, - arg2, - arg3, - arg4, - arg5, + return _CFRunLoopIsWaiting( + rl, ); } - 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)>(); + late final _CFRunLoopIsWaitingPtr = + _lookup>( + 'CFRunLoopIsWaiting'); + late final _CFRunLoopIsWaiting = + _CFRunLoopIsWaitingPtr.asFunction(); - int setattrlistat( - int arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3, - int arg4, - int arg5, + void CFRunLoopWakeUp( + CFRunLoopRef rl, ) { - return _setattrlistat( - arg0, - arg1, - arg2, - arg3, - arg4, - arg5, + return _CFRunLoopWakeUp( + rl, ); } - 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)>(); + late final _CFRunLoopWakeUpPtr = + _lookup>( + 'CFRunLoopWakeUp'); + late final _CFRunLoopWakeUp = + _CFRunLoopWakeUpPtr.asFunction(); - int faccessat( - int arg0, - ffi.Pointer arg1, - int arg2, - int arg3, + void CFRunLoopStop( + CFRunLoopRef rl, ) { - return _faccessat( - arg0, - arg1, - arg2, - arg3, + return _CFRunLoopStop( + rl, ); } - 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 _CFRunLoopStopPtr = + _lookup>( + 'CFRunLoopStop'); + late final _CFRunLoopStop = + _CFRunLoopStopPtr.asFunction(); - int fchownat( - int arg0, - ffi.Pointer arg1, - int arg2, - int arg3, - int arg4, + void CFRunLoopPerformBlock( + CFRunLoopRef rl, + CFTypeRef mode, + ffi.Pointer<_ObjCBlock> block, ) { - return _fchownat( - arg0, - arg1, - arg2, - arg3, - arg4, + return _CFRunLoopPerformBlock( + rl, + mode, + block, ); } - late final _fchownatPtr = _lookup< + late final _CFRunLoopPerformBlockPtr = _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(CFRunLoopRef, CFTypeRef, + ffi.Pointer<_ObjCBlock>)>>('CFRunLoopPerformBlock'); + late final _CFRunLoopPerformBlock = _CFRunLoopPerformBlockPtr.asFunction< + void Function(CFRunLoopRef, CFTypeRef, ffi.Pointer<_ObjCBlock>)>(); - int linkat( - int arg0, - ffi.Pointer arg1, - int arg2, - ffi.Pointer arg3, - int arg4, + int CFRunLoopContainsSource( + CFRunLoopRef rl, + CFRunLoopSourceRef source, + CFRunLoopMode mode, ) { - return _linkat( - arg0, - arg1, - arg2, - arg3, - arg4, + return _CFRunLoopContainsSource( + rl, + source, + mode, ); } - late final _linkatPtr = _lookup< + late final _CFRunLoopContainsSourcePtr = _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)>(); + Boolean Function(CFRunLoopRef, CFRunLoopSourceRef, + CFRunLoopMode)>>('CFRunLoopContainsSource'); + late final _CFRunLoopContainsSource = _CFRunLoopContainsSourcePtr.asFunction< + int Function(CFRunLoopRef, CFRunLoopSourceRef, CFRunLoopMode)>(); - int readlinkat( - int arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - int arg3, + void CFRunLoopAddSource( + CFRunLoopRef rl, + CFRunLoopSourceRef source, + CFRunLoopMode mode, ) { - return _readlinkat( - arg0, - arg1, - arg2, - arg3, + return _CFRunLoopAddSource( + rl, + source, + mode, ); } - late final _readlinkatPtr = _lookup< + late final _CFRunLoopAddSourcePtr = _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)>(); + ffi.Void Function(CFRunLoopRef, CFRunLoopSourceRef, + CFRunLoopMode)>>('CFRunLoopAddSource'); + late final _CFRunLoopAddSource = _CFRunLoopAddSourcePtr.asFunction< + void Function(CFRunLoopRef, CFRunLoopSourceRef, CFRunLoopMode)>(); - int symlinkat( - ffi.Pointer arg0, - int arg1, - ffi.Pointer arg2, + void CFRunLoopRemoveSource( + CFRunLoopRef rl, + CFRunLoopSourceRef source, + CFRunLoopMode mode, ) { - return _symlinkat( - arg0, - arg1, - arg2, + return _CFRunLoopRemoveSource( + rl, + source, + mode, ); } - late final _symlinkatPtr = _lookup< + late final _CFRunLoopRemoveSourcePtr = _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)>(); + ffi.Void Function(CFRunLoopRef, CFRunLoopSourceRef, + CFRunLoopMode)>>('CFRunLoopRemoveSource'); + late final _CFRunLoopRemoveSource = _CFRunLoopRemoveSourcePtr.asFunction< + void Function(CFRunLoopRef, CFRunLoopSourceRef, CFRunLoopMode)>(); - int unlinkat( - int arg0, - ffi.Pointer arg1, - int arg2, + int CFRunLoopContainsObserver( + CFRunLoopRef rl, + CFRunLoopObserverRef observer, + CFRunLoopMode mode, ) { - return _unlinkat( - arg0, - arg1, - arg2, + return _CFRunLoopContainsObserver( + rl, + observer, + mode, ); } - late final _unlinkatPtr = _lookup< + late final _CFRunLoopContainsObserverPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Int, ffi.Pointer, ffi.Int)>>('unlinkat'); - late final _unlinkat = - _unlinkatPtr.asFunction, int)>(); + Boolean Function(CFRunLoopRef, CFRunLoopObserverRef, + CFRunLoopMode)>>('CFRunLoopContainsObserver'); + late final _CFRunLoopContainsObserver = + _CFRunLoopContainsObserverPtr.asFunction< + int Function(CFRunLoopRef, CFRunLoopObserverRef, CFRunLoopMode)>(); - void _exit( - int arg0, + void CFRunLoopAddObserver( + CFRunLoopRef rl, + CFRunLoopObserverRef observer, + CFRunLoopMode mode, ) { - return __exit( - arg0, + return _CFRunLoopAddObserver( + rl, + observer, + mode, ); } - late final __exitPtr = - _lookup>('_exit'); - late final __exit = __exitPtr.asFunction(); + late final _CFRunLoopAddObserverPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFRunLoopRef, CFRunLoopObserverRef, + CFRunLoopMode)>>('CFRunLoopAddObserver'); + late final _CFRunLoopAddObserver = _CFRunLoopAddObserverPtr.asFunction< + void Function(CFRunLoopRef, CFRunLoopObserverRef, CFRunLoopMode)>(); - int access( - ffi.Pointer arg0, - int arg1, + void CFRunLoopRemoveObserver( + CFRunLoopRef rl, + CFRunLoopObserverRef observer, + CFRunLoopMode mode, ) { - return _access( - arg0, - arg1, + return _CFRunLoopRemoveObserver( + rl, + observer, + mode, ); } - late final _accessPtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - 'access'); - late final _access = - _accessPtr.asFunction, int)>(); + late final _CFRunLoopRemoveObserverPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFRunLoopRef, CFRunLoopObserverRef, + CFRunLoopMode)>>('CFRunLoopRemoveObserver'); + late final _CFRunLoopRemoveObserver = _CFRunLoopRemoveObserverPtr.asFunction< + void Function(CFRunLoopRef, CFRunLoopObserverRef, CFRunLoopMode)>(); - int alarm( - int arg0, + int CFRunLoopContainsTimer( + CFRunLoopRef rl, + CFRunLoopTimerRef timer, + CFRunLoopMode mode, ) { - return _alarm( - arg0, + return _CFRunLoopContainsTimer( + rl, + timer, + mode, ); } - late final _alarmPtr = - _lookup>( - 'alarm'); - late final _alarm = _alarmPtr.asFunction(); + late final _CFRunLoopContainsTimerPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFRunLoopRef, CFRunLoopTimerRef, + CFRunLoopMode)>>('CFRunLoopContainsTimer'); + late final _CFRunLoopContainsTimer = _CFRunLoopContainsTimerPtr.asFunction< + int Function(CFRunLoopRef, CFRunLoopTimerRef, CFRunLoopMode)>(); - int chdir( - ffi.Pointer arg0, + void CFRunLoopAddTimer( + CFRunLoopRef rl, + CFRunLoopTimerRef timer, + CFRunLoopMode mode, ) { - return _chdir( - arg0, + return _CFRunLoopAddTimer( + rl, + timer, + mode, ); } - late final _chdirPtr = - _lookup)>>( - 'chdir'); - late final _chdir = - _chdirPtr.asFunction)>(); + late final _CFRunLoopAddTimerPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFRunLoopRef, CFRunLoopTimerRef, + CFRunLoopMode)>>('CFRunLoopAddTimer'); + late final _CFRunLoopAddTimer = _CFRunLoopAddTimerPtr.asFunction< + void Function(CFRunLoopRef, CFRunLoopTimerRef, CFRunLoopMode)>(); - int chown( - ffi.Pointer arg0, - int arg1, - int arg2, + void CFRunLoopRemoveTimer( + CFRunLoopRef rl, + CFRunLoopTimerRef timer, + CFRunLoopMode mode, ) { - return _chown( - arg0, - arg1, - arg2, + return _CFRunLoopRemoveTimer( + rl, + timer, + mode, ); } - late final _chownPtr = _lookup< + late final _CFRunLoopRemoveTimerPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, uid_t, gid_t)>>('chown'); - late final _chown = - _chownPtr.asFunction, int, int)>(); + ffi.Void Function(CFRunLoopRef, CFRunLoopTimerRef, + CFRunLoopMode)>>('CFRunLoopRemoveTimer'); + late final _CFRunLoopRemoveTimer = _CFRunLoopRemoveTimerPtr.asFunction< + void Function(CFRunLoopRef, CFRunLoopTimerRef, CFRunLoopMode)>(); - int close( - int arg0, + int CFRunLoopSourceGetTypeID() { + return _CFRunLoopSourceGetTypeID(); + } + + late final _CFRunLoopSourceGetTypeIDPtr = + _lookup>( + 'CFRunLoopSourceGetTypeID'); + late final _CFRunLoopSourceGetTypeID = + _CFRunLoopSourceGetTypeIDPtr.asFunction(); + + CFRunLoopSourceRef CFRunLoopSourceCreate( + CFAllocatorRef allocator, + int order, + ffi.Pointer context, ) { - return _close( - arg0, + return _CFRunLoopSourceCreate( + allocator, + order, + context, ); } - late final _closePtr = - _lookup>('close'); - late final _close = _closePtr.asFunction(); + 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 dup( - int arg0, + int CFRunLoopSourceGetOrder( + CFRunLoopSourceRef source, ) { - return _dup( - arg0, + return _CFRunLoopSourceGetOrder( + source, ); } - late final _dupPtr = - _lookup>('dup'); - late final _dup = _dupPtr.asFunction(); + late final _CFRunLoopSourceGetOrderPtr = + _lookup>( + 'CFRunLoopSourceGetOrder'); + late final _CFRunLoopSourceGetOrder = _CFRunLoopSourceGetOrderPtr.asFunction< + int Function(CFRunLoopSourceRef)>(); - int dup2( - int arg0, - int arg1, + void CFRunLoopSourceInvalidate( + CFRunLoopSourceRef source, ) { - return _dup2( - arg0, - arg1, + return _CFRunLoopSourceInvalidate( + source, ); } - late final _dup2Ptr = - _lookup>('dup2'); - late final _dup2 = _dup2Ptr.asFunction(); + late final _CFRunLoopSourceInvalidatePtr = + _lookup>( + 'CFRunLoopSourceInvalidate'); + late final _CFRunLoopSourceInvalidate = _CFRunLoopSourceInvalidatePtr + .asFunction(); - int execl( - ffi.Pointer __path, - ffi.Pointer __arg0, + int CFRunLoopSourceIsValid( + CFRunLoopSourceRef source, ) { - return _execl( - __path, - __arg0, + return _CFRunLoopSourceIsValid( + source, ); } - late final _execlPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('execl'); - late final _execl = _execlPtr - .asFunction, ffi.Pointer)>(); + late final _CFRunLoopSourceIsValidPtr = + _lookup>( + 'CFRunLoopSourceIsValid'); + late final _CFRunLoopSourceIsValid = + _CFRunLoopSourceIsValidPtr.asFunction(); - int execle( - ffi.Pointer __path, - ffi.Pointer __arg0, + void CFRunLoopSourceGetContext( + CFRunLoopSourceRef source, + ffi.Pointer context, ) { - return _execle( - __path, - __arg0, + return _CFRunLoopSourceGetContext( + source, + context, ); } - late final _execlePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('execle'); - late final _execle = _execlePtr - .asFunction, ffi.Pointer)>(); + late final _CFRunLoopSourceGetContextPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFRunLoopSourceRef, ffi.Pointer)>>( + 'CFRunLoopSourceGetContext'); + late final _CFRunLoopSourceGetContext = + _CFRunLoopSourceGetContextPtr.asFunction< + void Function( + CFRunLoopSourceRef, ffi.Pointer)>(); - int execlp( - ffi.Pointer __file, - ffi.Pointer __arg0, + void CFRunLoopSourceSignal( + CFRunLoopSourceRef source, ) { - return _execlp( - __file, - __arg0, + return _CFRunLoopSourceSignal( + source, ); } - late final _execlpPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('execlp'); - late final _execlp = _execlpPtr - .asFunction, ffi.Pointer)>(); + late final _CFRunLoopSourceSignalPtr = + _lookup>( + 'CFRunLoopSourceSignal'); + late final _CFRunLoopSourceSignal = + _CFRunLoopSourceSignalPtr.asFunction(); - int execv( - ffi.Pointer __path, - ffi.Pointer> __argv, + 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 _execv( - __path, - __argv, + return _CFRunLoopObserverCreate( + allocator, + activities, + repeats, + order, + callout, + context, ); } - 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 _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 execve( - ffi.Pointer __file, - ffi.Pointer> __argv, - ffi.Pointer> __envp, + CFRunLoopObserverRef CFRunLoopObserverCreateWithHandler( + CFAllocatorRef allocator, + int activities, + int repeats, + int order, + ffi.Pointer<_ObjCBlock> block, ) { - return _execve( - __file, - __argv, - __envp, + return _CFRunLoopObserverCreateWithHandler( + allocator, + activities, + repeats, + order, + block, ); } - late final _execvePtr = _lookup< + late final _CFRunLoopObserverCreateWithHandlerPtr = _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>)>(); + 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 execvp( - ffi.Pointer __file, - ffi.Pointer> __argv, + int CFRunLoopObserverGetActivities( + CFRunLoopObserverRef observer, ) { - return _execvp( - __file, - __argv, + return _CFRunLoopObserverGetActivities( + observer, ); } - 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 _CFRunLoopObserverGetActivitiesPtr = + _lookup>( + 'CFRunLoopObserverGetActivities'); + late final _CFRunLoopObserverGetActivities = + _CFRunLoopObserverGetActivitiesPtr.asFunction< + int Function(CFRunLoopObserverRef)>(); - int fork() { - return _fork(); + int CFRunLoopObserverDoesRepeat( + CFRunLoopObserverRef observer, + ) { + return _CFRunLoopObserverDoesRepeat( + observer, + ); } - late final _forkPtr = _lookup>('fork'); - late final _fork = _forkPtr.asFunction(); + late final _CFRunLoopObserverDoesRepeatPtr = + _lookup>( + 'CFRunLoopObserverDoesRepeat'); + late final _CFRunLoopObserverDoesRepeat = _CFRunLoopObserverDoesRepeatPtr + .asFunction(); - int fpathconf( - int arg0, - int arg1, + int CFRunLoopObserverGetOrder( + CFRunLoopObserverRef observer, ) { - return _fpathconf( - arg0, - arg1, + return _CFRunLoopObserverGetOrder( + observer, ); } - late final _fpathconfPtr = - _lookup>( - 'fpathconf'); - late final _fpathconf = _fpathconfPtr.asFunction(); + late final _CFRunLoopObserverGetOrderPtr = + _lookup>( + 'CFRunLoopObserverGetOrder'); + late final _CFRunLoopObserverGetOrder = _CFRunLoopObserverGetOrderPtr + .asFunction(); - ffi.Pointer getcwd( - ffi.Pointer arg0, - int arg1, + void CFRunLoopObserverInvalidate( + CFRunLoopObserverRef observer, ) { - return _getcwd( - arg0, - arg1, + return _CFRunLoopObserverInvalidate( + observer, ); } - 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 _CFRunLoopObserverInvalidatePtr = + _lookup>( + 'CFRunLoopObserverInvalidate'); + late final _CFRunLoopObserverInvalidate = _CFRunLoopObserverInvalidatePtr + .asFunction(); - int getegid() { - return _getegid(); + int CFRunLoopObserverIsValid( + CFRunLoopObserverRef observer, + ) { + return _CFRunLoopObserverIsValid( + observer, + ); } - late final _getegidPtr = - _lookup>('getegid'); - late final _getegid = _getegidPtr.asFunction(); + late final _CFRunLoopObserverIsValidPtr = + _lookup>( + 'CFRunLoopObserverIsValid'); + late final _CFRunLoopObserverIsValid = _CFRunLoopObserverIsValidPtr + .asFunction(); - int geteuid() { - return _geteuid(); + void CFRunLoopObserverGetContext( + CFRunLoopObserverRef observer, + ffi.Pointer context, + ) { + return _CFRunLoopObserverGetContext( + observer, + context, + ); } - late final _geteuidPtr = - _lookup>('geteuid'); - late final _geteuid = _geteuidPtr.asFunction(); + late final _CFRunLoopObserverGetContextPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFRunLoopObserverRef, + ffi.Pointer)>>( + 'CFRunLoopObserverGetContext'); + late final _CFRunLoopObserverGetContext = + _CFRunLoopObserverGetContextPtr.asFunction< + void Function( + CFRunLoopObserverRef, ffi.Pointer)>(); - int getgid() { - return _getgid(); + int CFRunLoopTimerGetTypeID() { + return _CFRunLoopTimerGetTypeID(); } - late final _getgidPtr = - _lookup>('getgid'); - late final _getgid = _getgidPtr.asFunction(); + late final _CFRunLoopTimerGetTypeIDPtr = + _lookup>( + 'CFRunLoopTimerGetTypeID'); + late final _CFRunLoopTimerGetTypeID = + _CFRunLoopTimerGetTypeIDPtr.asFunction(); - int getgroups( - int arg0, - ffi.Pointer arg1, + CFRunLoopTimerRef CFRunLoopTimerCreate( + CFAllocatorRef allocator, + double fireDate, + double interval, + int flags, + int order, + CFRunLoopTimerCallBack callout, + ffi.Pointer context, ) { - return _getgroups( - arg0, - arg1, + return _CFRunLoopTimerCreate( + allocator, + fireDate, + interval, + flags, + order, + callout, + context, ); } - 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(); + 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)>(); - int getuid() { - return _getuid(); + 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 _getuidPtr = - _lookup>('getuid'); - late final _getuid = _getuidPtr.asFunction(); + 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>)>(); - int isatty( - int arg0, + double CFRunLoopTimerGetNextFireDate( + CFRunLoopTimerRef timer, ) { - return _isatty( - arg0, + return _CFRunLoopTimerGetNextFireDate( + timer, ); } - late final _isattyPtr = - _lookup>('isatty'); - late final _isatty = _isattyPtr.asFunction(); + late final _CFRunLoopTimerGetNextFireDatePtr = + _lookup>( + 'CFRunLoopTimerGetNextFireDate'); + late final _CFRunLoopTimerGetNextFireDate = _CFRunLoopTimerGetNextFireDatePtr + .asFunction(); - int link( - ffi.Pointer arg0, - ffi.Pointer arg1, + void CFRunLoopTimerSetNextFireDate( + CFRunLoopTimerRef timer, + double fireDate, ) { - return _link( - arg0, - arg1, + return _CFRunLoopTimerSetNextFireDate( + timer, + fireDate, ); } - late final _linkPtr = _lookup< + late final _CFRunLoopTimerSetNextFireDatePtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('link'); - late final _link = _linkPtr - .asFunction, ffi.Pointer)>(); + ffi.Void Function(CFRunLoopTimerRef, + CFAbsoluteTime)>>('CFRunLoopTimerSetNextFireDate'); + late final _CFRunLoopTimerSetNextFireDate = _CFRunLoopTimerSetNextFireDatePtr + .asFunction(); - int lseek( - int arg0, - int arg1, - int arg2, + double CFRunLoopTimerGetInterval( + CFRunLoopTimerRef timer, ) { - return _lseek( - arg0, - arg1, - arg2, + return _CFRunLoopTimerGetInterval( + timer, ); } - late final _lseekPtr = - _lookup>( - 'lseek'); - late final _lseek = _lseekPtr.asFunction(); + late final _CFRunLoopTimerGetIntervalPtr = + _lookup>( + 'CFRunLoopTimerGetInterval'); + late final _CFRunLoopTimerGetInterval = _CFRunLoopTimerGetIntervalPtr + .asFunction(); - int pathconf( - ffi.Pointer arg0, - int arg1, + int CFRunLoopTimerDoesRepeat( + CFRunLoopTimerRef timer, ) { - return _pathconf( - arg0, - arg1, + return _CFRunLoopTimerDoesRepeat( + timer, ); } - late final _pathconfPtr = _lookup< - ffi.NativeFunction< - ffi.Long Function(ffi.Pointer, ffi.Int)>>('pathconf'); - late final _pathconf = - _pathconfPtr.asFunction, int)>(); + late final _CFRunLoopTimerDoesRepeatPtr = + _lookup>( + 'CFRunLoopTimerDoesRepeat'); + late final _CFRunLoopTimerDoesRepeat = _CFRunLoopTimerDoesRepeatPtr + .asFunction(); - int pause() { - return _pause(); + int CFRunLoopTimerGetOrder( + CFRunLoopTimerRef timer, + ) { + return _CFRunLoopTimerGetOrder( + timer, + ); } - late final _pausePtr = - _lookup>('pause'); - late final _pause = _pausePtr.asFunction(); + late final _CFRunLoopTimerGetOrderPtr = + _lookup>( + 'CFRunLoopTimerGetOrder'); + late final _CFRunLoopTimerGetOrder = + _CFRunLoopTimerGetOrderPtr.asFunction(); - int pipe( - ffi.Pointer arg0, + void CFRunLoopTimerInvalidate( + CFRunLoopTimerRef timer, ) { - return _pipe( - arg0, + return _CFRunLoopTimerInvalidate( + timer, ); } - late final _pipePtr = - _lookup)>>( - 'pipe'); - late final _pipe = _pipePtr.asFunction)>(); + late final _CFRunLoopTimerInvalidatePtr = + _lookup>( + 'CFRunLoopTimerInvalidate'); + late final _CFRunLoopTimerInvalidate = _CFRunLoopTimerInvalidatePtr + .asFunction(); - int read( - int arg0, - ffi.Pointer arg1, - int arg2, + int CFRunLoopTimerIsValid( + CFRunLoopTimerRef timer, ) { - return _read( - arg0, - arg1, - arg2, + return _CFRunLoopTimerIsValid( + timer, ); } - late final _readPtr = _lookup< - ffi.NativeFunction< - ssize_t Function(ffi.Int, ffi.Pointer, ffi.Size)>>('read'); - late final _read = - _readPtr.asFunction, int)>(); + late final _CFRunLoopTimerIsValidPtr = + _lookup>( + 'CFRunLoopTimerIsValid'); + late final _CFRunLoopTimerIsValid = + _CFRunLoopTimerIsValidPtr.asFunction(); - int rmdir( - ffi.Pointer arg0, + void CFRunLoopTimerGetContext( + CFRunLoopTimerRef timer, + ffi.Pointer context, ) { - return _rmdir( - arg0, + return _CFRunLoopTimerGetContext( + timer, + context, ); } - late final _rmdirPtr = - _lookup)>>( - 'rmdir'); - late final _rmdir = - _rmdirPtr.asFunction)>(); + late final _CFRunLoopTimerGetContextPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFRunLoopTimerRef, + ffi.Pointer)>>('CFRunLoopTimerGetContext'); + late final _CFRunLoopTimerGetContext = + _CFRunLoopTimerGetContextPtr.asFunction< + void Function( + CFRunLoopTimerRef, ffi.Pointer)>(); - int setgid( - int arg0, + double CFRunLoopTimerGetTolerance( + CFRunLoopTimerRef timer, ) { - return _setgid( - arg0, + return _CFRunLoopTimerGetTolerance( + timer, ); } - late final _setgidPtr = - _lookup>('setgid'); - late final _setgid = _setgidPtr.asFunction(); + late final _CFRunLoopTimerGetTolerancePtr = + _lookup>( + 'CFRunLoopTimerGetTolerance'); + late final _CFRunLoopTimerGetTolerance = _CFRunLoopTimerGetTolerancePtr + .asFunction(); - int setpgid( - int arg0, - int arg1, + void CFRunLoopTimerSetTolerance( + CFRunLoopTimerRef timer, + double tolerance, ) { - return _setpgid( - arg0, - arg1, + return _CFRunLoopTimerSetTolerance( + timer, + tolerance, ); } - late final _setpgidPtr = - _lookup>('setpgid'); - late final _setpgid = _setpgidPtr.asFunction(); + late final _CFRunLoopTimerSetTolerancePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFRunLoopTimerRef, + CFTimeInterval)>>('CFRunLoopTimerSetTolerance'); + late final _CFRunLoopTimerSetTolerance = _CFRunLoopTimerSetTolerancePtr + .asFunction(); - int setsid() { - return _setsid(); + int CFSocketGetTypeID() { + return _CFSocketGetTypeID(); } - late final _setsidPtr = - _lookup>('setsid'); - late final _setsid = _setsidPtr.asFunction(); + late final _CFSocketGetTypeIDPtr = + _lookup>('CFSocketGetTypeID'); + late final _CFSocketGetTypeID = + _CFSocketGetTypeIDPtr.asFunction(); - int setuid( - int arg0, + CFSocketRef CFSocketCreate( + CFAllocatorRef allocator, + int protocolFamily, + int socketType, + int protocol, + int callBackTypes, + CFSocketCallBack callout, + ffi.Pointer context, ) { - return _setuid( - arg0, + return _CFSocketCreate( + allocator, + protocolFamily, + socketType, + protocol, + callBackTypes, + callout, + context, ); } - late final _setuidPtr = - _lookup>('setuid'); - late final _setuid = _setuidPtr.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 sleep( - int arg0, + CFSocketRef CFSocketCreateWithNative( + CFAllocatorRef allocator, + int sock, + int callBackTypes, + CFSocketCallBack callout, + ffi.Pointer context, ) { - return _sleep( - arg0, + return _CFSocketCreateWithNative( + allocator, + sock, + callBackTypes, + callout, + context, ); } - late final _sleepPtr = - _lookup>( - 'sleep'); - late final _sleep = _sleepPtr.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 sysconf( - int arg0, + CFSocketRef CFSocketCreateWithSocketSignature( + CFAllocatorRef allocator, + ffi.Pointer signature, + int callBackTypes, + CFSocketCallBack callout, + ffi.Pointer context, ) { - return _sysconf( - arg0, + return _CFSocketCreateWithSocketSignature( + allocator, + signature, + callBackTypes, + callout, + context, ); } - late final _sysconfPtr = - _lookup>('sysconf'); - late final _sysconf = _sysconfPtr.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 tcgetpgrp( - int arg0, + CFSocketRef CFSocketCreateConnectedToSocketSignature( + CFAllocatorRef allocator, + ffi.Pointer signature, + int callBackTypes, + CFSocketCallBack callout, + ffi.Pointer context, + double timeout, ) { - return _tcgetpgrp( - arg0, + return _CFSocketCreateConnectedToSocketSignature( + allocator, + signature, + callBackTypes, + callout, + context, + timeout, ); } - late final _tcgetpgrpPtr = - _lookup>('tcgetpgrp'); - late final _tcgetpgrp = _tcgetpgrpPtr.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 tcsetpgrp( - int arg0, - int arg1, + int CFSocketSetAddress( + CFSocketRef s, + CFDataRef address, ) { - return _tcsetpgrp( - arg0, - arg1, + return _CFSocketSetAddress( + s, + address, ); } - late final _tcsetpgrpPtr = - _lookup>( - 'tcsetpgrp'); - late final _tcsetpgrp = _tcsetpgrpPtr.asFunction(); + late final _CFSocketSetAddressPtr = + _lookup>( + 'CFSocketSetAddress'); + late final _CFSocketSetAddress = + _CFSocketSetAddressPtr.asFunction(); - ffi.Pointer ttyname( - int arg0, + int CFSocketConnectToAddress( + CFSocketRef s, + CFDataRef address, + double timeout, ) { - return _ttyname( - arg0, + return _CFSocketConnectToAddress( + s, + address, + timeout, ); } - late final _ttynamePtr = - _lookup Function(ffi.Int)>>( - 'ttyname'); - late final _ttyname = - _ttynamePtr.asFunction Function(int)>(); + late final _CFSocketConnectToAddressPtr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function(CFSocketRef, CFDataRef, + CFTimeInterval)>>('CFSocketConnectToAddress'); + late final _CFSocketConnectToAddress = _CFSocketConnectToAddressPtr + .asFunction(); - int ttyname_r( - int arg0, - ffi.Pointer arg1, - int arg2, + void CFSocketInvalidate( + CFSocketRef s, ) { - return _ttyname_r( - arg0, - arg1, - arg2, + return _CFSocketInvalidate( + s, ); } - 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 _CFSocketInvalidatePtr = + _lookup>( + 'CFSocketInvalidate'); + late final _CFSocketInvalidate = + _CFSocketInvalidatePtr.asFunction(); - int unlink( - ffi.Pointer arg0, + int CFSocketIsValid( + CFSocketRef s, ) { - return _unlink( - arg0, + return _CFSocketIsValid( + s, ); } - late final _unlinkPtr = - _lookup)>>( - 'unlink'); - late final _unlink = - _unlinkPtr.asFunction)>(); + late final _CFSocketIsValidPtr = + _lookup>( + 'CFSocketIsValid'); + late final _CFSocketIsValid = + _CFSocketIsValidPtr.asFunction(); - int write( - int __fd, - ffi.Pointer __buf, - int __nbyte, + CFDataRef CFSocketCopyAddress( + CFSocketRef s, ) { - return _write( - __fd, - __buf, - __nbyte, + return _CFSocketCopyAddress( + s, ); } - late final _writePtr = _lookup< - ffi.NativeFunction< - ssize_t Function(ffi.Int, ffi.Pointer, ffi.Size)>>('write'); - late final _write = - _writePtr.asFunction, int)>(); + late final _CFSocketCopyAddressPtr = + _lookup>( + 'CFSocketCopyAddress'); + late final _CFSocketCopyAddress = + _CFSocketCopyAddressPtr.asFunction(); - int confstr( - int arg0, - ffi.Pointer arg1, - int arg2, + CFDataRef CFSocketCopyPeerAddress( + CFSocketRef s, ) { - return _confstr( - arg0, - arg1, - arg2, + return _CFSocketCopyPeerAddress( + 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 _CFSocketCopyPeerAddressPtr = + _lookup>( + 'CFSocketCopyPeerAddress'); + late final _CFSocketCopyPeerAddress = + _CFSocketCopyPeerAddressPtr.asFunction(); - int getopt( - int arg0, - ffi.Pointer> arg1, - ffi.Pointer arg2, + void CFSocketGetContext( + CFSocketRef s, + ffi.Pointer context, ) { - return _getopt( - arg0, - arg1, - arg2, + return _CFSocketGetContext( + s, + context, ); } - late final _getoptPtr = _lookup< + late final _CFSocketGetContextPtr = _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; + ffi.Void Function(CFSocketRef, + ffi.Pointer)>>('CFSocketGetContext'); + late final _CFSocketGetContext = _CFSocketGetContextPtr.asFunction< + void Function(CFSocketRef, ffi.Pointer)>(); - set optarg(ffi.Pointer value) => _optarg.value = value; + int CFSocketGetNative( + CFSocketRef s, + ) { + return _CFSocketGetNative( + s, + ); + } - late final ffi.Pointer _optind = _lookup('optind'); + late final _CFSocketGetNativePtr = + _lookup>( + 'CFSocketGetNative'); + late final _CFSocketGetNative = + _CFSocketGetNativePtr.asFunction(); - int get optind => _optind.value; + CFRunLoopSourceRef CFSocketCreateRunLoopSource( + CFAllocatorRef allocator, + CFSocketRef s, + int order, + ) { + return _CFSocketCreateRunLoopSource( + allocator, + s, + order, + ); + } - set optind(int value) => _optind.value = 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 _opterr = _lookup('opterr'); + int CFSocketGetSocketFlags( + CFSocketRef s, + ) { + return _CFSocketGetSocketFlags( + s, + ); + } - int get opterr => _opterr.value; + late final _CFSocketGetSocketFlagsPtr = + _lookup>( + 'CFSocketGetSocketFlags'); + late final _CFSocketGetSocketFlags = + _CFSocketGetSocketFlagsPtr.asFunction(); - set opterr(int value) => _opterr.value = value; + void CFSocketSetSocketFlags( + CFSocketRef s, + int flags, + ) { + return _CFSocketSetSocketFlags( + s, + flags, + ); + } - late final ffi.Pointer _optopt = _lookup('optopt'); + late final _CFSocketSetSocketFlagsPtr = _lookup< + ffi.NativeFunction>( + 'CFSocketSetSocketFlags'); + late final _CFSocketSetSocketFlags = + _CFSocketSetSocketFlagsPtr.asFunction(); - int get optopt => _optopt.value; + void CFSocketDisableCallBacks( + CFSocketRef s, + int callBackTypes, + ) { + return _CFSocketDisableCallBacks( + s, + callBackTypes, + ); + } - set optopt(int value) => _optopt.value = value; + late final _CFSocketDisableCallBacksPtr = _lookup< + ffi.NativeFunction>( + 'CFSocketDisableCallBacks'); + late final _CFSocketDisableCallBacks = _CFSocketDisableCallBacksPtr + .asFunction(); - ffi.Pointer brk( - ffi.Pointer arg0, + void CFSocketEnableCallBacks( + CFSocketRef s, + int callBackTypes, ) { - return _brk( - arg0, + return _CFSocketEnableCallBacks( + s, + callBackTypes, ); } - late final _brkPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('brk'); - late final _brk = _brkPtr - .asFunction Function(ffi.Pointer)>(); + late final _CFSocketEnableCallBacksPtr = _lookup< + ffi.NativeFunction>( + 'CFSocketEnableCallBacks'); + late final _CFSocketEnableCallBacks = + _CFSocketEnableCallBacksPtr.asFunction(); - int chroot( - ffi.Pointer arg0, + int CFSocketSendData( + CFSocketRef s, + CFDataRef address, + CFDataRef data, + double timeout, ) { - return _chroot( - arg0, + return _CFSocketSendData( + s, + address, + data, + timeout, ); } - late final _chrootPtr = - _lookup)>>( - 'chroot'); - late final _chroot = - _chrootPtr.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 crypt( - ffi.Pointer arg0, - ffi.Pointer arg1, + int CFSocketRegisterValue( + ffi.Pointer nameServerSignature, + double timeout, + CFStringRef name, + CFPropertyListRef value, ) { - return _crypt( - arg0, - arg1, + return _CFSocketRegisterValue( + nameServerSignature, + timeout, + name, + value, ); } - late final _cryptPtr = _lookup< + late final _CFSocketRegisterValuePtr = _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(ffi.Pointer, CFTimeInterval, + CFStringRef, CFPropertyListRef)>>('CFSocketRegisterValue'); + late final _CFSocketRegisterValue = _CFSocketRegisterValuePtr.asFunction< + int Function(ffi.Pointer, double, CFStringRef, + CFPropertyListRef)>(); - void encrypt( - ffi.Pointer arg0, - int arg1, + int CFSocketCopyRegisteredValue( + ffi.Pointer nameServerSignature, + double timeout, + CFStringRef name, + ffi.Pointer value, + ffi.Pointer nameServerAddress, ) { - return _encrypt( - arg0, - arg1, + return _CFSocketCopyRegisteredValue( + nameServerSignature, + timeout, + name, + value, + nameServerAddress, ); } - late final _encryptPtr = _lookup< + late final _CFSocketCopyRegisteredValuePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Int)>>('encrypt'); - late final _encrypt = - _encryptPtr.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 fchdir( - int arg0, + int CFSocketRegisterSocketSignature( + ffi.Pointer nameServerSignature, + double timeout, + CFStringRef name, + ffi.Pointer signature, ) { - return _fchdir( - arg0, + return _CFSocketRegisterSocketSignature( + nameServerSignature, + timeout, + name, + signature, ); } - late final _fchdirPtr = - _lookup>('fchdir'); - late final _fchdir = _fchdirPtr.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 gethostid() { - return _gethostid(); + int CFSocketCopyRegisteredSocketSignature( + ffi.Pointer nameServerSignature, + double timeout, + CFStringRef name, + ffi.Pointer signature, + ffi.Pointer nameServerAddress, + ) { + return _CFSocketCopyRegisteredSocketSignature( + nameServerSignature, + timeout, + name, + signature, + nameServerAddress, + ); } - late final _gethostidPtr = - _lookup>('gethostid'); - late final _gethostid = _gethostidPtr.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 getpgid( - int arg0, + int CFSocketUnregister( + ffi.Pointer nameServerSignature, + double timeout, + CFStringRef name, ) { - return _getpgid( - arg0, + return _CFSocketUnregister( + nameServerSignature, + timeout, + name, ); } - late final _getpgidPtr = - _lookup>('getpgid'); - late final _getpgid = _getpgidPtr.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 getsid( - int arg0, + void CFSocketSetDefaultNameRegistryPortNumber( + int port, ) { - return _getsid( - arg0, + return _CFSocketSetDefaultNameRegistryPortNumber( + port, ); } - late final _getsidPtr = - _lookup>('getsid'); - late final _getsid = _getsidPtr.asFunction(); + late final _CFSocketSetDefaultNameRegistryPortNumberPtr = + _lookup>( + 'CFSocketSetDefaultNameRegistryPortNumber'); + late final _CFSocketSetDefaultNameRegistryPortNumber = + _CFSocketSetDefaultNameRegistryPortNumberPtr.asFunction< + void Function(int)>(); - int getdtablesize() { - return _getdtablesize(); + int CFSocketGetDefaultNameRegistryPortNumber() { + return _CFSocketGetDefaultNameRegistryPortNumber(); } - late final _getdtablesizePtr = - _lookup>('getdtablesize'); - late final _getdtablesize = _getdtablesizePtr.asFunction(); + late final _CFSocketGetDefaultNameRegistryPortNumberPtr = + _lookup>( + 'CFSocketGetDefaultNameRegistryPortNumber'); + late final _CFSocketGetDefaultNameRegistryPortNumber = + _CFSocketGetDefaultNameRegistryPortNumberPtr.asFunction(); - int getpagesize() { - return _getpagesize(); - } + late final ffi.Pointer _kCFSocketCommandKey = + _lookup('kCFSocketCommandKey'); - late final _getpagesizePtr = - _lookup>('getpagesize'); - late final _getpagesize = _getpagesizePtr.asFunction(); + CFStringRef get kCFSocketCommandKey => _kCFSocketCommandKey.value; - ffi.Pointer getpass( - ffi.Pointer arg0, + 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 _getpass( + return _getattrlistbulk( arg0, + arg1, + arg2, + arg3, + arg4, ); } - late final _getpassPtr = _lookup< + late final _getattrlistbulkPtr = _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.Pointer, ffi.Size, ffi.Uint64)>>('getattrlistbulk'); + late final _getattrlistbulk = _getattrlistbulkPtr.asFunction< + int Function( + int, ffi.Pointer, ffi.Pointer, int, int)>(); - ffi.Pointer getwd( - ffi.Pointer arg0, + int getattrlistat( + int arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + int arg4, + int arg5, ) { - return _getwd( + return _getattrlistat( arg0, + arg1, + arg2, + arg3, + arg4, + arg5, ); } - late final _getwdPtr = _lookup< + late final _getattrlistatPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('getwd'); - late final _getwd = _getwdPtr - .asFunction Function(ffi.Pointer)>(); + 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 lchown( - ffi.Pointer arg0, - int arg1, - int arg2, + int setattrlistat( + int arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + int arg4, + int arg5, ) { - return _lchown( + return _setattrlistat( arg0, arg1, arg2, + arg3, + arg4, + arg5, ); } - late final _lchownPtr = _lookup< + late final _setattrlistatPtr = _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.Pointer, + ffi.Size, + ffi.Uint32)>>('setattrlistat'); + late final _setattrlistat = _setattrlistatPtr.asFunction< + int Function(int, ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, int)>(); - int lockf( + int freadlink( int arg0, - int arg1, + ffi.Pointer arg1, int arg2, ) { - return _lockf( + return _freadlink( arg0, arg1, arg2, ); } - late final _lockfPtr = - _lookup>( - 'lockf'); - late final _lockf = _lockfPtr.asFunction(); + late final _freadlinkPtr = _lookup< + ffi.NativeFunction< + ssize_t Function( + ffi.Int, ffi.Pointer, ffi.Size)>>('freadlink'); + late final _freadlink = + _freadlinkPtr.asFunction, int)>(); - int nice( + int faccessat( int arg0, + ffi.Pointer arg1, + int arg2, + int arg3, ) { - return _nice( + return _faccessat( arg0, + arg1, + arg2, + arg3, ); } - 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< + 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(); - - 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(); + late final _unlinkatPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Int, ffi.Pointer, ffi.Int)>>('unlinkat'); + late final _unlinkat = + _unlinkatPtr.asFunction, int)>(); - int ftruncate( + void _exit( int arg0, - int arg1, ) { - return _ftruncate( + return __exit( arg0, - arg1, ); } - late final _ftruncatePtr = - _lookup>( - 'ftruncate'); - late final _ftruncate = _ftruncatePtr.asFunction(); + late final __exitPtr = + _lookup>('_exit'); + late final __exit = __exitPtr.asFunction(); - int getlogin_r( + int access( ffi.Pointer arg0, int arg1, ) { - return _getlogin_r( + return _access( 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 _accessPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'access'); + late final _access = + _accessPtr.asFunction, int)>(); - int fchown( + int alarm( int arg0, - int arg1, - int arg2, ) { - return _fchown( + return _alarm( arg0, - arg1, - arg2, ); } - late final _fchownPtr = - _lookup>( - 'fchown'); - late final _fchown = _fchownPtr.asFunction(); + late final _alarmPtr = + _lookup>( + 'alarm'); + late final _alarm = _alarmPtr.asFunction(); - int gethostname( + int chdir( ffi.Pointer arg0, - int arg1, ) { - return _gethostname( + return _chdir( arg0, - arg1, ); } - late final _gethostnamePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Size)>>('gethostname'); - late final _gethostname = - _gethostnamePtr.asFunction, int)>(); + late final _chdirPtr = + _lookup)>>( + 'chdir'); + late final _chdir = + _chdirPtr.asFunction)>(); - int readlink( + int chown( ffi.Pointer arg0, - ffi.Pointer arg1, + int arg1, int arg2, ) { - return _readlink( + return _chown( arg0, arg1, arg2, ); } - late final _readlinkPtr = _lookup< + late final _chownPtr = _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)>(); + ffi.Int Function(ffi.Pointer, uid_t, gid_t)>>('chown'); + late final _chown = + _chownPtr.asFunction, int, int)>(); - int setegid( + int close( int arg0, ) { - return _setegid( + return _close( arg0, ); } - late final _setegidPtr = - _lookup>('setegid'); - late final _setegid = _setegidPtr.asFunction(); + late final _closePtr = + _lookup>('close'); + late final _close = _closePtr.asFunction(); - int seteuid( + int dup( int arg0, ) { - return _seteuid( + return _dup( arg0, ); } - late final _seteuidPtr = - _lookup>('seteuid'); - late final _seteuid = _seteuidPtr.asFunction(); + late final _dupPtr = + _lookup>('dup'); + late final _dup = _dupPtr.asFunction(); - int symlink( - ffi.Pointer arg0, - ffi.Pointer arg1, + int dup2( + int arg0, + int arg1, ) { - return _symlink( + return _dup2( arg0, arg1, ); } - late final _symlinkPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('symlink'); - late final _symlink = _symlinkPtr - .asFunction, ffi.Pointer)>(); + late final _dup2Ptr = + _lookup>('dup2'); + late final _dup2 = _dup2Ptr.asFunction(); - int pselect( - int arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3, - ffi.Pointer arg4, - ffi.Pointer arg5, + int execl( + ffi.Pointer __path, + ffi.Pointer __arg0, ) { - return _pselect( - arg0, - arg1, - arg2, - arg3, - arg4, - arg5, + return _execl( + __path, + __arg0, ); } - late final _pselectPtr = _lookup< + late final _execlPtr = _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)>>('execl'); + late final _execl = _execlPtr + .asFunction, ffi.Pointer)>(); - int select( - int arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3, - ffi.Pointer arg4, + int execle( + ffi.Pointer __path, + ffi.Pointer __arg0, ) { - return _select( - arg0, - arg1, - arg2, - arg3, - arg4, + return _execle( + __path, + __arg0, ); } - late final _selectPtr = _lookup< + late final _execlePtr = _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)>>('execle'); + late final _execle = _execlePtr + .asFunction, ffi.Pointer)>(); - int accessx_np( - ffi.Pointer arg0, - int arg1, - ffi.Pointer arg2, - int arg3, + int execlp( + ffi.Pointer __file, + ffi.Pointer __arg0, ) { - return _accessx_np( - arg0, - arg1, - arg2, - arg3, + return _execlp( + __file, + __arg0, ); } - late final _accessx_npPtr = _lookup< + late final _execlpPtr = _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)>(); + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('execlp'); + late final _execlp = _execlpPtr + .asFunction, ffi.Pointer)>(); - int acct( - ffi.Pointer arg0, + int execv( + ffi.Pointer __path, + ffi.Pointer> __argv, ) { - return _acct( - arg0, + return _execv( + __path, + __argv, ); } - late final _acctPtr = - _lookup)>>( - 'acct'); - late final _acct = _acctPtr.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 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.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)>(); + late final _setuidPtr = + _lookup>('setuid'); + late final _setuid = _setuidPtr.asFunction(); - int mkstemp_dprotected_np( - ffi.Pointer path, - int dpclass, - int dpflags, + int sleep( + int arg0, ) { - return _mkstemp_dprotected_np( - path, - dpclass, - dpflags, + return _sleep( + arg0, ); } - 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)>(); + late final _sleepPtr = + _lookup>( + 'sleep'); + late final _sleep = _sleepPtr.asFunction(); - ffi.Pointer mkdtempat_np( - int dfd, - ffi.Pointer path, + int sysconf( + int arg0, ) { - return _mkdtempat_np( - dfd, - path, + return _sysconf( + arg0, ); } - 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 _sysconfPtr = + _lookup>('sysconf'); + late final _sysconf = _sysconfPtr.asFunction(); - int mkstempsat_np( - int dfd, - ffi.Pointer path, - int slen, + int tcgetpgrp( + int arg0, ) { - return _mkstempsat_np( - dfd, - path, - slen, + return _tcgetpgrp( + 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 _tcgetpgrpPtr = + _lookup>('tcgetpgrp'); + late final _tcgetpgrp = _tcgetpgrpPtr.asFunction(); - int mkostempsat_np( - int dfd, - ffi.Pointer path, - int slen, - int oflags, + int tcsetpgrp( + int arg0, + int arg1, ) { - return _mkostempsat_np( - dfd, - path, - slen, - oflags, + return _tcsetpgrp( + arg0, + arg1, ); } - 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 _tcsetpgrpPtr = + _lookup>( + 'tcsetpgrp'); + late final _tcsetpgrp = _tcsetpgrpPtr.asFunction(); - int nfssvc( + ffi.Pointer ttyname( int arg0, - ffi.Pointer arg1, ) { - return _nfssvc( + return _ttyname( arg0, - arg1, ); } - late final _nfssvcPtr = _lookup< - ffi.NativeFunction)>>( - 'nfssvc'); - late final _nfssvc = - _nfssvcPtr.asFunction)>(); + late final _ttynamePtr = + _lookup Function(ffi.Int)>>( + 'ttyname'); + late final _ttyname = + _ttynamePtr.asFunction Function(int)>(); - int profil( - ffi.Pointer arg0, - int arg1, + int ttyname_r( + int arg0, + ffi.Pointer arg1, int arg2, - int arg3, ) { - return _profil( + return _ttyname_r( arg0, arg1, arg2, - arg3, ); } - late final _profilPtr = _lookup< + late final _ttyname_rPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Size, ffi.UnsignedLong, - ffi.UnsignedInt)>>('profil'); - late final _profil = _profilPtr - .asFunction, int, int, int)>(); + ffi.Int Function( + ffi.Int, ffi.Pointer, ffi.Size)>>('ttyname_r'); + late final _ttyname_r = + _ttyname_rPtr.asFunction, int)>(); - int pthread_setugid_np( - int arg0, - int arg1, + int unlink( + ffi.Pointer arg0, ) { - return _pthread_setugid_np( + return _unlink( arg0, - arg1, ); } - late final _pthread_setugid_npPtr = - _lookup>( - 'pthread_setugid_np'); - late final _pthread_setugid_np = - _pthread_setugid_npPtr.asFunction(); + late final _unlinkPtr = + _lookup)>>( + 'unlink'); + late final _unlink = + _unlinkPtr.asFunction)>(); - int pthread_getugid_np( - ffi.Pointer arg0, - ffi.Pointer arg1, + int write( + int __fd, + ffi.Pointer __buf, + int __nbyte, ) { - return _pthread_getugid_np( - arg0, - arg1, + return _write( + __fd, + __buf, + __nbyte, ); } - late final _pthread_getugid_npPtr = _lookup< + late final _writePtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('pthread_getugid_np'); - late final _pthread_getugid_np = _pthread_getugid_npPtr - .asFunction, ffi.Pointer)>(); + ssize_t Function(ffi.Int, ffi.Pointer, ffi.Size)>>('write'); + late final _write = + _writePtr.asFunction, int)>(); - int reboot( + int confstr( int arg0, + ffi.Pointer arg1, + int arg2, ) { - return _reboot( + return _confstr( arg0, + arg1, + arg2, ); } - late final _rebootPtr = - _lookup>('reboot'); - late final _reboot = _rebootPtr.asFunction(); + late final _confstrPtr = _lookup< + ffi.NativeFunction< + ffi.Size Function( + ffi.Int, ffi.Pointer, ffi.Size)>>('confstr'); + late final _confstr = + _confstrPtr.asFunction, int)>(); - int revoke( - ffi.Pointer arg0, + int getopt( + int arg0, + ffi.Pointer> arg1, + ffi.Pointer arg2, ) { - return _revoke( + return _getopt( arg0, + arg1, + arg2, ); } - 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< + late final _getoptPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer>, - ffi.Int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('rcmd'); - late final _rcmd = _rcmdPtr.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, 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 ffi.Pointer> _optarg = + _lookup>('optarg'); - 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)>(); + ffi.Pointer get optarg => _optarg.value; - int rresvport( - ffi.Pointer arg0, - ) { - return _rresvport( - arg0, - ); - } + set optarg(ffi.Pointer value) => _optarg.value = value; - late final _rresvportPtr = - _lookup)>>( - 'rresvport'); - late final _rresvport = - _rresvportPtr.asFunction)>(); + late final ffi.Pointer _optind = _lookup('optind'); - int rresvport_af( - ffi.Pointer arg0, - int arg1, + 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< - 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 _encryptPtr = _lookup< + ffi + .NativeFunction, 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, + ); + } + + late final _getlogin_rPtr = _lookup< + ffi + .NativeFunction, 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, - 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)>(); + late final _fchownPtr = + _lookup>( + 'fchown'); + late final _fchown = _fchownPtr.asFunction(); - int setattrlist( + int gethostname( ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - int arg3, - int arg4, + int arg1, ) { - return _setattrlist( + return _gethostname( 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)>(); + late final _gethostnamePtr = _lookup< + ffi + .NativeFunction, 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, + ); + } + + 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, - arg6, - arg7, ); } - late final _getdirentriesattrPtr = _lookup< + late final _pselectPtr = _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.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 searchfs( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - int arg3, - int arg4, - ffi.Pointer arg5, + int select( + int arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4, ) { - return _searchfs( + return _select( arg0, arg1, arg2, arg3, arg4, - arg5, ); } - late final _searchfsPtr = _lookup< + late final _selectPtr = _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.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 fsctl( - ffi.Pointer arg0, + int accessx_np( + ffi.Pointer arg0, int arg1, - ffi.Pointer arg2, + ffi.Pointer arg2, int arg3, ) { - return _fsctl( + return _accessx_np( arg0, arg1, arg2, @@ -33472,20 +33267,34 @@ class NativeCupertinoHttp { ); } - late final _fsctlPtr = _lookup< + late final _accessx_npPtr = _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.Size, + ffi.Pointer, uid_t)>>('accessx_np'); + late final _accessx_np = _accessx_npPtr.asFunction< + int Function( + ffi.Pointer, int, ffi.Pointer, int)>(); - int ffsctl( - int arg0, + 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, - ffi.Pointer arg2, + int arg2, int arg3, ) { - return _ffsctl( + return _add_profil( arg0, arg1, arg2, @@ -33493,29589 +33302,27484 @@ class NativeCupertinoHttp { ); } - late final _ffsctlPtr = _lookup< + late final _add_profilPtr = _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.Size, ffi.UnsignedLong, + ffi.UnsignedInt)>>('add_profil'); + late final _add_profil = _add_profilPtr + .asFunction, int, int, int)>(); - int fsync_volume_np( + 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, - int arg1, ) { - return _fsync_volume_np( + return _fflagstostr( arg0, - arg1, ); } - late final _fsync_volume_npPtr = - _lookup>( - 'fsync_volume_np'); - late final _fsync_volume_np = - _fsync_volume_npPtr.asFunction(); + late final _fflagstostrPtr = _lookup< + ffi.NativeFunction Function(ffi.UnsignedLong)>>( + 'fflagstostr'); + late final _fflagstostr = + _fflagstostrPtr.asFunction Function(int)>(); - int sync_volume_np( + int getdomainname( ffi.Pointer arg0, int arg1, ) { - return _sync_volume_np( + return _getdomainname( arg0, arg1, ); } - late final _sync_volume_npPtr = _lookup< + late final _getdomainnamePtr = _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; + 'getdomainname'); + late final _getdomainname = + _getdomainnamePtr.asFunction, int)>(); - int open( + int getgrouplist( ffi.Pointer arg0, int arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, ) { - return _open( + return _getgrouplist( arg0, arg1, + arg2, + arg3, ); } - late final _openPtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - 'open'); - late final _open = - _openPtr.asFunction, int)>(); + 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 openat( - int arg0, - ffi.Pointer arg1, - int arg2, + int gethostuuid( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _openat( + return _gethostuuid( arg0, arg1, - arg2, ); } - late final _openatPtr = _lookup< + late final _gethostuuidPtr = _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)>>('gethostuuid'); + late final _gethostuuid = _gethostuuidPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - int creat( - ffi.Pointer arg0, + int getmode( + ffi.Pointer arg0, int arg1, ) { - return _creat( + return _getmode( arg0, arg1, ); } - late final _creatPtr = _lookup< - ffi.NativeFunction, mode_t)>>( - 'creat'); - late final _creat = - _creatPtr.asFunction, int)>(); + late final _getmodePtr = _lookup< + ffi.NativeFunction, mode_t)>>( + 'getmode'); + late final _getmode = + _getmodePtr.asFunction, int)>(); - int fcntl( + int getpeereid( int arg0, - int arg1, + ffi.Pointer arg1, + ffi.Pointer arg2, ) { - return _fcntl( + return _getpeereid( arg0, arg1, + arg2, ); } - late final _fcntlPtr = - _lookup>('fcntl'); - late final _fcntl = _fcntlPtr.asFunction(); + late final _getpeereidPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Int, ffi.Pointer, ffi.Pointer)>>('getpeereid'); + late final _getpeereid = _getpeereidPtr + .asFunction, ffi.Pointer)>(); - int openx_np( - ffi.Pointer arg0, - int arg1, - filesec_t arg2, + int getsgroups_np( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _openx_np( + return _getsgroups_np( arg0, arg1, - arg2, ); } - late final _openx_npPtr = _lookup< + late final _getsgroups_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)>(); + ffi.Int Function(ffi.Pointer, + ffi.Pointer)>>('getsgroups_np'); + late final _getsgroups_np = _getsgroups_npPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - int open_dprotected_np( - ffi.Pointer arg0, - int arg1, - int arg2, - int arg3, + 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 _open_dprotected_np( + return _getwgroups_np( arg0, arg1, - arg2, - arg3, ); } - late final _open_dprotected_npPtr = _lookup< + late final _getwgroups_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)>(); + ffi.Int Function(ffi.Pointer, + ffi.Pointer)>>('getwgroups_np'); + late final _getwgroups_np = _getwgroups_npPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - int flock1( - int arg0, + int initgroups( + ffi.Pointer arg0, int arg1, ) { - return _flock1( + return _initgroups( arg0, arg1, ); } - late final _flock1Ptr = - _lookup>('flock'); - late final _flock1 = _flock1Ptr.asFunction(); + late final _initgroupsPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'initgroups'); + late final _initgroups = + _initgroupsPtr.asFunction, int)>(); - filesec_t filesec_init() { - return _filesec_init(); + int issetugid() { + return _issetugid(); } - late final _filesec_initPtr = - _lookup>('filesec_init'); - late final _filesec_init = - _filesec_initPtr.asFunction(); + late final _issetugidPtr = + _lookup>('issetugid'); + late final _issetugid = _issetugidPtr.asFunction(); - filesec_t filesec_dup( - filesec_t arg0, + ffi.Pointer mkdtemp( + ffi.Pointer arg0, ) { - return _filesec_dup( + return _mkdtemp( 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(); + late final _mkdtempPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>>('mkdtemp'); + late final _mkdtemp = _mkdtempPtr + .asFunction Function(ffi.Pointer)>(); - int filesec_get_property( - filesec_t arg0, + int mknod( + ffi.Pointer arg0, int arg1, - ffi.Pointer arg2, + int arg2, ) { - return _filesec_get_property( + return _mknod( arg0, arg1, arg2, ); } - late final _filesec_get_propertyPtr = _lookup< + late final _mknodPtr = _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, mode_t, dev_t)>>('mknod'); + late final _mknod = + _mknodPtr.asFunction, int, int)>(); - int filesec_query_property( - filesec_t arg0, - int arg1, - ffi.Pointer arg2, + int mkpath_np( + ffi.Pointer path, + int omode, ) { - return _filesec_query_property( - arg0, - arg1, - arg2, + return _mkpath_np( + path, + omode, ); } - 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 _mkpath_npPtr = _lookup< + ffi.NativeFunction, mode_t)>>( + 'mkpath_np'); + late final _mkpath_np = + _mkpath_npPtr.asFunction, int)>(); - int filesec_set_property( - filesec_t arg0, - int arg1, - ffi.Pointer arg2, + int mkpathat_np( + int dfd, + ffi.Pointer path, + int omode, ) { - return _filesec_set_property( - arg0, - arg1, - arg2, + return _mkpathat_np( + dfd, + path, + omode, ); } - late final _filesec_set_propertyPtr = _lookup< + late final _mkpathat_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.Int, ffi.Pointer, mode_t)>>('mkpathat_np'); + late final _mkpathat_np = _mkpathat_npPtr + .asFunction, int)>(); - int filesec_unset_property( - filesec_t arg0, + int mkstemps( + ffi.Pointer arg0, int arg1, ) { - return _filesec_unset_property( + return _mkstemps( arg0, arg1, ); } - late final _filesec_unset_propertyPtr = - _lookup>( - 'filesec_unset_property'); - late final _filesec_unset_property = - _filesec_unset_propertyPtr.asFunction(); + late final _mkstempsPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'mkstemps'); + late final _mkstemps = + _mkstempsPtr.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 mkostemp( + ffi.Pointer path, + int oflags, ) { - return _os_workgroup_copy_port( - wg, - mach_port_out, + return _mkostemp( + path, + oflags, ); } - 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 _mkostempPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'mkostemp'); + late final _mkostemp = + _mkostempPtr.asFunction, int)>(); - os_workgroup_t os_workgroup_create_with_port( - ffi.Pointer name, - int mach_port, + int mkostemps( + ffi.Pointer path, + int slen, + int oflags, ) { - return _os_workgroup_create_with_port( - name, - mach_port, + return _mkostemps( + path, + slen, + oflags, ); } - late final _os_workgroup_create_with_portPtr = _lookup< + late final _mkostempsPtr = _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.Int, ffi.Int)>>('mkostemps'); + late final _mkostemps = + _mkostempsPtr.asFunction, int, int)>(); - os_workgroup_t os_workgroup_create_with_workgroup( - ffi.Pointer name, - os_workgroup_t wg, + int mkstemp_dprotected_np( + ffi.Pointer path, + int dpclass, + int dpflags, ) { - return _os_workgroup_create_with_workgroup( - name, - wg, + return _mkstemp_dprotected_np( + path, + dpclass, + dpflags, ); } - late final _os_workgroup_create_with_workgroupPtr = _lookup< + late final _mkstemp_dprotected_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.Int, + ffi.Int)>>('mkstemp_dprotected_np'); + late final _mkstemp_dprotected_np = _mkstemp_dprotected_npPtr + .asFunction, int, int)>(); - int os_workgroup_join( - os_workgroup_t wg, - os_workgroup_join_token_t token_out, + ffi.Pointer mkdtempat_np( + int dfd, + ffi.Pointer path, ) { - return _os_workgroup_join( - wg, - token_out, + return _mkdtempat_np( + dfd, + path, ); } - late final _os_workgroup_joinPtr = _lookup< + late final _mkdtempat_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.Pointer Function( + ffi.Int, ffi.Pointer)>>('mkdtempat_np'); + late final _mkdtempat_np = _mkdtempat_npPtr + .asFunction Function(int, ffi.Pointer)>(); - void os_workgroup_leave( - os_workgroup_t wg, - os_workgroup_join_token_t token, + int mkstempsat_np( + int dfd, + ffi.Pointer path, + int slen, ) { - return _os_workgroup_leave( - wg, - token, + return _mkstempsat_np( + dfd, + path, + slen, ); } - late final _os_workgroup_leavePtr = _lookup< + late final _mkstempsat_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.Int, ffi.Pointer, ffi.Int)>>('mkstempsat_np'); + late final _mkstempsat_np = _mkstempsat_npPtr + .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 mkostempsat_np( + int dfd, + ffi.Pointer path, + int slen, + int oflags, ) { - return _os_workgroup_set_working_arena( - wg, - arena, - max_workers, - destructor, + return _mkostempsat_np( + dfd, + path, + slen, + 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 _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)>(); - ffi.Pointer os_workgroup_get_working_arena( - os_workgroup_t wg, - ffi.Pointer index_out, + int nfssvc( + int arg0, + ffi.Pointer arg1, ) { - return _os_workgroup_get_working_arena( - wg, - index_out, + return _nfssvc( + arg0, + arg1, ); } - 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 _nfssvcPtr = _lookup< + ffi.NativeFunction)>>( + 'nfssvc'); + late final _nfssvc = + _nfssvcPtr.asFunction)>(); - void os_workgroup_cancel( - os_workgroup_t wg, + int profil( + ffi.Pointer arg0, + int arg1, + int arg2, + int arg3, ) { - return _os_workgroup_cancel( - wg, + return _profil( + arg0, + arg1, + arg2, + arg3, ); } - late final _os_workgroup_cancelPtr = - _lookup>( - 'os_workgroup_cancel'); - late final _os_workgroup_cancel = - _os_workgroup_cancelPtr.asFunction(); + 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)>(); - bool os_workgroup_testcancel( - os_workgroup_t wg, + int pthread_setugid_np( + int arg0, + int arg1, ) { - return _os_workgroup_testcancel( - wg, + return _pthread_setugid_np( + arg0, + arg1, ); } - late final _os_workgroup_testcancelPtr = - _lookup>( - 'os_workgroup_testcancel'); - late final _os_workgroup_testcancel = - _os_workgroup_testcancelPtr.asFunction(); + late final _pthread_setugid_npPtr = + _lookup>( + 'pthread_setugid_np'); + late final _pthread_setugid_np = + _pthread_setugid_npPtr.asFunction(); - int os_workgroup_max_parallel_threads( - os_workgroup_t wg, - os_workgroup_mpt_attr_t attr, + int pthread_getugid_np( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _os_workgroup_max_parallel_threads( - wg, - attr, + return _pthread_getugid_np( + arg0, + arg1, ); } - late final _os_workgroup_max_parallel_threadsPtr = _lookup< + late final _pthread_getugid_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.Pointer, ffi.Pointer)>>('pthread_getugid_np'); + late final _pthread_getugid_np = _pthread_getugid_npPtr + .asFunction, ffi.Pointer)>(); - 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 reboot( + int arg0, ) { - return _os_workgroup_interval_start( - wg, - start, - deadline, - data, + return _reboot( + arg0, ); } - 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 _rebootPtr = + _lookup>('reboot'); + late final _reboot = _rebootPtr.asFunction(); - int os_workgroup_interval_update( - os_workgroup_interval_t wg, - int deadline, - os_workgroup_interval_data_t data, + int revoke( + ffi.Pointer arg0, ) { - return _os_workgroup_interval_update( - wg, - deadline, - data, + return _revoke( + arg0, ); } - 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 _revokePtr = + _lookup)>>( + 'revoke'); + late final _revoke = + _revokePtr.asFunction)>(); - int os_workgroup_interval_finish( - os_workgroup_interval_t wg, - os_workgroup_interval_data_t data, + int rcmd( + ffi.Pointer> arg0, + int arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4, + ffi.Pointer arg5, ) { - return _os_workgroup_interval_finish( - wg, - data, + return _rcmd( + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, ); } - late final _os_workgroup_interval_finishPtr = _lookup< + late final _rcmdPtr = _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.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 _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 rcmd_af( + ffi.Pointer> arg0, + int arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4, + ffi.Pointer arg5, + int arg6, ) { - return _os_workgroup_parallel_create( - name, - attr, + return _rcmd_af( + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + arg6, ); } - late final _os_workgroup_parallel_createPtr = _lookup< + late final _rcmd_afPtr = _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, + 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 dispatch_time( - int when, - int delta, + int rresvport( + ffi.Pointer arg0, ) { - return _dispatch_time( - when, - delta, + return _rresvport( + arg0, ); } - 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 _rresvportPtr = + _lookup)>>( + 'rresvport'); + late final _rresvport = + _rresvportPtr.asFunction)>(); - int dispatch_walltime( - ffi.Pointer when, - int delta, + int rresvport_af( + ffi.Pointer arg0, + int arg1, ) { - return _dispatch_walltime( - when, - delta, + return _rresvport_af( + 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 _rresvport_afPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'rresvport_af'); + late final _rresvport_af = + _rresvport_afPtr.asFunction, int)>(); - void dispatch_retain( - dispatch_object_t object, + int iruserok( + int arg0, + int arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, ) { - return _dispatch_retain( - object, + return _iruserok( + arg0, + arg1, + arg2, + arg3, ); } - late final _dispatch_retainPtr = - _lookup>( - 'dispatch_retain'); - late final _dispatch_retain = - _dispatch_retainPtr.asFunction(); + 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)>(); - void dispatch_release( - dispatch_object_t object, + int iruserok_sa( + ffi.Pointer arg0, + int arg1, + int arg2, + ffi.Pointer arg3, + ffi.Pointer arg4, ) { - return _dispatch_release( - object, + return _iruserok_sa( + arg0, + arg1, + arg2, + arg3, + arg4, ); } - late final _dispatch_releasePtr = - _lookup>( - 'dispatch_release'); - late final _dispatch_release = - _dispatch_releasePtr.asFunction(); + 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)>(); - ffi.Pointer dispatch_get_context( - dispatch_object_t object, + int ruserok( + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, ) { - return _dispatch_get_context( - object, + return _ruserok( + arg0, + arg1, + arg2, + arg3, ); } - late final _dispatch_get_contextPtr = _lookup< + late final _ruserokPtr = _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.Pointer, ffi.Int, + ffi.Pointer, ffi.Pointer)>>('ruserok'); + late final _ruserok = _ruserokPtr.asFunction< + int Function(ffi.Pointer, int, ffi.Pointer, + ffi.Pointer)>(); - void dispatch_set_context( - dispatch_object_t object, - ffi.Pointer context, + int setdomainname( + ffi.Pointer arg0, + int arg1, ) { - return _dispatch_set_context( - object, - context, + return _setdomainname( + arg0, + arg1, ); } - 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 _setdomainnamePtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'setdomainname'); + late final _setdomainname = + _setdomainnamePtr.asFunction, int)>(); - void dispatch_set_finalizer_f( - dispatch_object_t object, - dispatch_function_t finalizer, + int setgroups( + int arg0, + ffi.Pointer arg1, ) { - return _dispatch_set_finalizer_f( - object, - finalizer, + return _setgroups( + arg0, + arg1, ); } - 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 _setgroupsPtr = _lookup< + ffi.NativeFunction)>>( + 'setgroups'); + late final _setgroups = + _setgroupsPtr.asFunction)>(); - void dispatch_activate( - dispatch_object_t object, + void sethostid( + int arg0, ) { - return _dispatch_activate( - object, + return _sethostid( + arg0, ); } - late final _dispatch_activatePtr = - _lookup>( - 'dispatch_activate'); - late final _dispatch_activate = - _dispatch_activatePtr.asFunction(); + late final _sethostidPtr = + _lookup>('sethostid'); + late final _sethostid = _sethostidPtr.asFunction(); - void dispatch_suspend( - dispatch_object_t object, + int sethostname( + ffi.Pointer arg0, + int arg1, ) { - return _dispatch_suspend( - object, + return _sethostname( + arg0, + arg1, ); } - late final _dispatch_suspendPtr = - _lookup>( - 'dispatch_suspend'); - late final _dispatch_suspend = - _dispatch_suspendPtr.asFunction(); + late final _sethostnamePtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'sethostname'); + late final _sethostname = + _sethostnamePtr.asFunction, int)>(); - void dispatch_resume( - dispatch_object_t object, + int setlogin( + ffi.Pointer arg0, ) { - return _dispatch_resume( - object, + return _setlogin( + arg0, ); } - late final _dispatch_resumePtr = - _lookup>( - 'dispatch_resume'); - late final _dispatch_resume = - _dispatch_resumePtr.asFunction(); + late final _setloginPtr = + _lookup)>>( + 'setlogin'); + late final _setlogin = + _setloginPtr.asFunction)>(); - void dispatch_set_qos_class_floor( - dispatch_object_t object, - int qos_class, - int relative_priority, + ffi.Pointer setmode( + ffi.Pointer arg0, ) { - return _dispatch_set_qos_class_floor( - object, - qos_class, - relative_priority, + return _setmode( + arg0, ); } - late final _dispatch_set_qos_class_floorPtr = _lookup< + late final _setmodePtr = _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.Pointer Function(ffi.Pointer)>>('setmode'); + late final _setmode = _setmodePtr + .asFunction Function(ffi.Pointer)>(); - int dispatch_wait( - ffi.Pointer object, - int timeout, + int setrgid( + int arg0, ) { - return _dispatch_wait( - object, - timeout, + return _setrgid( + 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 _setrgidPtr = + _lookup>('setrgid'); + late final _setrgid = _setrgidPtr.asFunction(); - void dispatch_notify( - ffi.Pointer object, - dispatch_object_t queue, - dispatch_block_t notification_block, + int setruid( + int arg0, ) { - return _dispatch_notify( - object, - queue, - notification_block, + return _setruid( + 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 _setruidPtr = + _lookup>('setruid'); + late final _setruid = _setruidPtr.asFunction(); - void dispatch_cancel( - ffi.Pointer object, + int setsgroups_np( + int arg0, + ffi.Pointer arg1, ) { - return _dispatch_cancel( - object, + return _setsgroups_np( + arg0, + arg1, ); } - late final _dispatch_cancelPtr = - _lookup)>>( - 'dispatch_cancel'); - late final _dispatch_cancel = - _dispatch_cancelPtr.asFunction)>(); + late final _setsgroups_npPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Int, ffi.Pointer)>>('setsgroups_np'); + late final _setsgroups_np = _setsgroups_npPtr + .asFunction)>(); - int dispatch_testcancel( - ffi.Pointer object, - ) { - return _dispatch_testcancel( - object, - ); + void setusershell() { + return _setusershell(); } - late final _dispatch_testcancelPtr = - _lookup)>>( - 'dispatch_testcancel'); - late final _dispatch_testcancel = - _dispatch_testcancelPtr.asFunction)>(); + late final _setusershellPtr = + _lookup>('setusershell'); + late final _setusershell = _setusershellPtr.asFunction(); - void dispatch_debug( - dispatch_object_t object, - ffi.Pointer message, + int setwgroups_np( + int arg0, + ffi.Pointer arg1, ) { - return _dispatch_debug( - object, - message, + return _setwgroups_np( + arg0, + arg1, ); } - late final _dispatch_debugPtr = _lookup< + late final _setwgroups_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)>>('setwgroups_np'); + late final _setwgroups_np = _setwgroups_npPtr + .asFunction)>(); - void dispatch_debugv( - dispatch_object_t object, - ffi.Pointer message, - va_list ap, + int strtofflags( + ffi.Pointer> arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, ) { - return _dispatch_debugv( - object, - message, - ap, + return _strtofflags( + arg0, + arg1, + arg2, ); } - late final _dispatch_debugvPtr = _lookup< + late final _strtofflagsPtr = _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)>(); + 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_async( - dispatch_queue_t queue, - dispatch_block_t block, + int swapon( + ffi.Pointer arg0, ) { - return _dispatch_async( - queue, - block, + return _swapon( + arg0, ); } - 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(); + late final _swaponPtr = + _lookup)>>( + 'swapon'); + late final _swapon = + _swaponPtr.asFunction)>(); - void dispatch_async_f( - dispatch_queue_t queue, - ffi.Pointer context, - dispatch_function_t work, - ) { - return _dispatch_async_f( - queue, - context, - work, - ); + int ttyslot() { + return _ttyslot(); } - 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 _ttyslotPtr = + _lookup>('ttyslot'); + late final _ttyslot = _ttyslotPtr.asFunction(); - void dispatch_sync( - dispatch_queue_t queue, - dispatch_block_t block, + int undelete( + ffi.Pointer arg0, ) { - return _dispatch_sync( - queue, - block, + return _undelete( + 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 _undeletePtr = + _lookup)>>( + 'undelete'); + late final _undelete = + _undeletePtr.asFunction)>(); - void dispatch_sync_f( - dispatch_queue_t queue, - ffi.Pointer context, - dispatch_function_t work, + int unwhiteout( + ffi.Pointer arg0, ) { - return _dispatch_sync_f( - queue, - context, - work, + return _unwhiteout( + arg0, ); } - 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 _unwhiteoutPtr = + _lookup)>>( + 'unwhiteout'); + late final _unwhiteout = + _unwhiteoutPtr.asFunction)>(); - void dispatch_async_and_wait( - dispatch_queue_t queue, - dispatch_block_t block, + int syscall( + int arg0, ) { - return _dispatch_async_and_wait( - queue, - block, + return _syscall( + 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 _syscallPtr = + _lookup>('syscall'); + late final _syscall = _syscallPtr.asFunction(); - void dispatch_async_and_wait_f( - dispatch_queue_t queue, - ffi.Pointer context, - dispatch_function_t work, + int fgetattrlist( + int arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + int arg3, + int arg4, ) { - return _dispatch_async_and_wait_f( - queue, - context, - work, + return _fgetattrlist( + arg0, + arg1, + arg2, + arg3, + arg4, ); } - late final _dispatch_async_and_wait_fPtr = _lookup< + late final _fgetattrlistPtr = _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>)>(); + 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_apply_f( - int iterations, - dispatch_queue_t queue, - ffi.Pointer context, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Size)>> - work, + int fsetattrlist( + int arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + int arg3, + int arg4, ) { - return _dispatch_apply_f( - iterations, - queue, - context, - work, + return _fsetattrlist( + arg0, + arg1, + arg2, + arg3, + arg4, ); } - late final _dispatch_apply_fPtr = _lookup< + late final _fsetattrlistPtr = _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)>>)>(); - - 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.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)>(); + 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 dispatch_queue_get_qos_class( - dispatch_queue_t queue, - ffi.Pointer relative_priority_ptr, + 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 _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 ffi.Pointer _KERNEL_SECURITY_TOKEN = - _lookup('KERNEL_SECURITY_TOKEN'); + 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, + ); + } - security_token_t get KERNEL_SECURITY_TOKEN => _KERNEL_SECURITY_TOKEN.ref; + 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 ffi.Pointer _KERNEL_AUDIT_TOKEN = - _lookup('KERNEL_AUDIT_TOKEN'); + ffi.Pointer os_workgroup_get_working_arena( + os_workgroup_t wg, + ffi.Pointer index_out, + ) { + return _os_workgroup_get_working_arena( + wg, + index_out, + ); + } - audit_token_t get KERNEL_AUDIT_TOKEN => _KERNEL_AUDIT_TOKEN.ref; + 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_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 os_workgroup_cancel( + os_workgroup_t wg, ) { - return _mach_msg_overwrite( - msg, - option, - send_size, - rcv_size, - rcv_name, - timeout, - notify, - rcv_msg, - rcv_limit, + return _os_workgroup_cancel( + wg, ); } - 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_cancelPtr = + _lookup>( + 'os_workgroup_cancel'); + late final _os_workgroup_cancel = + _os_workgroup_cancelPtr.asFunction(); - int mach_msg( - ffi.Pointer msg, - int option, - int send_size, - int rcv_size, - int rcv_name, - int timeout, - int notify, + bool os_workgroup_testcancel( + os_workgroup_t wg, ) { - return _mach_msg( - msg, - option, - send_size, - rcv_size, - rcv_name, - timeout, - notify, + return _os_workgroup_testcancel( + wg, ); } - 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_testcancelPtr = + _lookup>( + 'os_workgroup_testcancel'); + late final _os_workgroup_testcancel = + _os_workgroup_testcancelPtr.asFunction(); - int mach_voucher_deallocate( - int voucher, + int os_workgroup_max_parallel_threads( + os_workgroup_t wg, + os_workgroup_mpt_attr_t attr, ) { - return _mach_voucher_deallocate( - voucher, + return _os_workgroup_max_parallel_threads( + wg, + attr, ); } - 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; + 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(); - dispatch_source_t dispatch_source_create( - dispatch_source_type_t type, - int handle, - int mask, - dispatch_queue_t queue, + 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_create( - type, - handle, - mask, - queue, + return _os_workgroup_interval_start( + wg, + start, + deadline, + data, ); } - late final _dispatch_source_createPtr = _lookup< + late final _os_workgroup_interval_startPtr = _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_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( - dispatch_source_t source, - dispatch_block_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( - source, - handler, + return _os_workgroup_interval_update( + wg, + deadline, + data, ); } - late final _dispatch_source_set_event_handlerPtr = _lookup< + late final _os_workgroup_interval_updatePtr = _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, + 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_event_handler_f( - dispatch_source_t source, - dispatch_function_t handler, + int os_workgroup_interval_finish( + os_workgroup_interval_t wg, + os_workgroup_interval_data_t data, ) { - return _dispatch_source_set_event_handler_f( - source, - handler, + return _os_workgroup_interval_finish( + wg, + data, ); } - late final _dispatch_source_set_event_handler_fPtr = _lookup< + late final _os_workgroup_interval_finishPtr = _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, + 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( - dispatch_source_t source, - dispatch_block_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( - source, - handler, + return _os_workgroup_parallel_create( + name, + attr, ); } - late final _dispatch_source_set_cancel_handlerPtr = _lookup< + late final _os_workgroup_parallel_createPtr = _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(); + 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_set_cancel_handler_f( - dispatch_source_t source, - dispatch_function_t handler, + int dispatch_time( + int when, + int delta, ) { - return _dispatch_source_set_cancel_handler_f( - source, - handler, + return _dispatch_time( + when, + delta, ); } - late final _dispatch_source_set_cancel_handler_fPtr = _lookup< + late final _dispatch_timePtr = _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(); + dispatch_time_t Function( + dispatch_time_t, ffi.Int64)>>('dispatch_time'); + late final _dispatch_time = + _dispatch_timePtr.asFunction(); - void dispatch_source_cancel( - dispatch_source_t source, + int dispatch_walltime( + ffi.Pointer when, + int delta, ) { - return _dispatch_source_cancel( - source, + return _dispatch_walltime( + when, + delta, ); } - late final _dispatch_source_cancelPtr = - _lookup>( - 'dispatch_source_cancel'); - late final _dispatch_source_cancel = - _dispatch_source_cancelPtr.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_testcancel( - dispatch_source_t source, - ) { - return _dispatch_source_testcancel( - source, - ); + int qos_class_self() { + return _qos_class_self(); } - late final _dispatch_source_testcancelPtr = - _lookup>( - 'dispatch_source_testcancel'); - late final _dispatch_source_testcancel = _dispatch_source_testcancelPtr - .asFunction(); + late final _qos_class_selfPtr = + _lookup>('qos_class_self'); + late final _qos_class_self = _qos_class_selfPtr.asFunction(); - int dispatch_source_get_handle( - dispatch_source_t source, - ) { - return _dispatch_source_get_handle( - source, - ); + int qos_class_main() { + return _qos_class_main(); } - 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_mainPtr = + _lookup>('qos_class_main'); + late final _qos_class_main = _qos_class_mainPtr.asFunction(); - int dispatch_source_get_mask( - dispatch_source_t source, + 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 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< + 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_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)>(); + dispatch_object_t, ffi.Pointer)>>('dispatch_debug'); + late final _dispatch_debug = _dispatch_debugPtr + .asFunction)>(); - void dispatch_group_enter( - dispatch_group_t group, + void dispatch_debugv( + dispatch_object_t object, + ffi.Pointer message, + va_list ap, ) { - return _dispatch_group_enter( - group, + return _dispatch_debugv( + object, + message, + ap, ); } - late final _dispatch_group_enterPtr = - _lookup>( - 'dispatch_group_enter'); - late final _dispatch_group_enter = - _dispatch_group_enterPtr.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_leave( - dispatch_group_t group, + void dispatch_async( + dispatch_queue_t queue, + dispatch_block_t block, ) { - return _dispatch_group_leave( - group, + return _dispatch_async( + queue, + block, ); } - late final _dispatch_group_leavePtr = - _lookup>( - 'dispatch_group_leave'); - late final _dispatch_group_leave = - _dispatch_group_leavePtr.asFunction(); + 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(); - dispatch_semaphore_t dispatch_semaphore_create( - int value, + void dispatch_async_f( + dispatch_queue_t queue, + ffi.Pointer context, + dispatch_function_t work, ) { - return _dispatch_semaphore_create( - value, + return _dispatch_async_f( + queue, + context, + work, ); } - late final _dispatch_semaphore_createPtr = - _lookup>( - 'dispatch_semaphore_create'); - late final _dispatch_semaphore_create = _dispatch_semaphore_createPtr - .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)>(); - int dispatch_semaphore_wait( - dispatch_semaphore_t dsema, - int timeout, + void dispatch_sync( + dispatch_queue_t queue, + dispatch_block_t block, ) { - return _dispatch_semaphore_wait( - dsema, - timeout, + return _dispatch_sync( + queue, + block, ); } - late final _dispatch_semaphore_waitPtr = _lookup< + late final _dispatch_syncPtr = _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_sync'); + late final _dispatch_sync = _dispatch_syncPtr + .asFunction(); - int dispatch_semaphore_signal( - dispatch_semaphore_t dsema, + void dispatch_sync_f( + dispatch_queue_t queue, + ffi.Pointer context, + dispatch_function_t work, ) { - return _dispatch_semaphore_signal( - dsema, + return _dispatch_sync_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_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_once( - ffi.Pointer predicate, + void dispatch_async_and_wait( + dispatch_queue_t queue, dispatch_block_t block, ) { - return _dispatch_once( - predicate, + return _dispatch_async_and_wait( + queue, block, ); } - late final _dispatch_oncePtr = _lookup< + late final _dispatch_async_and_waitPtr = _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_async_and_wait'); + late final _dispatch_async_and_wait = _dispatch_async_and_waitPtr + .asFunction(); - void dispatch_once_f( - ffi.Pointer predicate, + void dispatch_async_and_wait_f( + dispatch_queue_t queue, ffi.Pointer context, - dispatch_function_t function, + dispatch_function_t work, ) { - return _dispatch_once_f( - predicate, + return _dispatch_async_and_wait_f( + queue, context, - function, + work, ); } - late final _dispatch_once_fPtr = _lookup< + late final _dispatch_async_and_wait_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(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 ffi.Pointer __dispatch_data_empty = - _lookup('_dispatch_data_empty'); + void dispatch_apply( + int iterations, + dispatch_queue_t queue, + ffi.Pointer<_ObjCBlock> block, + ) { + return _dispatch_apply( + iterations, + queue, + block, + ); + } - ffi.Pointer get _dispatch_data_empty => - __dispatch_data_empty; + 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 ffi.Pointer __dispatch_data_destructor_free = - _lookup('_dispatch_data_destructor_free'); + 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_apply_f( + iterations, + queue, + context, + work, + ); + } - dispatch_block_t get _dispatch_data_destructor_free => - __dispatch_data_destructor_free.value; + 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)>>)>(); - set _dispatch_data_destructor_free(dispatch_block_t value) => - __dispatch_data_destructor_free.value = value; + dispatch_queue_t dispatch_get_current_queue() { + return _dispatch_get_current_queue(); + } - late final ffi.Pointer __dispatch_data_destructor_munmap = - _lookup('_dispatch_data_destructor_munmap'); + late final _dispatch_get_current_queuePtr = + _lookup>( + 'dispatch_get_current_queue'); + late final _dispatch_get_current_queue = + _dispatch_get_current_queuePtr.asFunction(); - dispatch_block_t get _dispatch_data_destructor_munmap => - __dispatch_data_destructor_munmap.value; + late final ffi.Pointer __dispatch_main_q = + _lookup('_dispatch_main_q'); - set _dispatch_data_destructor_munmap(dispatch_block_t value) => - __dispatch_data_destructor_munmap.value = value; + ffi.Pointer get _dispatch_main_q => __dispatch_main_q; - dispatch_data_t dispatch_data_create( - ffi.Pointer buffer, - int size, - dispatch_queue_t queue, - dispatch_block_t destructor, + dispatch_queue_global_t dispatch_get_global_queue( + int identifier, + int flags, ) { - return _dispatch_data_create( - buffer, - size, - queue, - destructor, + return _dispatch_get_global_queue( + identifier, + flags, ); } - late final _dispatch_data_createPtr = _lookup< + late final _dispatch_get_global_queuePtr = _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)>(); + dispatch_queue_global_t Function( + ffi.IntPtr, ffi.UintPtr)>>('dispatch_get_global_queue'); + late final _dispatch_get_global_queue = _dispatch_get_global_queuePtr + .asFunction(); - int dispatch_data_get_size( - dispatch_data_t data, + 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_get_size( - data, + return _dispatch_queue_attr_make_initially_inactive( + attr, ); } - 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_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_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_autorelease_frequency( + dispatch_queue_attr_t attr, + int frequency, ) { - return _dispatch_data_create_map( - data, - buffer_ptr, - size_ptr, + return _dispatch_queue_attr_make_with_autorelease_frequency( + attr, + frequency, ); } - 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 _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_concat( - dispatch_data_t data1, - dispatch_data_t data2, + 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_concat( - data1, - data2, + return _dispatch_queue_attr_make_with_qos_class( + attr, + qos_class, + relative_priority, ); } - late final _dispatch_data_create_concatPtr = _lookup< + late final _dispatch_queue_attr_make_with_qos_classPtr = _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_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_subrange( - dispatch_data_t data, - int offset, - int length, + dispatch_queue_t dispatch_queue_create_with_target( + ffi.Pointer label, + dispatch_queue_attr_t attr, + dispatch_queue_t target, ) { - return _dispatch_data_create_subrange( - data, - offset, - length, + return _dispatch_queue_create_with_target( + label, + attr, + target, ); } - late final _dispatch_data_create_subrangePtr = _lookup< + late final _dispatch_queue_create_with_targetPtr = _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_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)>(); - bool dispatch_data_apply( - dispatch_data_t data, - dispatch_data_applier_t applier, + dispatch_queue_t dispatch_queue_create( + ffi.Pointer label, + dispatch_queue_attr_t attr, ) { - return _dispatch_data_apply( - data, - applier, + return _dispatch_queue_create( + label, + attr, ); } - late final _dispatch_data_applyPtr = _lookup< + late final _dispatch_queue_createPtr = _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_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_data_t dispatch_data_copy_region( - dispatch_data_t data, - int location, - ffi.Pointer offset_ptr, + ffi.Pointer dispatch_queue_get_label( + dispatch_queue_t queue, ) { - return _dispatch_data_copy_region( - data, - location, - offset_ptr, + return _dispatch_queue_get_label( + queue, ); } - 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_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_read( - int fd, - int length, + int dispatch_queue_get_qos_class( dispatch_queue_t queue, - ffi.Pointer<_ObjCBlock> handler, + ffi.Pointer relative_priority_ptr, ) { - return _dispatch_read( - fd, - length, + return _dispatch_queue_get_qos_class( queue, - handler, + relative_priority_ptr, ); } - late final _dispatch_readPtr = _lookup< + late final _dispatch_queue_get_qos_classPtr = _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.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_write( - int fd, - dispatch_data_t data, + void dispatch_set_target_queue( + dispatch_object_t object, dispatch_queue_t queue, - ffi.Pointer<_ObjCBlock> handler, ) { - return _dispatch_write( - fd, - data, + return _dispatch_set_target_queue( + object, queue, - handler, ); } - late final _dispatch_writePtr = _lookup< + late final _dispatch_set_target_queuePtr = _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>)>(); + ffi.Void Function(dispatch_object_t, + dispatch_queue_t)>>('dispatch_set_target_queue'); + late final _dispatch_set_target_queue = _dispatch_set_target_queuePtr + .asFunction(); - dispatch_io_t dispatch_io_create( - int type, - int fd, + 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> cleanup_handler, + dispatch_block_t block, ) { - return _dispatch_io_create( - type, - fd, + return _dispatch_after( + when, queue, - cleanup_handler, + block, ); } - late final _dispatch_io_createPtr = _lookup< + late final _dispatch_afterPtr = _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_time_t, dispatch_queue_t, + dispatch_block_t)>>('dispatch_after'); + late final _dispatch_after = _dispatch_afterPtr + .asFunction(); - dispatch_io_t dispatch_io_create_with_path( - int type, - ffi.Pointer path, - int oflag, - int mode, + void dispatch_after_f( + int when, 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_after_f( + when, queue, - cleanup_handler, + context, + work, ); } - late final _dispatch_io_create_with_pathPtr = _lookup< + late final _dispatch_after_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_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)>(); - dispatch_io_t dispatch_io_create_with_io( - int type, - dispatch_io_t io, + void dispatch_barrier_async( dispatch_queue_t queue, - ffi.Pointer<_ObjCBlock> cleanup_handler, + dispatch_block_t block, ) { - return _dispatch_io_create_with_io( - type, - io, + return _dispatch_barrier_async( queue, - cleanup_handler, + block, ); } - late final _dispatch_io_create_with_ioPtr = _lookup< + late final _dispatch_barrier_asyncPtr = _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_async'); + late final _dispatch_barrier_async = _dispatch_barrier_asyncPtr + .asFunction(); - void dispatch_io_read( - dispatch_io_t channel, - int offset, - int length, + void dispatch_barrier_async_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_async_f( queue, - io_handler, + context, + work, ); } - late final _dispatch_io_readPtr = _lookup< + late final _dispatch_barrier_async_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< - void Function( - dispatch_io_t, int, int, dispatch_queue_t, dispatch_io_handler_t)>(); + 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_write( - dispatch_io_t channel, - int offset, - dispatch_data_t data, + void dispatch_barrier_sync( dispatch_queue_t queue, - dispatch_io_handler_t io_handler, + dispatch_block_t block, ) { - return _dispatch_io_write( - channel, - offset, - data, + return _dispatch_barrier_sync( queue, - io_handler, + block, ); } - late final _dispatch_io_writePtr = _lookup< + late final _dispatch_barrier_syncPtr = _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_sync'); + late final _dispatch_barrier_sync = _dispatch_barrier_syncPtr + .asFunction(); - void dispatch_io_close( - dispatch_io_t channel, - int flags, + void dispatch_barrier_sync_f( + dispatch_queue_t queue, + ffi.Pointer context, + dispatch_function_t work, ) { - return _dispatch_io_close( - channel, - flags, + return _dispatch_barrier_sync_f( + queue, + context, + work, ); } - late final _dispatch_io_closePtr = _lookup< + late final _dispatch_barrier_sync_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_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_io_barrier( - dispatch_io_t channel, - dispatch_block_t barrier, + void dispatch_barrier_async_and_wait( + dispatch_queue_t queue, + dispatch_block_t block, ) { - return _dispatch_io_barrier( - channel, - barrier, + return _dispatch_barrier_async_and_wait( + queue, + block, ); } - late final _dispatch_io_barrierPtr = _lookup< + late final _dispatch_barrier_async_and_waitPtr = _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_queue_t, + dispatch_block_t)>>('dispatch_barrier_async_and_wait'); + late final _dispatch_barrier_async_and_wait = + _dispatch_barrier_async_and_waitPtr + .asFunction(); - int dispatch_io_get_descriptor( - dispatch_io_t channel, + void dispatch_barrier_async_and_wait_f( + dispatch_queue_t queue, + ffi.Pointer context, + dispatch_function_t work, ) { - return _dispatch_io_get_descriptor( - channel, + return _dispatch_barrier_async_and_wait_f( + 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_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_io_set_high_water( - dispatch_io_t channel, - int high_water, + void dispatch_queue_set_specific( + dispatch_queue_t queue, + ffi.Pointer key, + ffi.Pointer context, + dispatch_function_t destructor, ) { - return _dispatch_io_set_high_water( - channel, - high_water, + return _dispatch_queue_set_specific( + queue, + key, + context, + destructor, ); } - 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_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)>(); - void dispatch_io_set_low_water( - dispatch_io_t channel, - int low_water, + ffi.Pointer dispatch_queue_get_specific( + dispatch_queue_t queue, + ffi.Pointer key, ) { - return _dispatch_io_set_low_water( - channel, - low_water, + return _dispatch_queue_get_specific( + queue, + key, ); } - 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_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_interval( - dispatch_io_t channel, - int interval, - int flags, + ffi.Pointer dispatch_get_specific( + ffi.Pointer key, ) { - return _dispatch_io_set_interval( - channel, - interval, - flags, + return _dispatch_get_specific( + key, ); } - late final _dispatch_io_set_intervalPtr = _lookup< + late final _dispatch_get_specificPtr = _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.Pointer Function( + ffi.Pointer)>>('dispatch_get_specific'); + late final _dispatch_get_specific = _dispatch_get_specificPtr + .asFunction Function(ffi.Pointer)>(); - dispatch_workloop_t dispatch_workloop_create( - ffi.Pointer label, + void dispatch_assert_queue( + dispatch_queue_t queue, ) { - return _dispatch_workloop_create( - label, + return _dispatch_assert_queue( + 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_queuePtr = + _lookup>( + 'dispatch_assert_queue'); + late final _dispatch_assert_queue = + _dispatch_assert_queuePtr.asFunction(); - dispatch_workloop_t dispatch_workloop_create_inactive( - ffi.Pointer label, + void dispatch_assert_queue_barrier( + dispatch_queue_t queue, ) { - return _dispatch_workloop_create_inactive( - label, + return _dispatch_assert_queue_barrier( + queue, ); } - 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)>(); + late final _dispatch_assert_queue_barrierPtr = + _lookup>( + 'dispatch_assert_queue_barrier'); + late final _dispatch_assert_queue_barrier = _dispatch_assert_queue_barrierPtr + .asFunction(); - void dispatch_workloop_set_autorelease_frequency( - dispatch_workloop_t workloop, - int frequency, + void dispatch_assert_queue_not( + dispatch_queue_t queue, ) { - return _dispatch_workloop_set_autorelease_frequency( - workloop, - frequency, + return _dispatch_assert_queue_not( + queue, ); } - 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(); + late final _dispatch_assert_queue_notPtr = + _lookup>( + 'dispatch_assert_queue_not'); + late final _dispatch_assert_queue_not = _dispatch_assert_queue_notPtr + .asFunction(); - void dispatch_workloop_set_os_workgroup( - dispatch_workloop_t workloop, - os_workgroup_t workgroup, + dispatch_block_t dispatch_block_create( + int flags, + dispatch_block_t block, ) { - return _dispatch_workloop_set_os_workgroup( - workloop, - workgroup, + return _dispatch_block_create( + flags, + block, ); } - late final _dispatch_workloop_set_os_workgroupPtr = _lookup< + late final _dispatch_block_createPtr = _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(); + dispatch_block_t Function( + ffi.Int32, dispatch_block_t)>>('dispatch_block_create'); + late final _dispatch_block_create = _dispatch_block_createPtr + .asFunction(); - int CFWriteStreamGetTypeID() { - return _CFWriteStreamGetTypeID(); + 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 _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_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)>(); - CFReadStreamRef CFReadStreamCreateWithBytesNoCopy( - CFAllocatorRef alloc, - ffi.Pointer bytes, - int length, - CFAllocatorRef bytesDeallocator, + void dispatch_block_perform( + int flags, + dispatch_block_t block, ) { - return _CFReadStreamCreateWithBytesNoCopy( - alloc, - bytes, - length, - bytesDeallocator, + return _dispatch_block_perform( + flags, + block, ); } - 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_block_performPtr = _lookup< + ffi.NativeFunction>( + 'dispatch_block_perform'); + late final _dispatch_block_perform = _dispatch_block_performPtr + .asFunction(); - CFWriteStreamRef CFWriteStreamCreateWithBuffer( - CFAllocatorRef alloc, - ffi.Pointer buffer, - int bufferCapacity, + int dispatch_block_wait( + dispatch_block_t block, + int timeout, ) { - return _CFWriteStreamCreateWithBuffer( - alloc, - buffer, - bufferCapacity, + return _dispatch_block_wait( + block, + timeout, ); } - late final _CFWriteStreamCreateWithBufferPtr = _lookup< + late final _dispatch_block_waitPtr = _lookup< ffi.NativeFunction< - CFWriteStreamRef Function(CFAllocatorRef, ffi.Pointer, - CFIndex)>>('CFWriteStreamCreateWithBuffer'); - late final _CFWriteStreamCreateWithBuffer = - _CFWriteStreamCreateWithBufferPtr.asFunction< - CFWriteStreamRef Function(CFAllocatorRef, ffi.Pointer, int)>(); + ffi.IntPtr Function( + dispatch_block_t, dispatch_time_t)>>('dispatch_block_wait'); + late final _dispatch_block_wait = + _dispatch_block_waitPtr.asFunction(); - CFWriteStreamRef CFWriteStreamCreateWithAllocatedBuffers( - CFAllocatorRef alloc, - CFAllocatorRef bufferAllocator, + void dispatch_block_notify( + dispatch_block_t block, + dispatch_queue_t queue, + dispatch_block_t notification_block, ) { - return _CFWriteStreamCreateWithAllocatedBuffers( - alloc, - bufferAllocator, + return _dispatch_block_notify( + block, + queue, + notification_block, ); } - late final _CFWriteStreamCreateWithAllocatedBuffersPtr = _lookup< + late final _dispatch_block_notifyPtr = _lookup< ffi.NativeFunction< - CFWriteStreamRef Function(CFAllocatorRef, - CFAllocatorRef)>>('CFWriteStreamCreateWithAllocatedBuffers'); - late final _CFWriteStreamCreateWithAllocatedBuffers = - _CFWriteStreamCreateWithAllocatedBuffersPtr.asFunction< - CFWriteStreamRef Function(CFAllocatorRef, CFAllocatorRef)>(); + 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)>(); - CFReadStreamRef CFReadStreamCreateWithFile( - CFAllocatorRef alloc, - CFURLRef fileURL, + void dispatch_block_cancel( + dispatch_block_t block, ) { - return _CFReadStreamCreateWithFile( - alloc, - fileURL, + return _dispatch_block_cancel( + block, ); } - late final _CFReadStreamCreateWithFilePtr = _lookup< - ffi.NativeFunction< - CFReadStreamRef Function( - CFAllocatorRef, CFURLRef)>>('CFReadStreamCreateWithFile'); - late final _CFReadStreamCreateWithFile = _CFReadStreamCreateWithFilePtr - .asFunction(); + late final _dispatch_block_cancelPtr = + _lookup>( + 'dispatch_block_cancel'); + late final _dispatch_block_cancel = + _dispatch_block_cancelPtr.asFunction(); - CFWriteStreamRef CFWriteStreamCreateWithFile( - CFAllocatorRef alloc, - CFURLRef fileURL, + int dispatch_block_testcancel( + dispatch_block_t block, ) { - return _CFWriteStreamCreateWithFile( - alloc, - fileURL, + return _dispatch_block_testcancel( + block, ); } - late final _CFWriteStreamCreateWithFilePtr = _lookup< - ffi.NativeFunction< - CFWriteStreamRef Function( - CFAllocatorRef, CFURLRef)>>('CFWriteStreamCreateWithFile'); - late final _CFWriteStreamCreateWithFile = _CFWriteStreamCreateWithFilePtr - .asFunction(); + late final _dispatch_block_testcancelPtr = + _lookup>( + 'dispatch_block_testcancel'); + late final _dispatch_block_testcancel = _dispatch_block_testcancelPtr + .asFunction(); - void CFStreamCreateBoundPair( - CFAllocatorRef alloc, - ffi.Pointer readStream, - ffi.Pointer writeStream, - int transferBufferSize, + 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 _CFStreamCreateBoundPair( - alloc, - readStream, - writeStream, - transferBufferSize, + return _mach_msg_overwrite( + msg, + option, + send_size, + rcv_size, + rcv_name, + timeout, + notify, + rcv_msg, + rcv_limit, ); } - late final _CFStreamCreateBoundPairPtr = _lookup< + late final _mach_msg_overwritePtr = _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; + 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 kCFStreamPropertyAppendToFile(CFStreamPropertyKey value) => - _kCFStreamPropertyAppendToFile.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 - _kCFStreamPropertyFileCurrentOffset = - _lookup('kCFStreamPropertyFileCurrentOffset'); + 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 kCFStreamPropertyFileCurrentOffset => - _kCFStreamPropertyFileCurrentOffset.value; + int mach_voucher_deallocate( + int voucher, + ) { + return _mach_voucher_deallocate( + voucher, + ); + } - set kCFStreamPropertyFileCurrentOffset(CFStreamPropertyKey value) => - _kCFStreamPropertyFileCurrentOffset.value = value; + late final _mach_voucher_deallocatePtr = + _lookup>( + 'mach_voucher_deallocate'); + late final _mach_voucher_deallocate = + _mach_voucher_deallocatePtr.asFunction(); - late final ffi.Pointer - _kCFStreamPropertySocketNativeHandle = - _lookup('kCFStreamPropertySocketNativeHandle'); + late final ffi.Pointer + __dispatch_source_type_data_add = + _lookup('_dispatch_source_type_data_add'); - CFStreamPropertyKey get kCFStreamPropertySocketNativeHandle => - _kCFStreamPropertySocketNativeHandle.value; + ffi.Pointer get _dispatch_source_type_data_add => + __dispatch_source_type_data_add; - set kCFStreamPropertySocketNativeHandle(CFStreamPropertyKey value) => - _kCFStreamPropertySocketNativeHandle.value = value; + late final ffi.Pointer + __dispatch_source_type_data_or = + _lookup('_dispatch_source_type_data_or'); - late final ffi.Pointer - _kCFStreamPropertySocketRemoteHostName = - _lookup('kCFStreamPropertySocketRemoteHostName'); + ffi.Pointer get _dispatch_source_type_data_or => + __dispatch_source_type_data_or; - CFStreamPropertyKey get kCFStreamPropertySocketRemoteHostName => - _kCFStreamPropertySocketRemoteHostName.value; + late final ffi.Pointer + __dispatch_source_type_data_replace = + _lookup('_dispatch_source_type_data_replace'); - set kCFStreamPropertySocketRemoteHostName(CFStreamPropertyKey value) => - _kCFStreamPropertySocketRemoteHostName.value = value; + ffi.Pointer get _dispatch_source_type_data_replace => + __dispatch_source_type_data_replace; - late final ffi.Pointer - _kCFStreamPropertySocketRemotePortNumber = - _lookup('kCFStreamPropertySocketRemotePortNumber'); + late final ffi.Pointer + __dispatch_source_type_mach_send = + _lookup('_dispatch_source_type_mach_send'); - CFStreamPropertyKey get kCFStreamPropertySocketRemotePortNumber => - _kCFStreamPropertySocketRemotePortNumber.value; + ffi.Pointer get _dispatch_source_type_mach_send => + __dispatch_source_type_mach_send; - set kCFStreamPropertySocketRemotePortNumber(CFStreamPropertyKey value) => - _kCFStreamPropertySocketRemotePortNumber.value = value; + late final ffi.Pointer + __dispatch_source_type_mach_recv = + _lookup('_dispatch_source_type_mach_recv'); - late final ffi.Pointer _kCFStreamErrorDomainSOCKS = - _lookup('kCFStreamErrorDomainSOCKS'); + ffi.Pointer get _dispatch_source_type_mach_recv => + __dispatch_source_type_mach_recv; - int get kCFStreamErrorDomainSOCKS => _kCFStreamErrorDomainSOCKS.value; + late final ffi.Pointer + __dispatch_source_type_memorypressure = + _lookup('_dispatch_source_type_memorypressure'); - set kCFStreamErrorDomainSOCKS(int value) => - _kCFStreamErrorDomainSOCKS.value = value; + ffi.Pointer + get _dispatch_source_type_memorypressure => + __dispatch_source_type_memorypressure; - late final ffi.Pointer _kCFStreamPropertySOCKSProxy = - _lookup('kCFStreamPropertySOCKSProxy'); + late final ffi.Pointer __dispatch_source_type_proc = + _lookup('_dispatch_source_type_proc'); - CFStringRef get kCFStreamPropertySOCKSProxy => - _kCFStreamPropertySOCKSProxy.value; + ffi.Pointer get _dispatch_source_type_proc => + __dispatch_source_type_proc; - set kCFStreamPropertySOCKSProxy(CFStringRef value) => - _kCFStreamPropertySOCKSProxy.value = value; + late final ffi.Pointer __dispatch_source_type_read = + _lookup('_dispatch_source_type_read'); - late final ffi.Pointer _kCFStreamPropertySOCKSProxyHost = - _lookup('kCFStreamPropertySOCKSProxyHost'); + ffi.Pointer get _dispatch_source_type_read => + __dispatch_source_type_read; - CFStringRef get kCFStreamPropertySOCKSProxyHost => - _kCFStreamPropertySOCKSProxyHost.value; + late final ffi.Pointer __dispatch_source_type_signal = + _lookup('_dispatch_source_type_signal'); - set kCFStreamPropertySOCKSProxyHost(CFStringRef value) => - _kCFStreamPropertySOCKSProxyHost.value = value; + ffi.Pointer get _dispatch_source_type_signal => + __dispatch_source_type_signal; - late final ffi.Pointer _kCFStreamPropertySOCKSProxyPort = - _lookup('kCFStreamPropertySOCKSProxyPort'); + late final ffi.Pointer __dispatch_source_type_timer = + _lookup('_dispatch_source_type_timer'); - CFStringRef get kCFStreamPropertySOCKSProxyPort => - _kCFStreamPropertySOCKSProxyPort.value; + ffi.Pointer get _dispatch_source_type_timer => + __dispatch_source_type_timer; - set kCFStreamPropertySOCKSProxyPort(CFStringRef value) => - _kCFStreamPropertySOCKSProxyPort.value = value; + late final ffi.Pointer __dispatch_source_type_vnode = + _lookup('_dispatch_source_type_vnode'); - late final ffi.Pointer _kCFStreamPropertySOCKSVersion = - _lookup('kCFStreamPropertySOCKSVersion'); + ffi.Pointer get _dispatch_source_type_vnode => + __dispatch_source_type_vnode; - CFStringRef get kCFStreamPropertySOCKSVersion => - _kCFStreamPropertySOCKSVersion.value; + late final ffi.Pointer __dispatch_source_type_write = + _lookup('_dispatch_source_type_write'); - set kCFStreamPropertySOCKSVersion(CFStringRef value) => - _kCFStreamPropertySOCKSVersion.value = value; + ffi.Pointer get _dispatch_source_type_write => + __dispatch_source_type_write; - late final ffi.Pointer _kCFStreamSocketSOCKSVersion4 = - _lookup('kCFStreamSocketSOCKSVersion4'); + 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, + ); + } - CFStringRef get kCFStreamSocketSOCKSVersion4 => - _kCFStreamSocketSOCKSVersion4.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)>(); - set kCFStreamSocketSOCKSVersion4(CFStringRef value) => - _kCFStreamSocketSOCKSVersion4.value = value; + void dispatch_source_set_event_handler( + dispatch_source_t source, + dispatch_block_t handler, + ) { + return _dispatch_source_set_event_handler( + source, + handler, + ); + } - late final ffi.Pointer _kCFStreamSocketSOCKSVersion5 = - _lookup('kCFStreamSocketSOCKSVersion5'); + 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(); - CFStringRef get kCFStreamSocketSOCKSVersion5 => - _kCFStreamSocketSOCKSVersion5.value; + void dispatch_source_set_event_handler_f( + dispatch_source_t source, + dispatch_function_t handler, + ) { + return _dispatch_source_set_event_handler_f( + source, + handler, + ); + } - set kCFStreamSocketSOCKSVersion5(CFStringRef value) => - _kCFStreamSocketSOCKSVersion5.value = 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 _kCFStreamPropertySOCKSUser = - _lookup('kCFStreamPropertySOCKSUser'); + void dispatch_source_set_cancel_handler( + dispatch_source_t source, + dispatch_block_t handler, + ) { + return _dispatch_source_set_cancel_handler( + source, + handler, + ); + } - CFStringRef get kCFStreamPropertySOCKSUser => - _kCFStreamPropertySOCKSUser.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(); - set kCFStreamPropertySOCKSUser(CFStringRef value) => - _kCFStreamPropertySOCKSUser.value = 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, + ); + } - late final ffi.Pointer _kCFStreamPropertySOCKSPassword = - _lookup('kCFStreamPropertySOCKSPassword'); + 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(); - CFStringRef get kCFStreamPropertySOCKSPassword => - _kCFStreamPropertySOCKSPassword.value; + void dispatch_source_cancel( + dispatch_source_t source, + ) { + return _dispatch_source_cancel( + source, + ); + } - set kCFStreamPropertySOCKSPassword(CFStringRef value) => - _kCFStreamPropertySOCKSPassword.value = value; + late final _dispatch_source_cancelPtr = + _lookup>( + 'dispatch_source_cancel'); + late final _dispatch_source_cancel = + _dispatch_source_cancelPtr.asFunction(); - late final ffi.Pointer _kCFStreamErrorDomainSSL = - _lookup('kCFStreamErrorDomainSSL'); + int dispatch_source_testcancel( + dispatch_source_t source, + ) { + return _dispatch_source_testcancel( + source, + ); + } - int get kCFStreamErrorDomainSSL => _kCFStreamErrorDomainSSL.value; + late final _dispatch_source_testcancelPtr = + _lookup>( + 'dispatch_source_testcancel'); + late final _dispatch_source_testcancel = _dispatch_source_testcancelPtr + .asFunction(); - set kCFStreamErrorDomainSSL(int value) => - _kCFStreamErrorDomainSSL.value = value; + int dispatch_source_get_handle( + dispatch_source_t source, + ) { + return _dispatch_source_get_handle( + source, + ); + } - late final ffi.Pointer _kCFStreamPropertySocketSecurityLevel = - _lookup('kCFStreamPropertySocketSecurityLevel'); + late final _dispatch_source_get_handlePtr = + _lookup>( + 'dispatch_source_get_handle'); + late final _dispatch_source_get_handle = _dispatch_source_get_handlePtr + .asFunction(); - CFStringRef get kCFStreamPropertySocketSecurityLevel => - _kCFStreamPropertySocketSecurityLevel.value; + int dispatch_source_get_mask( + dispatch_source_t source, + ) { + return _dispatch_source_get_mask( + source, + ); + } - set kCFStreamPropertySocketSecurityLevel(CFStringRef value) => - _kCFStreamPropertySocketSecurityLevel.value = 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 _kCFStreamSocketSecurityLevelNone = - _lookup('kCFStreamSocketSecurityLevelNone'); + int dispatch_source_get_data( + dispatch_source_t source, + ) { + return _dispatch_source_get_data( + source, + ); + } - CFStringRef get kCFStreamSocketSecurityLevelNone => - _kCFStreamSocketSecurityLevelNone.value; + late final _dispatch_source_get_dataPtr = + _lookup>( + 'dispatch_source_get_data'); + late final _dispatch_source_get_data = _dispatch_source_get_dataPtr + .asFunction(); - set kCFStreamSocketSecurityLevelNone(CFStringRef value) => - _kCFStreamSocketSecurityLevelNone.value = value; + void dispatch_source_merge_data( + dispatch_source_t source, + int value, + ) { + return _dispatch_source_merge_data( + source, + value, + ); + } - late final ffi.Pointer _kCFStreamSocketSecurityLevelSSLv2 = - _lookup('kCFStreamSocketSecurityLevelSSLv2'); + 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 kCFStreamSocketSecurityLevelSSLv2 => - _kCFStreamSocketSecurityLevelSSLv2.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, + ); + } - set kCFStreamSocketSecurityLevelSSLv2(CFStringRef value) => - _kCFStreamSocketSecurityLevelSSLv2.value = 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 _kCFStreamSocketSecurityLevelSSLv3 = - _lookup('kCFStreamSocketSecurityLevelSSLv3'); + void dispatch_source_set_registration_handler( + dispatch_source_t source, + dispatch_block_t handler, + ) { + return _dispatch_source_set_registration_handler( + source, + handler, + ); + } - CFStringRef get kCFStreamSocketSecurityLevelSSLv3 => - _kCFStreamSocketSecurityLevelSSLv3.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(); - 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, + void dispatch_source_set_registration_handler_f( + dispatch_source_t source, + dispatch_function_t handler, ) { - return _CFStreamCreatePairWithSocket( - alloc, - sock, - readStream, - writeStream, + return _dispatch_source_set_registration_handler_f( + source, + handler, ); } - 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_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(); - void CFStreamCreatePairWithSocketToHost( - CFAllocatorRef alloc, - CFStringRef host, - int port, - ffi.Pointer readStream, - ffi.Pointer writeStream, - ) { - return _CFStreamCreatePairWithSocketToHost( - alloc, - host, - port, - readStream, - writeStream, - ); + dispatch_group_t dispatch_group_create() { + return _dispatch_group_create(); } - 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_group_createPtr = + _lookup>( + 'dispatch_group_create'); + late final _dispatch_group_create = + _dispatch_group_createPtr.asFunction(); - void CFStreamCreatePairWithPeerSocketSignature( - CFAllocatorRef alloc, - ffi.Pointer signature, - ffi.Pointer readStream, - ffi.Pointer writeStream, + void dispatch_group_async( + dispatch_group_t group, + dispatch_queue_t queue, + dispatch_block_t block, ) { - return _CFStreamCreatePairWithPeerSocketSignature( - alloc, - signature, - readStream, - writeStream, + return _dispatch_group_async( + group, + queue, + block, ); } - 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_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)>(); - int CFReadStreamGetStatus( - CFReadStreamRef stream, + void dispatch_group_async_f( + dispatch_group_t group, + dispatch_queue_t queue, + ffi.Pointer context, + dispatch_function_t work, ) { - return _CFReadStreamGetStatus( - stream, + return _dispatch_group_async_f( + group, + queue, + context, + work, ); } - late final _CFReadStreamGetStatusPtr = - _lookup>( - 'CFReadStreamGetStatus'); - late final _CFReadStreamGetStatus = - _CFReadStreamGetStatusPtr.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 CFWriteStreamGetStatus( - CFWriteStreamRef stream, + int dispatch_group_wait( + dispatch_group_t group, + int timeout, ) { - return _CFWriteStreamGetStatus( - stream, + return _dispatch_group_wait( + group, + timeout, ); } - late final _CFWriteStreamGetStatusPtr = - _lookup>( - 'CFWriteStreamGetStatus'); - late final _CFWriteStreamGetStatus = - _CFWriteStreamGetStatusPtr.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(); - CFErrorRef CFReadStreamCopyError( - CFReadStreamRef stream, + void dispatch_group_notify( + dispatch_group_t group, + dispatch_queue_t queue, + dispatch_block_t block, ) { - return _CFReadStreamCopyError( - stream, + return _dispatch_group_notify( + group, + queue, + block, ); } - late final _CFReadStreamCopyErrorPtr = - _lookup>( - 'CFReadStreamCopyError'); - late final _CFReadStreamCopyError = _CFReadStreamCopyErrorPtr.asFunction< - CFErrorRef Function(CFReadStreamRef)>(); + 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)>(); - CFErrorRef CFWriteStreamCopyError( - CFWriteStreamRef stream, + void dispatch_group_notify_f( + dispatch_group_t group, + dispatch_queue_t queue, + ffi.Pointer context, + dispatch_function_t work, ) { - return _CFWriteStreamCopyError( - stream, + return _dispatch_group_notify_f( + group, + queue, + context, + work, ); } - late final _CFWriteStreamCopyErrorPtr = - _lookup>( - 'CFWriteStreamCopyError'); - late final _CFWriteStreamCopyError = _CFWriteStreamCopyErrorPtr.asFunction< - CFErrorRef Function(CFWriteStreamRef)>(); + 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)>(); - int CFReadStreamOpen( - CFReadStreamRef stream, + void dispatch_group_enter( + dispatch_group_t group, ) { - return _CFReadStreamOpen( - stream, + return _dispatch_group_enter( + group, ); } - late final _CFReadStreamOpenPtr = - _lookup>( - 'CFReadStreamOpen'); - late final _CFReadStreamOpen = - _CFReadStreamOpenPtr.asFunction(); + late final _dispatch_group_enterPtr = + _lookup>( + 'dispatch_group_enter'); + late final _dispatch_group_enter = + _dispatch_group_enterPtr.asFunction(); - int CFWriteStreamOpen( - CFWriteStreamRef stream, + void dispatch_group_leave( + dispatch_group_t group, ) { - return _CFWriteStreamOpen( - stream, + return _dispatch_group_leave( + group, ); } - late final _CFWriteStreamOpenPtr = - _lookup>( - 'CFWriteStreamOpen'); - late final _CFWriteStreamOpen = - _CFWriteStreamOpenPtr.asFunction(); + late final _dispatch_group_leavePtr = + _lookup>( + 'dispatch_group_leave'); + late final _dispatch_group_leave = + _dispatch_group_leavePtr.asFunction(); - void CFReadStreamClose( - CFReadStreamRef stream, + dispatch_semaphore_t dispatch_semaphore_create( + int value, ) { - return _CFReadStreamClose( - stream, + return _dispatch_semaphore_create( + value, ); } - late final _CFReadStreamClosePtr = - _lookup>( - 'CFReadStreamClose'); - late final _CFReadStreamClose = - _CFReadStreamClosePtr.asFunction(); + late final _dispatch_semaphore_createPtr = + _lookup>( + 'dispatch_semaphore_create'); + late final _dispatch_semaphore_create = _dispatch_semaphore_createPtr + .asFunction(); - void CFWriteStreamClose( - CFWriteStreamRef stream, + int dispatch_semaphore_wait( + dispatch_semaphore_t dsema, + int timeout, ) { - return _CFWriteStreamClose( - stream, + return _dispatch_semaphore_wait( + dsema, + timeout, ); } - late final _CFWriteStreamClosePtr = - _lookup>( - 'CFWriteStreamClose'); - late final _CFWriteStreamClose = - _CFWriteStreamClosePtr.asFunction(); + 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 CFReadStreamHasBytesAvailable( - CFReadStreamRef stream, + int dispatch_semaphore_signal( + dispatch_semaphore_t dsema, ) { - return _CFReadStreamHasBytesAvailable( - stream, + return _dispatch_semaphore_signal( + dsema, ); } - late final _CFReadStreamHasBytesAvailablePtr = - _lookup>( - 'CFReadStreamHasBytesAvailable'); - late final _CFReadStreamHasBytesAvailable = _CFReadStreamHasBytesAvailablePtr - .asFunction(); + late final _dispatch_semaphore_signalPtr = + _lookup>( + 'dispatch_semaphore_signal'); + late final _dispatch_semaphore_signal = _dispatch_semaphore_signalPtr + .asFunction(); - int CFReadStreamRead( - CFReadStreamRef stream, - ffi.Pointer buffer, - int bufferLength, + void dispatch_once( + ffi.Pointer predicate, + dispatch_block_t block, ) { - return _CFReadStreamRead( - stream, - buffer, - bufferLength, + return _dispatch_once( + predicate, + block, ); } - late final _CFReadStreamReadPtr = _lookup< + late final _dispatch_oncePtr = _lookup< ffi.NativeFunction< - CFIndex Function(CFReadStreamRef, ffi.Pointer, - CFIndex)>>('CFReadStreamRead'); - late final _CFReadStreamRead = _CFReadStreamReadPtr.asFunction< - int Function(CFReadStreamRef, ffi.Pointer, int)>(); + 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.Pointer CFReadStreamGetBuffer( - CFReadStreamRef stream, - int maxBytesToRead, - ffi.Pointer numBytesRead, + void dispatch_once_f( + ffi.Pointer predicate, + ffi.Pointer context, + dispatch_function_t function, ) { - return _CFReadStreamGetBuffer( - stream, - maxBytesToRead, - numBytesRead, + return _dispatch_once_f( + predicate, + context, + function, ); } - late final _CFReadStreamGetBufferPtr = _lookup< + late final _dispatch_once_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(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 CFWriteStreamCanAcceptBytes( - CFWriteStreamRef stream, - ) { - return _CFWriteStreamCanAcceptBytes( - stream, - ); - } + late final ffi.Pointer __dispatch_data_empty = + _lookup('_dispatch_data_empty'); - late final _CFWriteStreamCanAcceptBytesPtr = - _lookup>( - 'CFWriteStreamCanAcceptBytes'); - late final _CFWriteStreamCanAcceptBytes = _CFWriteStreamCanAcceptBytesPtr - .asFunction(); + ffi.Pointer get _dispatch_data_empty => + __dispatch_data_empty; - int CFWriteStreamWrite( - CFWriteStreamRef stream, - ffi.Pointer buffer, - int bufferLength, + 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 _CFWriteStreamWrite( - stream, + return _dispatch_data_create( buffer, - bufferLength, + size, + queue, + destructor, ); } - late final _CFWriteStreamWritePtr = _lookup< + late final _dispatch_data_createPtr = _lookup< ffi.NativeFunction< - CFIndex Function(CFWriteStreamRef, ffi.Pointer, - CFIndex)>>('CFWriteStreamWrite'); - late final _CFWriteStreamWrite = _CFWriteStreamWritePtr.asFunction< - int Function(CFWriteStreamRef, ffi.Pointer, int)>(); + 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)>(); - CFTypeRef CFReadStreamCopyProperty( - CFReadStreamRef stream, - CFStreamPropertyKey propertyName, + int dispatch_data_get_size( + dispatch_data_t data, ) { - return _CFReadStreamCopyProperty( - stream, - propertyName, + return _dispatch_data_get_size( + data, ); } - late final _CFReadStreamCopyPropertyPtr = _lookup< - ffi.NativeFunction< - CFTypeRef Function(CFReadStreamRef, - CFStreamPropertyKey)>>('CFReadStreamCopyProperty'); - late final _CFReadStreamCopyProperty = _CFReadStreamCopyPropertyPtr - .asFunction(); + late final _dispatch_data_get_sizePtr = + _lookup>( + 'dispatch_data_get_size'); + late final _dispatch_data_get_size = + _dispatch_data_get_sizePtr.asFunction(); - CFTypeRef CFWriteStreamCopyProperty( - CFWriteStreamRef stream, - CFStreamPropertyKey propertyName, + dispatch_data_t dispatch_data_create_map( + dispatch_data_t data, + ffi.Pointer> buffer_ptr, + ffi.Pointer size_ptr, ) { - return _CFWriteStreamCopyProperty( - stream, - propertyName, + return _dispatch_data_create_map( + data, + buffer_ptr, + size_ptr, ); } - late final _CFWriteStreamCopyPropertyPtr = _lookup< + late final _dispatch_data_create_mapPtr = _lookup< ffi.NativeFunction< - CFTypeRef Function(CFWriteStreamRef, - CFStreamPropertyKey)>>('CFWriteStreamCopyProperty'); - late final _CFWriteStreamCopyProperty = _CFWriteStreamCopyPropertyPtr - .asFunction(); + 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)>(); - int CFReadStreamSetProperty( - CFReadStreamRef stream, - CFStreamPropertyKey propertyName, - CFTypeRef propertyValue, + dispatch_data_t dispatch_data_create_concat( + dispatch_data_t data1, + dispatch_data_t data2, ) { - return _CFReadStreamSetProperty( - stream, - propertyName, - propertyValue, + return _dispatch_data_create_concat( + data1, + data2, ); } - late final _CFReadStreamSetPropertyPtr = _lookup< + late final _dispatch_data_create_concatPtr = _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, + 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 _CFWriteStreamSetProperty( - stream, - propertyName, - propertyValue, + return _dispatch_data_create_subrange( + data, + offset, + length, ); } - late final _CFWriteStreamSetPropertyPtr = _lookup< + late final _dispatch_data_create_subrangePtr = _lookup< ffi.NativeFunction< - Boolean Function(CFWriteStreamRef, CFStreamPropertyKey, - CFTypeRef)>>('CFWriteStreamSetProperty'); - late final _CFWriteStreamSetProperty = - _CFWriteStreamSetPropertyPtr.asFunction< - int Function(CFWriteStreamRef, CFStreamPropertyKey, CFTypeRef)>(); + 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(); - int CFReadStreamSetClient( - CFReadStreamRef stream, - int streamEvents, - CFReadStreamClientCallBack clientCB, - ffi.Pointer clientContext, + bool dispatch_data_apply( + dispatch_data_t data, + dispatch_data_applier_t applier, ) { - return _CFReadStreamSetClient( - stream, - streamEvents, - clientCB, - clientContext, + return _dispatch_data_apply( + data, + applier, ); } - late final _CFReadStreamSetClientPtr = _lookup< + late final _dispatch_data_applyPtr = _lookup< ffi.NativeFunction< - Boolean Function( - CFReadStreamRef, - CFOptionFlags, - CFReadStreamClientCallBack, - ffi.Pointer)>>('CFReadStreamSetClient'); - late final _CFReadStreamSetClient = _CFReadStreamSetClientPtr.asFunction< - int Function(CFReadStreamRef, int, CFReadStreamClientCallBack, - ffi.Pointer)>(); + ffi.Bool Function(dispatch_data_t, + dispatch_data_applier_t)>>('dispatch_data_apply'); + late final _dispatch_data_apply = _dispatch_data_applyPtr + .asFunction(); - int CFWriteStreamSetClient( - CFWriteStreamRef stream, - int streamEvents, - CFWriteStreamClientCallBack clientCB, - ffi.Pointer clientContext, + dispatch_data_t dispatch_data_copy_region( + dispatch_data_t data, + int location, + ffi.Pointer offset_ptr, ) { - return _CFWriteStreamSetClient( - stream, - streamEvents, - clientCB, - clientContext, + return _dispatch_data_copy_region( + data, + location, + offset_ptr, ); } - late final _CFWriteStreamSetClientPtr = _lookup< + late final _dispatch_data_copy_regionPtr = _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(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 CFReadStreamScheduleWithRunLoop( - CFReadStreamRef stream, - CFRunLoopRef runLoop, - CFRunLoopMode runLoopMode, + void dispatch_read( + int fd, + int length, + dispatch_queue_t queue, + ffi.Pointer<_ObjCBlock> handler, ) { - return _CFReadStreamScheduleWithRunLoop( - stream, - runLoop, - runLoopMode, + return _dispatch_read( + fd, + length, + queue, + handler, ); } - late final _CFReadStreamScheduleWithRunLoopPtr = _lookup< + late final _dispatch_readPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFReadStreamRef, CFRunLoopRef, - CFRunLoopMode)>>('CFReadStreamScheduleWithRunLoop'); - late final _CFReadStreamScheduleWithRunLoop = - _CFReadStreamScheduleWithRunLoopPtr.asFunction< - void Function(CFReadStreamRef, CFRunLoopRef, CFRunLoopMode)>(); + 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 CFWriteStreamScheduleWithRunLoop( - CFWriteStreamRef stream, - CFRunLoopRef runLoop, - CFRunLoopMode runLoopMode, + void dispatch_write( + int fd, + dispatch_data_t data, + dispatch_queue_t queue, + ffi.Pointer<_ObjCBlock> handler, ) { - return _CFWriteStreamScheduleWithRunLoop( - stream, - runLoop, - runLoopMode, + return _dispatch_write( + fd, + data, + queue, + handler, ); } - late final _CFWriteStreamScheduleWithRunLoopPtr = _lookup< + late final _dispatch_writePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFWriteStreamRef, CFRunLoopRef, - CFRunLoopMode)>>('CFWriteStreamScheduleWithRunLoop'); - late final _CFWriteStreamScheduleWithRunLoop = - _CFWriteStreamScheduleWithRunLoopPtr.asFunction< - void Function(CFWriteStreamRef, CFRunLoopRef, CFRunLoopMode)>(); + 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>)>(); - void CFReadStreamUnscheduleFromRunLoop( - CFReadStreamRef stream, - CFRunLoopRef runLoop, - CFRunLoopMode runLoopMode, + dispatch_io_t dispatch_io_create( + int type, + int fd, + dispatch_queue_t queue, + ffi.Pointer<_ObjCBlock> cleanup_handler, ) { - return _CFReadStreamUnscheduleFromRunLoop( - stream, - runLoop, - runLoopMode, + return _dispatch_io_create( + type, + fd, + queue, + cleanup_handler, ); } - late final _CFReadStreamUnscheduleFromRunLoopPtr = _lookup< + late final _dispatch_io_createPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFReadStreamRef, CFRunLoopRef, - CFRunLoopMode)>>('CFReadStreamUnscheduleFromRunLoop'); - late final _CFReadStreamUnscheduleFromRunLoop = - _CFReadStreamUnscheduleFromRunLoopPtr.asFunction< - void Function(CFReadStreamRef, CFRunLoopRef, CFRunLoopMode)>(); + 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>)>(); - void CFWriteStreamUnscheduleFromRunLoop( - CFWriteStreamRef stream, - CFRunLoopRef runLoop, - CFRunLoopMode runLoopMode, + 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 _CFWriteStreamUnscheduleFromRunLoop( - stream, - runLoop, - runLoopMode, + return _dispatch_io_create_with_path( + type, + path, + oflag, + mode, + queue, + cleanup_handler, ); } - late final _CFWriteStreamUnscheduleFromRunLoopPtr = _lookup< + late final _dispatch_io_create_with_pathPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFWriteStreamRef, CFRunLoopRef, - CFRunLoopMode)>>('CFWriteStreamUnscheduleFromRunLoop'); - late final _CFWriteStreamUnscheduleFromRunLoop = - _CFWriteStreamUnscheduleFromRunLoopPtr.asFunction< - void Function(CFWriteStreamRef, CFRunLoopRef, CFRunLoopMode)>(); + 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>)>(); - void CFReadStreamSetDispatchQueue( - CFReadStreamRef stream, - dispatch_queue_t q, + dispatch_io_t dispatch_io_create_with_io( + int type, + dispatch_io_t io, + dispatch_queue_t queue, + ffi.Pointer<_ObjCBlock> cleanup_handler, ) { - return _CFReadStreamSetDispatchQueue( - stream, - q, + return _dispatch_io_create_with_io( + type, + io, + queue, + cleanup_handler, ); } - late final _CFReadStreamSetDispatchQueuePtr = _lookup< + late final _dispatch_io_create_with_ioPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFReadStreamRef, - dispatch_queue_t)>>('CFReadStreamSetDispatchQueue'); - late final _CFReadStreamSetDispatchQueue = _CFReadStreamSetDispatchQueuePtr - .asFunction(); + 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 CFWriteStreamSetDispatchQueue( - CFWriteStreamRef stream, - dispatch_queue_t q, + void dispatch_io_read( + dispatch_io_t channel, + int offset, + int length, + dispatch_queue_t queue, + dispatch_io_handler_t io_handler, ) { - return _CFWriteStreamSetDispatchQueue( - stream, - q, + return _dispatch_io_read( + channel, + offset, + length, + queue, + io_handler, ); } - late final _CFWriteStreamSetDispatchQueuePtr = _lookup< + late final _dispatch_io_readPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFWriteStreamRef, - dispatch_queue_t)>>('CFWriteStreamSetDispatchQueue'); - late final _CFWriteStreamSetDispatchQueue = _CFWriteStreamSetDispatchQueuePtr - .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)>(); - dispatch_queue_t CFReadStreamCopyDispatchQueue( - CFReadStreamRef stream, + 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 _CFReadStreamCopyDispatchQueue( - stream, + return _dispatch_io_write( + channel, + offset, + data, + queue, + io_handler, ); } - late final _CFReadStreamCopyDispatchQueuePtr = - _lookup>( - 'CFReadStreamCopyDispatchQueue'); - late final _CFReadStreamCopyDispatchQueue = _CFReadStreamCopyDispatchQueuePtr - .asFunction(); + 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)>(); - dispatch_queue_t CFWriteStreamCopyDispatchQueue( - CFWriteStreamRef stream, + void dispatch_io_close( + dispatch_io_t channel, + int flags, ) { - return _CFWriteStreamCopyDispatchQueue( - stream, + return _dispatch_io_close( + channel, + flags, ); } - late final _CFWriteStreamCopyDispatchQueuePtr = - _lookup>( - 'CFWriteStreamCopyDispatchQueue'); - late final _CFWriteStreamCopyDispatchQueue = - _CFWriteStreamCopyDispatchQueuePtr.asFunction< - dispatch_queue_t Function(CFWriteStreamRef)>(); + 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(); - CFStreamError CFReadStreamGetError( - CFReadStreamRef stream, + void dispatch_io_barrier( + dispatch_io_t channel, + dispatch_block_t barrier, ) { - return _CFReadStreamGetError( - stream, + return _dispatch_io_barrier( + channel, + barrier, ); } - late final _CFReadStreamGetErrorPtr = - _lookup>( - 'CFReadStreamGetError'); - late final _CFReadStreamGetError = _CFReadStreamGetErrorPtr.asFunction< - CFStreamError Function(CFReadStreamRef)>(); + late final _dispatch_io_barrierPtr = _lookup< + ffi + .NativeFunction>( + 'dispatch_io_barrier'); + late final _dispatch_io_barrier = _dispatch_io_barrierPtr + .asFunction(); - CFStreamError CFWriteStreamGetError( - CFWriteStreamRef stream, + int dispatch_io_get_descriptor( + dispatch_io_t channel, ) { - return _CFWriteStreamGetError( - stream, + return _dispatch_io_get_descriptor( + channel, ); } - late final _CFWriteStreamGetErrorPtr = - _lookup>( - 'CFWriteStreamGetError'); - late final _CFWriteStreamGetError = _CFWriteStreamGetErrorPtr.asFunction< - CFStreamError Function(CFWriteStreamRef)>(); + late final _dispatch_io_get_descriptorPtr = + _lookup>( + 'dispatch_io_get_descriptor'); + late final _dispatch_io_get_descriptor = + _dispatch_io_get_descriptorPtr.asFunction(); - CFPropertyListRef CFPropertyListCreateFromXMLData( - CFAllocatorRef allocator, - CFDataRef xmlData, - int mutabilityOption, - ffi.Pointer errorString, + void dispatch_io_set_high_water( + dispatch_io_t channel, + int high_water, ) { - return _CFPropertyListCreateFromXMLData( - allocator, - xmlData, - mutabilityOption, - errorString, + return _dispatch_io_set_high_water( + channel, + high_water, ); } - 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 _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 CFPropertyListCreateXMLData( - CFAllocatorRef allocator, - CFPropertyListRef propertyList, + void dispatch_io_set_low_water( + dispatch_io_t channel, + int low_water, ) { - return _CFPropertyListCreateXMLData( - allocator, - propertyList, + return _dispatch_io_set_low_water( + channel, + low_water, ); } - late final _CFPropertyListCreateXMLDataPtr = _lookup< - ffi.NativeFunction< - CFDataRef Function(CFAllocatorRef, - CFPropertyListRef)>>('CFPropertyListCreateXMLData'); - late final _CFPropertyListCreateXMLData = _CFPropertyListCreateXMLDataPtr - .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(); - CFPropertyListRef CFPropertyListCreateDeepCopy( - CFAllocatorRef allocator, - CFPropertyListRef propertyList, - int mutabilityOption, + void dispatch_io_set_interval( + dispatch_io_t channel, + int interval, + int flags, ) { - return _CFPropertyListCreateDeepCopy( - allocator, - propertyList, - mutabilityOption, + return _dispatch_io_set_interval( + channel, + interval, + flags, ); } - late final _CFPropertyListCreateDeepCopyPtr = _lookup< + late final _dispatch_io_set_intervalPtr = _lookup< ffi.NativeFunction< - CFPropertyListRef Function(CFAllocatorRef, CFPropertyListRef, - CFOptionFlags)>>('CFPropertyListCreateDeepCopy'); - late final _CFPropertyListCreateDeepCopy = - _CFPropertyListCreateDeepCopyPtr.asFunction< - CFPropertyListRef Function(CFAllocatorRef, CFPropertyListRef, int)>(); + 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 CFPropertyListIsValid( - CFPropertyListRef plist, - int format, + dispatch_workloop_t dispatch_workloop_create( + ffi.Pointer label, ) { - return _CFPropertyListIsValid( - plist, - format, + return _dispatch_workloop_create( + label, ); } - late final _CFPropertyListIsValidPtr = _lookup< - ffi.NativeFunction>( - 'CFPropertyListIsValid'); - late final _CFPropertyListIsValid = _CFPropertyListIsValidPtr.asFunction< - int Function(CFPropertyListRef, int)>(); + late final _dispatch_workloop_createPtr = _lookup< + ffi + .NativeFunction)>>( + 'dispatch_workloop_create'); + late final _dispatch_workloop_create = _dispatch_workloop_createPtr + .asFunction)>(); - int CFPropertyListWriteToStream( - CFPropertyListRef propertyList, - CFWriteStreamRef stream, - int format, - ffi.Pointer errorString, + dispatch_workloop_t dispatch_workloop_create_inactive( + ffi.Pointer label, ) { - return _CFPropertyListWriteToStream( - propertyList, - stream, - format, - errorString, + return _dispatch_workloop_create_inactive( + label, ); } - 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)>(); + late final _dispatch_workloop_create_inactivePtr = _lookup< + ffi + .NativeFunction)>>( + 'dispatch_workloop_create_inactive'); + late final _dispatch_workloop_create_inactive = + _dispatch_workloop_create_inactivePtr + .asFunction)>(); - CFPropertyListRef CFPropertyListCreateFromStream( - CFAllocatorRef allocator, - CFReadStreamRef stream, - int streamLength, - int mutabilityOption, - ffi.Pointer format, - ffi.Pointer errorString, + void dispatch_workloop_set_autorelease_frequency( + dispatch_workloop_t workloop, + int frequency, ) { - 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, + return _dispatch_workloop_set_autorelease_frequency( + workloop, + frequency, ); } - 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_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(); - CFPropertyListRef CFPropertyListCreateWithStream( - CFAllocatorRef allocator, - CFReadStreamRef stream, - int streamLength, - int options, - ffi.Pointer format, - ffi.Pointer error, + void dispatch_workloop_set_os_workgroup( + dispatch_workloop_t workloop, + os_workgroup_t workgroup, ) { - return _CFPropertyListCreateWithStream( - allocator, - stream, - streamLength, - options, - format, - error, + return _dispatch_workloop_set_os_workgroup( + workloop, + workgroup, ); } - late final _CFPropertyListCreateWithStreamPtr = _lookup< + late final _dispatch_workloop_set_os_workgroupPtr = _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_workloop_t, + os_workgroup_t)>>('dispatch_workloop_set_os_workgroup'); + late final _dispatch_workloop_set_os_workgroup = + _dispatch_workloop_set_os_workgroupPtr + .asFunction(); - int CFPropertyListWrite( - CFPropertyListRef propertyList, - CFWriteStreamRef stream, - int format, - int options, - ffi.Pointer error, - ) { - return _CFPropertyListWrite( - propertyList, - stream, - format, - options, - error, - ); + int CFReadStreamGetTypeID() { + return _CFReadStreamGetTypeID(); } - 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 _CFReadStreamGetTypeIDPtr = + _lookup>('CFReadStreamGetTypeID'); + late final _CFReadStreamGetTypeID = + _CFReadStreamGetTypeIDPtr.asFunction(); - CFDataRef CFPropertyListCreateData( - CFAllocatorRef allocator, - CFPropertyListRef propertyList, - int format, - int options, - ffi.Pointer error, - ) { - return _CFPropertyListCreateData( - allocator, - propertyList, - format, - options, - error, - ); + int CFWriteStreamGetTypeID() { + return _CFWriteStreamGetTypeID(); } - 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'); + late final _CFWriteStreamGetTypeIDPtr = + _lookup>( + 'CFWriteStreamGetTypeID'); + late final _CFWriteStreamGetTypeID = + _CFWriteStreamGetTypeIDPtr.asFunction(); - CFSetCallBacks get kCFCopyStringSetCallBacks => - _kCFCopyStringSetCallBacks.ref; + late final ffi.Pointer _kCFStreamPropertyDataWritten = + _lookup('kCFStreamPropertyDataWritten'); - int CFSetGetTypeID() { - return _CFSetGetTypeID(); - } + CFStreamPropertyKey get kCFStreamPropertyDataWritten => + _kCFStreamPropertyDataWritten.value; - late final _CFSetGetTypeIDPtr = - _lookup>('CFSetGetTypeID'); - late final _CFSetGetTypeID = _CFSetGetTypeIDPtr.asFunction(); + set kCFStreamPropertyDataWritten(CFStreamPropertyKey value) => + _kCFStreamPropertyDataWritten.value = value; - CFSetRef CFSetCreate( - CFAllocatorRef allocator, - ffi.Pointer> values, - int numValues, - ffi.Pointer callBacks, + CFReadStreamRef CFReadStreamCreateWithBytesNoCopy( + CFAllocatorRef alloc, + ffi.Pointer bytes, + int length, + CFAllocatorRef bytesDeallocator, ) { - return _CFSetCreate( - allocator, - values, - numValues, - callBacks, + return _CFReadStreamCreateWithBytesNoCopy( + alloc, + bytes, + length, + bytesDeallocator, ); } - late final _CFSetCreatePtr = _lookup< + late final _CFReadStreamCreateWithBytesNoCopyPtr = _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)>(); + CFReadStreamRef Function(CFAllocatorRef, ffi.Pointer, CFIndex, + CFAllocatorRef)>>('CFReadStreamCreateWithBytesNoCopy'); + late final _CFReadStreamCreateWithBytesNoCopy = + _CFReadStreamCreateWithBytesNoCopyPtr.asFunction< + CFReadStreamRef Function( + CFAllocatorRef, ffi.Pointer, int, CFAllocatorRef)>(); - CFSetRef CFSetCreateCopy( - CFAllocatorRef allocator, - CFSetRef theSet, + CFWriteStreamRef CFWriteStreamCreateWithBuffer( + CFAllocatorRef alloc, + ffi.Pointer buffer, + int bufferCapacity, ) { - return _CFSetCreateCopy( - allocator, - theSet, + return _CFWriteStreamCreateWithBuffer( + alloc, + buffer, + bufferCapacity, ); } - late final _CFSetCreateCopyPtr = - _lookup>( - 'CFSetCreateCopy'); - late final _CFSetCreateCopy = _CFSetCreateCopyPtr.asFunction< - CFSetRef Function(CFAllocatorRef, CFSetRef)>(); + late final _CFWriteStreamCreateWithBufferPtr = _lookup< + ffi.NativeFunction< + CFWriteStreamRef Function(CFAllocatorRef, ffi.Pointer, + CFIndex)>>('CFWriteStreamCreateWithBuffer'); + late final _CFWriteStreamCreateWithBuffer = + _CFWriteStreamCreateWithBufferPtr.asFunction< + CFWriteStreamRef Function(CFAllocatorRef, ffi.Pointer, int)>(); - CFMutableSetRef CFSetCreateMutable( - CFAllocatorRef allocator, - int capacity, - ffi.Pointer callBacks, + CFWriteStreamRef CFWriteStreamCreateWithAllocatedBuffers( + CFAllocatorRef alloc, + CFAllocatorRef bufferAllocator, ) { - return _CFSetCreateMutable( - allocator, - capacity, - callBacks, + return _CFWriteStreamCreateWithAllocatedBuffers( + alloc, + bufferAllocator, ); } - late final _CFSetCreateMutablePtr = _lookup< + late final _CFWriteStreamCreateWithAllocatedBuffersPtr = _lookup< ffi.NativeFunction< - CFMutableSetRef Function(CFAllocatorRef, CFIndex, - ffi.Pointer)>>('CFSetCreateMutable'); - late final _CFSetCreateMutable = _CFSetCreateMutablePtr.asFunction< - CFMutableSetRef Function( - CFAllocatorRef, int, ffi.Pointer)>(); + CFWriteStreamRef Function(CFAllocatorRef, + CFAllocatorRef)>>('CFWriteStreamCreateWithAllocatedBuffers'); + late final _CFWriteStreamCreateWithAllocatedBuffers = + _CFWriteStreamCreateWithAllocatedBuffersPtr.asFunction< + CFWriteStreamRef Function(CFAllocatorRef, CFAllocatorRef)>(); - CFMutableSetRef CFSetCreateMutableCopy( - CFAllocatorRef allocator, - int capacity, - CFSetRef theSet, + CFReadStreamRef CFReadStreamCreateWithFile( + CFAllocatorRef alloc, + CFURLRef fileURL, ) { - return _CFSetCreateMutableCopy( - allocator, - capacity, - theSet, + return _CFReadStreamCreateWithFile( + alloc, + fileURL, ); } - late final _CFSetCreateMutableCopyPtr = _lookup< - ffi.NativeFunction< - CFMutableSetRef Function( - CFAllocatorRef, CFIndex, CFSetRef)>>('CFSetCreateMutableCopy'); - late final _CFSetCreateMutableCopy = _CFSetCreateMutableCopyPtr.asFunction< - CFMutableSetRef Function(CFAllocatorRef, int, CFSetRef)>(); + late final _CFReadStreamCreateWithFilePtr = _lookup< + ffi + .NativeFunction>( + 'CFReadStreamCreateWithFile'); + late final _CFReadStreamCreateWithFile = _CFReadStreamCreateWithFilePtr + .asFunction(); - int CFSetGetCount( - CFSetRef theSet, + CFWriteStreamRef CFWriteStreamCreateWithFile( + CFAllocatorRef alloc, + CFURLRef fileURL, ) { - return _CFSetGetCount( - theSet, + return _CFWriteStreamCreateWithFile( + alloc, + fileURL, ); } - late final _CFSetGetCountPtr = - _lookup>('CFSetGetCount'); - late final _CFSetGetCount = - _CFSetGetCountPtr.asFunction(); + late final _CFWriteStreamCreateWithFilePtr = _lookup< + ffi + .NativeFunction>( + 'CFWriteStreamCreateWithFile'); + late final _CFWriteStreamCreateWithFile = _CFWriteStreamCreateWithFilePtr + .asFunction(); - int CFSetGetCountOfValue( - CFSetRef theSet, - ffi.Pointer value, + void CFStreamCreateBoundPair( + CFAllocatorRef alloc, + ffi.Pointer readStream, + ffi.Pointer writeStream, + int transferBufferSize, ) { - return _CFSetGetCountOfValue( - theSet, - value, + return _CFStreamCreateBoundPair( + alloc, + readStream, + writeStream, + transferBufferSize, ); } - late final _CFSetGetCountOfValuePtr = _lookup< + late final _CFStreamCreateBoundPairPtr = _lookup< ffi.NativeFunction< - CFIndex Function( - CFSetRef, ffi.Pointer)>>('CFSetGetCountOfValue'); - late final _CFSetGetCountOfValue = _CFSetGetCountOfValuePtr.asFunction< - int Function(CFSetRef, 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)>(); - int CFSetContainsValue( - CFSetRef theSet, - ffi.Pointer value, - ) { - return _CFSetContainsValue( - theSet, - value, - ); - } + late final ffi.Pointer _kCFStreamPropertyAppendToFile = + _lookup('kCFStreamPropertyAppendToFile'); - late final _CFSetContainsValuePtr = _lookup< - ffi.NativeFunction< - Boolean Function( - CFSetRef, ffi.Pointer)>>('CFSetContainsValue'); - late final _CFSetContainsValue = _CFSetContainsValuePtr.asFunction< - int Function(CFSetRef, ffi.Pointer)>(); + CFStreamPropertyKey get kCFStreamPropertyAppendToFile => + _kCFStreamPropertyAppendToFile.value; - ffi.Pointer CFSetGetValue( - CFSetRef theSet, - ffi.Pointer value, - ) { - return _CFSetGetValue( - theSet, - value, - ); - } + set kCFStreamPropertyAppendToFile(CFStreamPropertyKey value) => + _kCFStreamPropertyAppendToFile.value = 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)>(); + late final ffi.Pointer + _kCFStreamPropertyFileCurrentOffset = + _lookup('kCFStreamPropertyFileCurrentOffset'); - int CFSetGetValueIfPresent( - CFSetRef theSet, - ffi.Pointer candidate, - ffi.Pointer> value, - ) { - return _CFSetGetValueIfPresent( - theSet, - candidate, - value, - ); - } + CFStreamPropertyKey get kCFStreamPropertyFileCurrentOffset => + _kCFStreamPropertyFileCurrentOffset.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>)>(); + set kCFStreamPropertyFileCurrentOffset(CFStreamPropertyKey value) => + _kCFStreamPropertyFileCurrentOffset.value = value; - void CFSetGetValues( - CFSetRef theSet, - ffi.Pointer> values, - ) { - return _CFSetGetValues( - theSet, - values, - ); - } + late final ffi.Pointer + _kCFStreamPropertySocketNativeHandle = + _lookup('kCFStreamPropertySocketNativeHandle'); - late final _CFSetGetValuesPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFSetRef, ffi.Pointer>)>>('CFSetGetValues'); - late final _CFSetGetValues = _CFSetGetValuesPtr.asFunction< - void Function(CFSetRef, ffi.Pointer>)>(); + CFStreamPropertyKey get kCFStreamPropertySocketNativeHandle => + _kCFStreamPropertySocketNativeHandle.value; - void CFSetApplyFunction( - CFSetRef theSet, - CFSetApplierFunction applier, - ffi.Pointer context, - ) { - return _CFSetApplyFunction( - theSet, - applier, - context, - ); - } + set kCFStreamPropertySocketNativeHandle(CFStreamPropertyKey value) => + _kCFStreamPropertySocketNativeHandle.value = value; - 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 ffi.Pointer + _kCFStreamPropertySocketRemoteHostName = + _lookup('kCFStreamPropertySocketRemoteHostName'); - void CFSetAddValue( - CFMutableSetRef theSet, - ffi.Pointer value, - ) { - return _CFSetAddValue( - theSet, - value, - ); - } + CFStreamPropertyKey get kCFStreamPropertySocketRemoteHostName => + _kCFStreamPropertySocketRemoteHostName.value; - late final _CFSetAddValuePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFMutableSetRef, ffi.Pointer)>>('CFSetAddValue'); - late final _CFSetAddValue = _CFSetAddValuePtr.asFunction< - void Function(CFMutableSetRef, ffi.Pointer)>(); + set kCFStreamPropertySocketRemoteHostName(CFStreamPropertyKey value) => + _kCFStreamPropertySocketRemoteHostName.value = value; - void CFSetReplaceValue( - CFMutableSetRef theSet, - ffi.Pointer value, - ) { - return _CFSetReplaceValue( - theSet, - value, - ); - } + late final ffi.Pointer + _kCFStreamPropertySocketRemotePortNumber = + _lookup('kCFStreamPropertySocketRemotePortNumber'); - 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 kCFStreamPropertySocketRemotePortNumber => + _kCFStreamPropertySocketRemotePortNumber.value; - void CFSetSetValue( - CFMutableSetRef theSet, - ffi.Pointer value, - ) { - return _CFSetSetValue( - theSet, - value, - ); - } + set kCFStreamPropertySocketRemotePortNumber(CFStreamPropertyKey value) => + _kCFStreamPropertySocketRemotePortNumber.value = value; - 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 ffi.Pointer _kCFStreamErrorDomainSOCKS = + _lookup('kCFStreamErrorDomainSOCKS'); - void CFSetRemoveValue( - CFMutableSetRef theSet, - ffi.Pointer value, - ) { - return _CFSetRemoveValue( - theSet, - value, - ); - } + int get kCFStreamErrorDomainSOCKS => _kCFStreamErrorDomainSOCKS.value; - late final _CFSetRemoveValuePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFMutableSetRef, ffi.Pointer)>>('CFSetRemoveValue'); - late final _CFSetRemoveValue = _CFSetRemoveValuePtr.asFunction< - void Function(CFMutableSetRef, ffi.Pointer)>(); + set kCFStreamErrorDomainSOCKS(int value) => + _kCFStreamErrorDomainSOCKS.value = value; - void CFSetRemoveAllValues( - CFMutableSetRef theSet, - ) { - return _CFSetRemoveAllValues( - theSet, - ); - } + late final ffi.Pointer _kCFStreamPropertySOCKSProxy = + _lookup('kCFStreamPropertySOCKSProxy'); - late final _CFSetRemoveAllValuesPtr = - _lookup>( - 'CFSetRemoveAllValues'); - late final _CFSetRemoveAllValues = - _CFSetRemoveAllValuesPtr.asFunction(); + CFStringRef get kCFStreamPropertySOCKSProxy => + _kCFStreamPropertySOCKSProxy.value; - int CFTreeGetTypeID() { - return _CFTreeGetTypeID(); - } + set kCFStreamPropertySOCKSProxy(CFStringRef value) => + _kCFStreamPropertySOCKSProxy.value = value; - late final _CFTreeGetTypeIDPtr = - _lookup>('CFTreeGetTypeID'); - late final _CFTreeGetTypeID = - _CFTreeGetTypeIDPtr.asFunction(); + late final ffi.Pointer _kCFStreamPropertySOCKSProxyHost = + _lookup('kCFStreamPropertySOCKSProxyHost'); - CFTreeRef CFTreeCreate( - CFAllocatorRef allocator, - ffi.Pointer context, + 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 _CFTreeCreate( - allocator, - context, + return _CFStreamCreatePairWithSocket( + alloc, + sock, + readStream, + writeStream, ); } - late final _CFTreeCreatePtr = _lookup< + late final _CFStreamCreatePairWithSocketPtr = _lookup< ffi.NativeFunction< - CFTreeRef Function( - CFAllocatorRef, ffi.Pointer)>>('CFTreeCreate'); - late final _CFTreeCreate = _CFTreeCreatePtr.asFunction< - CFTreeRef Function(CFAllocatorRef, ffi.Pointer)>(); + ffi.Void Function( + CFAllocatorRef, + CFSocketNativeHandle, + ffi.Pointer, + ffi.Pointer)>>('CFStreamCreatePairWithSocket'); + late final _CFStreamCreatePairWithSocket = + _CFStreamCreatePairWithSocketPtr.asFunction< + void Function(CFAllocatorRef, int, ffi.Pointer, + ffi.Pointer)>(); - CFTreeRef CFTreeGetParent( - CFTreeRef tree, + void CFStreamCreatePairWithSocketToHost( + CFAllocatorRef alloc, + CFStringRef host, + int port, + ffi.Pointer readStream, + ffi.Pointer writeStream, ) { - return _CFTreeGetParent( - tree, + return _CFStreamCreatePairWithSocketToHost( + alloc, + host, + port, + readStream, + writeStream, ); } - late final _CFTreeGetParentPtr = - _lookup>( - 'CFTreeGetParent'); - late final _CFTreeGetParent = - _CFTreeGetParentPtr.asFunction(); + 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)>(); - CFTreeRef CFTreeGetNextSibling( - CFTreeRef tree, + void CFStreamCreatePairWithPeerSocketSignature( + CFAllocatorRef alloc, + ffi.Pointer signature, + ffi.Pointer readStream, + ffi.Pointer writeStream, ) { - return _CFTreeGetNextSibling( - tree, + return _CFStreamCreatePairWithPeerSocketSignature( + alloc, + signature, + readStream, + writeStream, ); } - late final _CFTreeGetNextSiblingPtr = - _lookup>( - 'CFTreeGetNextSibling'); - late final _CFTreeGetNextSibling = - _CFTreeGetNextSiblingPtr.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)>(); - CFTreeRef CFTreeGetFirstChild( - CFTreeRef tree, + int CFReadStreamGetStatus( + CFReadStreamRef stream, ) { - return _CFTreeGetFirstChild( - tree, + return _CFReadStreamGetStatus( + stream, ); } - late final _CFTreeGetFirstChildPtr = - _lookup>( - 'CFTreeGetFirstChild'); - late final _CFTreeGetFirstChild = - _CFTreeGetFirstChildPtr.asFunction(); + late final _CFReadStreamGetStatusPtr = + _lookup>( + 'CFReadStreamGetStatus'); + late final _CFReadStreamGetStatus = + _CFReadStreamGetStatusPtr.asFunction(); - void CFTreeGetContext( - CFTreeRef tree, - ffi.Pointer context, + int CFWriteStreamGetStatus( + CFWriteStreamRef stream, ) { - return _CFTreeGetContext( - tree, - context, + return _CFWriteStreamGetStatus( + 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 _CFWriteStreamGetStatusPtr = + _lookup>( + 'CFWriteStreamGetStatus'); + late final _CFWriteStreamGetStatus = + _CFWriteStreamGetStatusPtr.asFunction(); - int CFTreeGetChildCount( - CFTreeRef tree, + CFErrorRef CFReadStreamCopyError( + CFReadStreamRef stream, ) { - return _CFTreeGetChildCount( - tree, + return _CFReadStreamCopyError( + stream, ); } - late final _CFTreeGetChildCountPtr = - _lookup>( - 'CFTreeGetChildCount'); - late final _CFTreeGetChildCount = - _CFTreeGetChildCountPtr.asFunction(); + late final _CFReadStreamCopyErrorPtr = + _lookup>( + 'CFReadStreamCopyError'); + late final _CFReadStreamCopyError = _CFReadStreamCopyErrorPtr.asFunction< + CFErrorRef Function(CFReadStreamRef)>(); - CFTreeRef CFTreeGetChildAtIndex( - CFTreeRef tree, - int idx, + CFErrorRef CFWriteStreamCopyError( + CFWriteStreamRef stream, ) { - return _CFTreeGetChildAtIndex( - tree, - idx, + return _CFWriteStreamCopyError( + stream, ); } - late final _CFTreeGetChildAtIndexPtr = - _lookup>( - 'CFTreeGetChildAtIndex'); - late final _CFTreeGetChildAtIndex = _CFTreeGetChildAtIndexPtr.asFunction< - CFTreeRef Function(CFTreeRef, int)>(); + late final _CFWriteStreamCopyErrorPtr = + _lookup>( + 'CFWriteStreamCopyError'); + late final _CFWriteStreamCopyError = _CFWriteStreamCopyErrorPtr.asFunction< + CFErrorRef Function(CFWriteStreamRef)>(); - void CFTreeGetChildren( - CFTreeRef tree, - ffi.Pointer children, + int CFReadStreamOpen( + CFReadStreamRef stream, ) { - return _CFTreeGetChildren( - tree, - children, + return _CFReadStreamOpen( + stream, ); } - 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 _CFReadStreamOpenPtr = + _lookup>( + 'CFReadStreamOpen'); + late final _CFReadStreamOpen = + _CFReadStreamOpenPtr.asFunction(); - void CFTreeApplyFunctionToChildren( - CFTreeRef tree, - CFTreeApplierFunction applier, - ffi.Pointer context, + int CFWriteStreamOpen( + CFWriteStreamRef stream, ) { - return _CFTreeApplyFunctionToChildren( - tree, - applier, - context, + return _CFWriteStreamOpen( + stream, ); } - 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 _CFWriteStreamOpenPtr = + _lookup>( + 'CFWriteStreamOpen'); + late final _CFWriteStreamOpen = + _CFWriteStreamOpenPtr.asFunction(); - CFTreeRef CFTreeFindRoot( - CFTreeRef tree, + void CFReadStreamClose( + CFReadStreamRef stream, ) { - return _CFTreeFindRoot( - tree, + return _CFReadStreamClose( + stream, ); } - late final _CFTreeFindRootPtr = - _lookup>( - 'CFTreeFindRoot'); - late final _CFTreeFindRoot = - _CFTreeFindRootPtr.asFunction(); + late final _CFReadStreamClosePtr = + _lookup>( + 'CFReadStreamClose'); + late final _CFReadStreamClose = + _CFReadStreamClosePtr.asFunction(); - void CFTreeSetContext( - CFTreeRef tree, - ffi.Pointer context, + void CFWriteStreamClose( + CFWriteStreamRef stream, ) { - return _CFTreeSetContext( - tree, - context, + return _CFWriteStreamClose( + stream, ); } - 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 _CFWriteStreamClosePtr = + _lookup>( + 'CFWriteStreamClose'); + late final _CFWriteStreamClose = + _CFWriteStreamClosePtr.asFunction(); - void CFTreePrependChild( - CFTreeRef tree, - CFTreeRef newChild, + int CFReadStreamHasBytesAvailable( + CFReadStreamRef stream, ) { - return _CFTreePrependChild( - tree, - newChild, + return _CFReadStreamHasBytesAvailable( + stream, ); } - late final _CFTreePrependChildPtr = - _lookup>( - 'CFTreePrependChild'); - late final _CFTreePrependChild = - _CFTreePrependChildPtr.asFunction(); + late final _CFReadStreamHasBytesAvailablePtr = + _lookup>( + 'CFReadStreamHasBytesAvailable'); + late final _CFReadStreamHasBytesAvailable = _CFReadStreamHasBytesAvailablePtr + .asFunction(); - void CFTreeAppendChild( - CFTreeRef tree, - CFTreeRef newChild, + int CFReadStreamRead( + CFReadStreamRef stream, + ffi.Pointer buffer, + int bufferLength, ) { - return _CFTreeAppendChild( - tree, - newChild, + return _CFReadStreamRead( + stream, + buffer, + bufferLength, ); } - late final _CFTreeAppendChildPtr = - _lookup>( - 'CFTreeAppendChild'); - late final _CFTreeAppendChild = - _CFTreeAppendChildPtr.asFunction(); + late final _CFReadStreamReadPtr = _lookup< + ffi.NativeFunction< + CFIndex Function(CFReadStreamRef, ffi.Pointer, + CFIndex)>>('CFReadStreamRead'); + late final _CFReadStreamRead = _CFReadStreamReadPtr.asFunction< + int Function(CFReadStreamRef, ffi.Pointer, int)>(); - void CFTreeInsertSibling( - CFTreeRef tree, - CFTreeRef newSibling, + ffi.Pointer CFReadStreamGetBuffer( + CFReadStreamRef stream, + int maxBytesToRead, + ffi.Pointer numBytesRead, ) { - return _CFTreeInsertSibling( - tree, - newSibling, + return _CFReadStreamGetBuffer( + stream, + maxBytesToRead, + numBytesRead, ); } - late final _CFTreeInsertSiblingPtr = - _lookup>( - 'CFTreeInsertSibling'); - late final _CFTreeInsertSibling = - _CFTreeInsertSiblingPtr.asFunction(); + 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)>(); - void CFTreeRemove( - CFTreeRef tree, + int CFWriteStreamCanAcceptBytes( + CFWriteStreamRef stream, ) { - return _CFTreeRemove( - tree, + return _CFWriteStreamCanAcceptBytes( + stream, ); } - late final _CFTreeRemovePtr = - _lookup>('CFTreeRemove'); - late final _CFTreeRemove = - _CFTreeRemovePtr.asFunction(); + late final _CFWriteStreamCanAcceptBytesPtr = + _lookup>( + 'CFWriteStreamCanAcceptBytes'); + late final _CFWriteStreamCanAcceptBytes = _CFWriteStreamCanAcceptBytesPtr + .asFunction(); - void CFTreeRemoveAllChildren( - CFTreeRef tree, + int CFWriteStreamWrite( + CFWriteStreamRef stream, + ffi.Pointer buffer, + int bufferLength, ) { - return _CFTreeRemoveAllChildren( - tree, + return _CFWriteStreamWrite( + stream, + buffer, + bufferLength, ); } - late final _CFTreeRemoveAllChildrenPtr = - _lookup>( - 'CFTreeRemoveAllChildren'); - late final _CFTreeRemoveAllChildren = - _CFTreeRemoveAllChildrenPtr.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)>(); - void CFTreeSortChildren( - CFTreeRef tree, - CFComparatorFunction comparator, - ffi.Pointer context, + CFTypeRef CFReadStreamCopyProperty( + CFReadStreamRef stream, + CFStreamPropertyKey propertyName, ) { - return _CFTreeSortChildren( - tree, - comparator, - context, + return _CFReadStreamCopyProperty( + stream, + propertyName, ); } - late final _CFTreeSortChildrenPtr = _lookup< + late final _CFReadStreamCopyPropertyPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFTreeRef, CFComparatorFunction, - ffi.Pointer)>>('CFTreeSortChildren'); - late final _CFTreeSortChildren = _CFTreeSortChildrenPtr.asFunction< - void Function(CFTreeRef, CFComparatorFunction, ffi.Pointer)>(); + CFTypeRef Function(CFReadStreamRef, + CFStreamPropertyKey)>>('CFReadStreamCopyProperty'); + late final _CFReadStreamCopyProperty = _CFReadStreamCopyPropertyPtr + .asFunction(); - int CFURLCreateDataAndPropertiesFromResource( - CFAllocatorRef alloc, - CFURLRef url, - ffi.Pointer resourceData, - ffi.Pointer properties, - CFArrayRef desiredProperties, - ffi.Pointer errorCode, + CFTypeRef CFWriteStreamCopyProperty( + CFWriteStreamRef stream, + CFStreamPropertyKey propertyName, ) { - return _CFURLCreateDataAndPropertiesFromResource( - alloc, - url, - resourceData, - properties, - desiredProperties, - errorCode, + return _CFWriteStreamCopyProperty( + stream, + propertyName, ); } - 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 _CFWriteStreamCopyPropertyPtr = _lookup< + ffi.NativeFunction< + CFTypeRef Function(CFWriteStreamRef, + CFStreamPropertyKey)>>('CFWriteStreamCopyProperty'); + late final _CFWriteStreamCopyProperty = _CFWriteStreamCopyPropertyPtr + .asFunction(); - int CFURLWriteDataAndPropertiesToResource( - CFURLRef url, - CFDataRef dataToWrite, - CFDictionaryRef propertiesToWrite, - ffi.Pointer errorCode, + int CFReadStreamSetProperty( + CFReadStreamRef stream, + CFStreamPropertyKey propertyName, + CFTypeRef propertyValue, ) { - return _CFURLWriteDataAndPropertiesToResource( - url, - dataToWrite, - propertiesToWrite, - errorCode, + return _CFReadStreamSetProperty( + stream, + propertyName, + propertyValue, ); } - late final _CFURLWriteDataAndPropertiesToResourcePtr = _lookup< + late final _CFReadStreamSetPropertyPtr = _lookup< ffi.NativeFunction< - Boolean Function(CFURLRef, CFDataRef, CFDictionaryRef, - ffi.Pointer)>>('CFURLWriteDataAndPropertiesToResource'); - late final _CFURLWriteDataAndPropertiesToResource = - _CFURLWriteDataAndPropertiesToResourcePtr.asFunction< - int Function( - CFURLRef, CFDataRef, CFDictionaryRef, ffi.Pointer)>(); + Boolean Function(CFReadStreamRef, CFStreamPropertyKey, + CFTypeRef)>>('CFReadStreamSetProperty'); + late final _CFReadStreamSetProperty = _CFReadStreamSetPropertyPtr.asFunction< + int Function(CFReadStreamRef, CFStreamPropertyKey, CFTypeRef)>(); - int CFURLDestroyResource( - CFURLRef url, - ffi.Pointer errorCode, + int CFWriteStreamSetProperty( + CFWriteStreamRef stream, + CFStreamPropertyKey propertyName, + CFTypeRef propertyValue, ) { - return _CFURLDestroyResource( - url, - errorCode, + return _CFWriteStreamSetProperty( + stream, + propertyName, + propertyValue, ); } - late final _CFURLDestroyResourcePtr = _lookup< - ffi.NativeFunction)>>( - 'CFURLDestroyResource'); - late final _CFURLDestroyResource = _CFURLDestroyResourcePtr.asFunction< - int Function(CFURLRef, ffi.Pointer)>(); + late final _CFWriteStreamSetPropertyPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFWriteStreamRef, CFStreamPropertyKey, + CFTypeRef)>>('CFWriteStreamSetProperty'); + late final _CFWriteStreamSetProperty = + _CFWriteStreamSetPropertyPtr.asFunction< + int Function(CFWriteStreamRef, CFStreamPropertyKey, CFTypeRef)>(); - CFTypeRef CFURLCreatePropertyFromResource( - CFAllocatorRef alloc, - CFURLRef url, - CFStringRef property, - ffi.Pointer errorCode, + int CFReadStreamSetClient( + CFReadStreamRef stream, + int streamEvents, + CFReadStreamClientCallBack clientCB, + ffi.Pointer clientContext, ) { - return _CFURLCreatePropertyFromResource( - alloc, - url, - property, - errorCode, + return _CFReadStreamSetClient( + stream, + streamEvents, + clientCB, + clientContext, ); } - late final _CFURLCreatePropertyFromResourcePtr = _lookup< + late final _CFReadStreamSetClientPtr = _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; + Boolean Function( + CFReadStreamRef, + CFOptionFlags, + CFReadStreamClientCallBack, + ffi.Pointer)>>('CFReadStreamSetClient'); + late final _CFReadStreamSetClient = _CFReadStreamSetClientPtr.asFunction< + int Function(CFReadStreamRef, int, CFReadStreamClientCallBack, + ffi.Pointer)>(); - late final ffi.Pointer _kCFURLFileLength = - _lookup('kCFURLFileLength'); + int CFWriteStreamSetClient( + CFWriteStreamRef stream, + int streamEvents, + CFWriteStreamClientCallBack clientCB, + ffi.Pointer clientContext, + ) { + return _CFWriteStreamSetClient( + stream, + streamEvents, + clientCB, + clientContext, + ); + } - CFStringRef get kCFURLFileLength => _kCFURLFileLength.value; + 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)>(); - set kCFURLFileLength(CFStringRef value) => _kCFURLFileLength.value = value; + void CFReadStreamScheduleWithRunLoop( + CFReadStreamRef stream, + CFRunLoopRef runLoop, + CFRunLoopMode runLoopMode, + ) { + return _CFReadStreamScheduleWithRunLoop( + stream, + runLoop, + runLoopMode, + ); + } - late final ffi.Pointer _kCFURLFileLastModificationTime = - _lookup('kCFURLFileLastModificationTime'); + late final _CFReadStreamScheduleWithRunLoopPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFReadStreamRef, CFRunLoopRef, + CFRunLoopMode)>>('CFReadStreamScheduleWithRunLoop'); + late final _CFReadStreamScheduleWithRunLoop = + _CFReadStreamScheduleWithRunLoopPtr.asFunction< + void Function(CFReadStreamRef, CFRunLoopRef, CFRunLoopMode)>(); - CFStringRef get kCFURLFileLastModificationTime => - _kCFURLFileLastModificationTime.value; + void CFWriteStreamScheduleWithRunLoop( + CFWriteStreamRef stream, + CFRunLoopRef runLoop, + CFRunLoopMode runLoopMode, + ) { + return _CFWriteStreamScheduleWithRunLoop( + stream, + runLoop, + runLoopMode, + ); + } - set kCFURLFileLastModificationTime(CFStringRef value) => - _kCFURLFileLastModificationTime.value = value; + late final _CFWriteStreamScheduleWithRunLoopPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFWriteStreamRef, CFRunLoopRef, + CFRunLoopMode)>>('CFWriteStreamScheduleWithRunLoop'); + late final _CFWriteStreamScheduleWithRunLoop = + _CFWriteStreamScheduleWithRunLoopPtr.asFunction< + void Function(CFWriteStreamRef, CFRunLoopRef, CFRunLoopMode)>(); - late final ffi.Pointer _kCFURLFilePOSIXMode = - _lookup('kCFURLFilePOSIXMode'); + void CFReadStreamUnscheduleFromRunLoop( + CFReadStreamRef stream, + CFRunLoopRef runLoop, + CFRunLoopMode runLoopMode, + ) { + return _CFReadStreamUnscheduleFromRunLoop( + stream, + runLoop, + runLoopMode, + ); + } - CFStringRef get kCFURLFilePOSIXMode => _kCFURLFilePOSIXMode.value; + late final _CFReadStreamUnscheduleFromRunLoopPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFReadStreamRef, CFRunLoopRef, + CFRunLoopMode)>>('CFReadStreamUnscheduleFromRunLoop'); + late final _CFReadStreamUnscheduleFromRunLoop = + _CFReadStreamUnscheduleFromRunLoopPtr.asFunction< + void Function(CFReadStreamRef, CFRunLoopRef, CFRunLoopMode)>(); - set kCFURLFilePOSIXMode(CFStringRef value) => - _kCFURLFilePOSIXMode.value = value; + void CFWriteStreamUnscheduleFromRunLoop( + CFWriteStreamRef stream, + CFRunLoopRef runLoop, + CFRunLoopMode runLoopMode, + ) { + return _CFWriteStreamUnscheduleFromRunLoop( + stream, + runLoop, + runLoopMode, + ); + } - late final ffi.Pointer _kCFURLFileOwnerID = - _lookup('kCFURLFileOwnerID'); + late final _CFWriteStreamUnscheduleFromRunLoopPtr = _lookup< + ffi.NativeFunction< + 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)>(); - - 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, + 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 _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; + 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)>(); - set kCFBundleVersionKey(CFStringRef value) => - _kCFBundleVersionKey.value = 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, + ); + } - late final ffi.Pointer _kCFBundleDevelopmentRegionKey = - _lookup('kCFBundleDevelopmentRegionKey'); + 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)>(); - CFStringRef get kCFBundleDevelopmentRegionKey => - _kCFBundleDevelopmentRegionKey.value; + int CFPropertyListWrite( + CFPropertyListRef propertyList, + CFWriteStreamRef stream, + int format, + int options, + ffi.Pointer error, + ) { + return _CFPropertyListWrite( + propertyList, + stream, + format, + options, + error, + ); + } - set kCFBundleDevelopmentRegionKey(CFStringRef value) => - _kCFBundleDevelopmentRegionKey.value = value; + 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 ffi.Pointer _kCFBundleNameKey = - _lookup('kCFBundleNameKey'); + CFDataRef CFPropertyListCreateData( + CFAllocatorRef allocator, + CFPropertyListRef propertyList, + int format, + int options, + ffi.Pointer error, + ) { + return _CFPropertyListCreateData( + allocator, + propertyList, + format, + options, + error, + ); + } - CFStringRef get kCFBundleNameKey => _kCFBundleNameKey.value; + 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)>(); - set kCFBundleNameKey(CFStringRef value) => _kCFBundleNameKey.value = value; + late final ffi.Pointer _kCFTypeSetCallBacks = + _lookup('kCFTypeSetCallBacks'); - late final ffi.Pointer _kCFBundleLocalizationsKey = - _lookup('kCFBundleLocalizationsKey'); + CFSetCallBacks get kCFTypeSetCallBacks => _kCFTypeSetCallBacks.ref; - CFStringRef get kCFBundleLocalizationsKey => _kCFBundleLocalizationsKey.value; + late final ffi.Pointer _kCFCopyStringSetCallBacks = + _lookup('kCFCopyStringSetCallBacks'); - set kCFBundleLocalizationsKey(CFStringRef value) => - _kCFBundleLocalizationsKey.value = value; + CFSetCallBacks get kCFCopyStringSetCallBacks => + _kCFCopyStringSetCallBacks.ref; - CFBundleRef CFBundleGetMainBundle() { - return _CFBundleGetMainBundle(); + int CFSetGetTypeID() { + return _CFSetGetTypeID(); } - late final _CFBundleGetMainBundlePtr = - _lookup>( - 'CFBundleGetMainBundle'); - late final _CFBundleGetMainBundle = - _CFBundleGetMainBundlePtr.asFunction(); + late final _CFSetGetTypeIDPtr = + _lookup>('CFSetGetTypeID'); + late final _CFSetGetTypeID = _CFSetGetTypeIDPtr.asFunction(); - CFBundleRef CFBundleGetBundleWithIdentifier( - CFStringRef bundleID, + CFSetRef CFSetCreate( + CFAllocatorRef allocator, + ffi.Pointer> values, + int numValues, + ffi.Pointer callBacks, ) { - return _CFBundleGetBundleWithIdentifier( - bundleID, + return _CFSetCreate( + allocator, + values, + numValues, + callBacks, ); } - 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(); + 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)>(); - CFBundleRef CFBundleCreate( + CFSetRef CFSetCreateCopy( CFAllocatorRef allocator, - CFURLRef bundleURL, + CFSetRef theSet, ) { - return _CFBundleCreate( + return _CFSetCreateCopy( allocator, - bundleURL, + theSet, ); } - late final _CFBundleCreatePtr = _lookup< - ffi.NativeFunction>( - 'CFBundleCreate'); - late final _CFBundleCreate = _CFBundleCreatePtr.asFunction< - CFBundleRef Function(CFAllocatorRef, CFURLRef)>(); + late final _CFSetCreateCopyPtr = + _lookup>( + 'CFSetCreateCopy'); + late final _CFSetCreateCopy = _CFSetCreateCopyPtr.asFunction< + CFSetRef Function(CFAllocatorRef, CFSetRef)>(); - CFArrayRef CFBundleCreateBundlesFromDirectory( + CFMutableSetRef CFSetCreateMutable( CFAllocatorRef allocator, - CFURLRef directoryURL, - CFStringRef bundleType, + int capacity, + ffi.Pointer callBacks, ) { - return _CFBundleCreateBundlesFromDirectory( + return _CFSetCreateMutable( allocator, - directoryURL, - bundleType, + capacity, + callBacks, ); } - late final _CFBundleCreateBundlesFromDirectoryPtr = _lookup< + late final _CFSetCreateMutablePtr = _lookup< ffi.NativeFunction< - CFArrayRef Function(CFAllocatorRef, CFURLRef, - CFStringRef)>>('CFBundleCreateBundlesFromDirectory'); - late final _CFBundleCreateBundlesFromDirectory = - _CFBundleCreateBundlesFromDirectoryPtr.asFunction< - CFArrayRef Function(CFAllocatorRef, CFURLRef, CFStringRef)>(); + CFMutableSetRef Function(CFAllocatorRef, CFIndex, + ffi.Pointer)>>('CFSetCreateMutable'); + late final _CFSetCreateMutable = _CFSetCreateMutablePtr.asFunction< + CFMutableSetRef Function( + CFAllocatorRef, int, ffi.Pointer)>(); - CFURLRef CFBundleCopyBundleURL( - CFBundleRef bundle, + CFMutableSetRef CFSetCreateMutableCopy( + CFAllocatorRef allocator, + int capacity, + CFSetRef theSet, ) { - return _CFBundleCopyBundleURL( - bundle, + return _CFSetCreateMutableCopy( + allocator, + capacity, + theSet, ); } - late final _CFBundleCopyBundleURLPtr = - _lookup>( - 'CFBundleCopyBundleURL'); - late final _CFBundleCopyBundleURL = - _CFBundleCopyBundleURLPtr.asFunction(); + late final _CFSetCreateMutableCopyPtr = _lookup< + ffi.NativeFunction< + CFMutableSetRef Function( + CFAllocatorRef, CFIndex, CFSetRef)>>('CFSetCreateMutableCopy'); + late final _CFSetCreateMutableCopy = _CFSetCreateMutableCopyPtr.asFunction< + CFMutableSetRef Function(CFAllocatorRef, int, CFSetRef)>(); - CFTypeRef CFBundleGetValueForInfoDictionaryKey( - CFBundleRef bundle, - CFStringRef key, + int CFSetGetCount( + CFSetRef theSet, ) { - return _CFBundleGetValueForInfoDictionaryKey( - bundle, - key, + return _CFSetGetCount( + theSet, ); } - late final _CFBundleGetValueForInfoDictionaryKeyPtr = - _lookup>( - 'CFBundleGetValueForInfoDictionaryKey'); - late final _CFBundleGetValueForInfoDictionaryKey = - _CFBundleGetValueForInfoDictionaryKeyPtr.asFunction< - CFTypeRef Function(CFBundleRef, CFStringRef)>(); + late final _CFSetGetCountPtr = + _lookup>('CFSetGetCount'); + late final _CFSetGetCount = + _CFSetGetCountPtr.asFunction(); - CFDictionaryRef CFBundleGetInfoDictionary( - CFBundleRef bundle, + int CFSetGetCountOfValue( + CFSetRef theSet, + ffi.Pointer value, ) { - return _CFBundleGetInfoDictionary( - bundle, + return _CFSetGetCountOfValue( + theSet, + value, ); } - late final _CFBundleGetInfoDictionaryPtr = - _lookup>( - 'CFBundleGetInfoDictionary'); - late final _CFBundleGetInfoDictionary = _CFBundleGetInfoDictionaryPtr - .asFunction(); + late final _CFSetGetCountOfValuePtr = _lookup< + ffi + .NativeFunction)>>( + 'CFSetGetCountOfValue'); + late final _CFSetGetCountOfValue = _CFSetGetCountOfValuePtr.asFunction< + int Function(CFSetRef, ffi.Pointer)>(); - CFDictionaryRef CFBundleGetLocalInfoDictionary( - CFBundleRef bundle, + int CFSetContainsValue( + CFSetRef theSet, + ffi.Pointer value, ) { - return _CFBundleGetLocalInfoDictionary( - bundle, + return _CFSetContainsValue( + theSet, + value, ); } - late final _CFBundleGetLocalInfoDictionaryPtr = - _lookup>( - 'CFBundleGetLocalInfoDictionary'); - late final _CFBundleGetLocalInfoDictionary = - _CFBundleGetLocalInfoDictionaryPtr.asFunction< - CFDictionaryRef Function(CFBundleRef)>(); + late final _CFSetContainsValuePtr = _lookup< + ffi + .NativeFunction)>>( + 'CFSetContainsValue'); + late final _CFSetContainsValue = _CFSetContainsValuePtr.asFunction< + int Function(CFSetRef, ffi.Pointer)>(); - void CFBundleGetPackageInfo( - CFBundleRef bundle, - ffi.Pointer packageType, - ffi.Pointer packageCreator, + ffi.Pointer CFSetGetValue( + CFSetRef theSet, + ffi.Pointer value, ) { - return _CFBundleGetPackageInfo( - bundle, - packageType, - packageCreator, + return _CFSetGetValue( + theSet, + value, ); } - late final _CFBundleGetPackageInfoPtr = _lookup< + late final _CFSetGetValuePtr = _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, + 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 _CFBundleGetIdentifier( - bundle, + return _CFSetGetValueIfPresent( + theSet, + candidate, + value, ); } - late final _CFBundleGetIdentifierPtr = - _lookup>( - 'CFBundleGetIdentifier'); - late final _CFBundleGetIdentifier = - _CFBundleGetIdentifierPtr.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>)>(); - int CFBundleGetVersionNumber( - CFBundleRef bundle, + void CFSetGetValues( + CFSetRef theSet, + ffi.Pointer> values, ) { - return _CFBundleGetVersionNumber( - bundle, + return _CFSetGetValues( + theSet, + values, ); } - late final _CFBundleGetVersionNumberPtr = - _lookup>( - 'CFBundleGetVersionNumber'); - late final _CFBundleGetVersionNumber = - _CFBundleGetVersionNumberPtr.asFunction(); + late final _CFSetGetValuesPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFSetRef, ffi.Pointer>)>>('CFSetGetValues'); + late final _CFSetGetValues = _CFSetGetValuesPtr.asFunction< + void Function(CFSetRef, ffi.Pointer>)>(); - CFStringRef CFBundleGetDevelopmentRegion( - CFBundleRef bundle, + void CFSetApplyFunction( + CFSetRef theSet, + CFSetApplierFunction applier, + ffi.Pointer context, ) { - return _CFBundleGetDevelopmentRegion( - bundle, + return _CFSetApplyFunction( + theSet, + applier, + context, ); } - late final _CFBundleGetDevelopmentRegionPtr = - _lookup>( - 'CFBundleGetDevelopmentRegion'); - late final _CFBundleGetDevelopmentRegion = _CFBundleGetDevelopmentRegionPtr - .asFunction(); + 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 CFBundleCopySupportFilesDirectoryURL( - CFBundleRef bundle, + void CFSetAddValue( + CFMutableSetRef theSet, + ffi.Pointer value, ) { - return _CFBundleCopySupportFilesDirectoryURL( - bundle, + return _CFSetAddValue( + theSet, + value, ); } - late final _CFBundleCopySupportFilesDirectoryURLPtr = - _lookup>( - 'CFBundleCopySupportFilesDirectoryURL'); - late final _CFBundleCopySupportFilesDirectoryURL = - _CFBundleCopySupportFilesDirectoryURLPtr.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 CFBundleCopyResourcesDirectoryURL( - CFBundleRef bundle, + void CFSetReplaceValue( + CFMutableSetRef theSet, + ffi.Pointer value, ) { - return _CFBundleCopyResourcesDirectoryURL( - bundle, + return _CFSetReplaceValue( + theSet, + value, ); } - late final _CFBundleCopyResourcesDirectoryURLPtr = - _lookup>( - 'CFBundleCopyResourcesDirectoryURL'); - late final _CFBundleCopyResourcesDirectoryURL = - _CFBundleCopyResourcesDirectoryURLPtr.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 CFBundleCopyPrivateFrameworksURL( - CFBundleRef bundle, + void CFSetSetValue( + CFMutableSetRef theSet, + ffi.Pointer value, ) { - return _CFBundleCopyPrivateFrameworksURL( - bundle, + return _CFSetSetValue( + theSet, + value, ); } - late final _CFBundleCopyPrivateFrameworksURLPtr = - _lookup>( - 'CFBundleCopyPrivateFrameworksURL'); - late final _CFBundleCopyPrivateFrameworksURL = - _CFBundleCopyPrivateFrameworksURLPtr.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 CFBundleCopySharedFrameworksURL( - CFBundleRef bundle, + void CFSetRemoveValue( + CFMutableSetRef theSet, + ffi.Pointer value, ) { - return _CFBundleCopySharedFrameworksURL( - bundle, + return _CFSetRemoveValue( + theSet, + value, ); } - late final _CFBundleCopySharedFrameworksURLPtr = - _lookup>( - 'CFBundleCopySharedFrameworksURL'); - late final _CFBundleCopySharedFrameworksURL = - _CFBundleCopySharedFrameworksURLPtr.asFunction< - CFURLRef Function(CFBundleRef)>(); + late final _CFSetRemoveValuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMutableSetRef, ffi.Pointer)>>('CFSetRemoveValue'); + late final _CFSetRemoveValue = _CFSetRemoveValuePtr.asFunction< + void Function(CFMutableSetRef, ffi.Pointer)>(); - CFURLRef CFBundleCopySharedSupportURL( - CFBundleRef bundle, + void CFSetRemoveAllValues( + CFMutableSetRef theSet, ) { - return _CFBundleCopySharedSupportURL( - bundle, + return _CFSetRemoveAllValues( + theSet, ); } - late final _CFBundleCopySharedSupportURLPtr = - _lookup>( - 'CFBundleCopySharedSupportURL'); - late final _CFBundleCopySharedSupportURL = _CFBundleCopySharedSupportURLPtr - .asFunction(); + late final _CFSetRemoveAllValuesPtr = + _lookup>( + 'CFSetRemoveAllValues'); + late final _CFSetRemoveAllValues = + _CFSetRemoveAllValuesPtr.asFunction(); - CFURLRef CFBundleCopyBuiltInPlugInsURL( - CFBundleRef bundle, - ) { - return _CFBundleCopyBuiltInPlugInsURL( - bundle, - ); + int CFTreeGetTypeID() { + return _CFTreeGetTypeID(); } - late final _CFBundleCopyBuiltInPlugInsURLPtr = - _lookup>( - 'CFBundleCopyBuiltInPlugInsURL'); - late final _CFBundleCopyBuiltInPlugInsURL = _CFBundleCopyBuiltInPlugInsURLPtr - .asFunction(); + late final _CFTreeGetTypeIDPtr = + _lookup>('CFTreeGetTypeID'); + late final _CFTreeGetTypeID = + _CFTreeGetTypeIDPtr.asFunction(); - CFDictionaryRef CFBundleCopyInfoDictionaryInDirectory( - CFURLRef bundleURL, + CFTreeRef CFTreeCreate( + CFAllocatorRef allocator, + ffi.Pointer context, ) { - return _CFBundleCopyInfoDictionaryInDirectory( - bundleURL, + return _CFTreeCreate( + allocator, + context, ); } - late final _CFBundleCopyInfoDictionaryInDirectoryPtr = - _lookup>( - 'CFBundleCopyInfoDictionaryInDirectory'); - late final _CFBundleCopyInfoDictionaryInDirectory = - _CFBundleCopyInfoDictionaryInDirectoryPtr.asFunction< - CFDictionaryRef 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 CFBundleGetPackageInfoInDirectory( - CFURLRef url, - ffi.Pointer packageType, - ffi.Pointer packageCreator, + CFTreeRef CFTreeGetParent( + CFTreeRef tree, ) { - return _CFBundleGetPackageInfoInDirectory( - url, - packageType, - packageCreator, + return _CFTreeGetParent( + tree, ); } - 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 _CFTreeGetParentPtr = + _lookup>( + 'CFTreeGetParent'); + late final _CFTreeGetParent = + _CFTreeGetParentPtr.asFunction(); - CFURLRef CFBundleCopyResourceURL( - CFBundleRef bundle, - CFStringRef resourceName, - CFStringRef resourceType, - CFStringRef subDirName, + CFTreeRef CFTreeGetNextSibling( + CFTreeRef tree, ) { - return _CFBundleCopyResourceURL( - bundle, - resourceName, - resourceType, - subDirName, + return _CFTreeGetNextSibling( + 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 _CFTreeGetNextSiblingPtr = + _lookup>( + 'CFTreeGetNextSibling'); + late final _CFTreeGetNextSibling = + _CFTreeGetNextSiblingPtr.asFunction(); - CFArrayRef CFBundleCopyResourceURLsOfType( - CFBundleRef bundle, - CFStringRef resourceType, - CFStringRef subDirName, + CFTreeRef CFTreeGetFirstChild( + CFTreeRef tree, ) { - return _CFBundleCopyResourceURLsOfType( - bundle, - resourceType, - subDirName, + return _CFTreeGetFirstChild( + 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 _CFTreeGetFirstChildPtr = + _lookup>( + 'CFTreeGetFirstChild'); + late final _CFTreeGetFirstChild = + _CFTreeGetFirstChildPtr.asFunction(); - CFStringRef CFBundleCopyLocalizedString( - CFBundleRef bundle, - CFStringRef key, - CFStringRef value, - CFStringRef tableName, + void CFTreeGetContext( + CFTreeRef tree, + ffi.Pointer context, ) { - return _CFBundleCopyLocalizedString( - bundle, - key, - value, - tableName, + return _CFTreeGetContext( + tree, + context, ); } - late final _CFBundleCopyLocalizedStringPtr = _lookup< + late final _CFTreeGetContextPtr = _lookup< ffi.NativeFunction< - CFStringRef Function(CFBundleRef, CFStringRef, CFStringRef, - CFStringRef)>>('CFBundleCopyLocalizedString'); - late final _CFBundleCopyLocalizedString = - _CFBundleCopyLocalizedStringPtr.asFunction< - CFStringRef Function( - CFBundleRef, CFStringRef, CFStringRef, CFStringRef)>(); + ffi.Void Function( + CFTreeRef, ffi.Pointer)>>('CFTreeGetContext'); + late final _CFTreeGetContext = _CFTreeGetContextPtr.asFunction< + void Function(CFTreeRef, ffi.Pointer)>(); - CFURLRef CFBundleCopyResourceURLInDirectory( - CFURLRef bundleURL, - CFStringRef resourceName, - CFStringRef resourceType, - CFStringRef subDirName, + int CFTreeGetChildCount( + CFTreeRef tree, ) { - return _CFBundleCopyResourceURLInDirectory( - bundleURL, - resourceName, - resourceType, - subDirName, + return _CFTreeGetChildCount( + tree, ); } - late final _CFBundleCopyResourceURLInDirectoryPtr = _lookup< - ffi.NativeFunction< - CFURLRef Function(CFURLRef, CFStringRef, CFStringRef, - CFStringRef)>>('CFBundleCopyResourceURLInDirectory'); - late final _CFBundleCopyResourceURLInDirectory = - _CFBundleCopyResourceURLInDirectoryPtr.asFunction< - CFURLRef Function(CFURLRef, CFStringRef, CFStringRef, CFStringRef)>(); + late final _CFTreeGetChildCountPtr = + _lookup>( + 'CFTreeGetChildCount'); + late final _CFTreeGetChildCount = + _CFTreeGetChildCountPtr.asFunction(); - CFArrayRef CFBundleCopyResourceURLsOfTypeInDirectory( - CFURLRef bundleURL, - CFStringRef resourceType, - CFStringRef subDirName, + CFTreeRef CFTreeGetChildAtIndex( + CFTreeRef tree, + int idx, ) { - return _CFBundleCopyResourceURLsOfTypeInDirectory( - bundleURL, - resourceType, - subDirName, + return _CFTreeGetChildAtIndex( + tree, + idx, ); } - late final _CFBundleCopyResourceURLsOfTypeInDirectoryPtr = _lookup< - ffi.NativeFunction< - CFArrayRef Function(CFURLRef, CFStringRef, - CFStringRef)>>('CFBundleCopyResourceURLsOfTypeInDirectory'); - late final _CFBundleCopyResourceURLsOfTypeInDirectory = - _CFBundleCopyResourceURLsOfTypeInDirectoryPtr.asFunction< - CFArrayRef Function(CFURLRef, CFStringRef, CFStringRef)>(); + late final _CFTreeGetChildAtIndexPtr = + _lookup>( + 'CFTreeGetChildAtIndex'); + late final _CFTreeGetChildAtIndex = _CFTreeGetChildAtIndexPtr.asFunction< + CFTreeRef Function(CFTreeRef, int)>(); - CFArrayRef CFBundleCopyBundleLocalizations( - CFBundleRef bundle, + void CFTreeGetChildren( + CFTreeRef tree, + ffi.Pointer children, ) { - return _CFBundleCopyBundleLocalizations( - bundle, + return _CFTreeGetChildren( + tree, + children, ); } - late final _CFBundleCopyBundleLocalizationsPtr = - _lookup>( - 'CFBundleCopyBundleLocalizations'); - late final _CFBundleCopyBundleLocalizations = - _CFBundleCopyBundleLocalizationsPtr.asFunction< - CFArrayRef Function(CFBundleRef)>(); + late final _CFTreeGetChildrenPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFTreeRef, ffi.Pointer)>>('CFTreeGetChildren'); + late final _CFTreeGetChildren = _CFTreeGetChildrenPtr.asFunction< + void Function(CFTreeRef, ffi.Pointer)>(); - CFArrayRef CFBundleCopyPreferredLocalizationsFromArray( - CFArrayRef locArray, + void CFTreeApplyFunctionToChildren( + CFTreeRef tree, + CFTreeApplierFunction applier, + ffi.Pointer context, ) { - return _CFBundleCopyPreferredLocalizationsFromArray( - locArray, + return _CFTreeApplyFunctionToChildren( + tree, + applier, + context, ); } - late final _CFBundleCopyPreferredLocalizationsFromArrayPtr = - _lookup>( - 'CFBundleCopyPreferredLocalizationsFromArray'); - late final _CFBundleCopyPreferredLocalizationsFromArray = - _CFBundleCopyPreferredLocalizationsFromArrayPtr.asFunction< - CFArrayRef Function(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)>(); - CFArrayRef CFBundleCopyLocalizationsForPreferences( - CFArrayRef locArray, - CFArrayRef prefArray, + CFTreeRef CFTreeFindRoot( + CFTreeRef tree, ) { - return _CFBundleCopyLocalizationsForPreferences( - locArray, - prefArray, + return _CFTreeFindRoot( + tree, ); } - late final _CFBundleCopyLocalizationsForPreferencesPtr = - _lookup>( - 'CFBundleCopyLocalizationsForPreferences'); - late final _CFBundleCopyLocalizationsForPreferences = - _CFBundleCopyLocalizationsForPreferencesPtr.asFunction< - CFArrayRef Function(CFArrayRef, CFArrayRef)>(); + late final _CFTreeFindRootPtr = + _lookup>( + 'CFTreeFindRoot'); + late final _CFTreeFindRoot = + _CFTreeFindRootPtr.asFunction(); - CFURLRef CFBundleCopyResourceURLForLocalization( - CFBundleRef bundle, - CFStringRef resourceName, - CFStringRef resourceType, - CFStringRef subDirName, - CFStringRef localizationName, + void CFTreeSetContext( + CFTreeRef tree, + ffi.Pointer context, ) { - return _CFBundleCopyResourceURLForLocalization( - bundle, - resourceName, - resourceType, - subDirName, - localizationName, + return _CFTreeSetContext( + tree, + context, ); } - late final _CFBundleCopyResourceURLForLocalizationPtr = _lookup< + late final _CFTreeSetContextPtr = _lookup< ffi.NativeFunction< - CFURLRef Function(CFBundleRef, CFStringRef, CFStringRef, CFStringRef, - CFStringRef)>>('CFBundleCopyResourceURLForLocalization'); - late final _CFBundleCopyResourceURLForLocalization = - _CFBundleCopyResourceURLForLocalizationPtr.asFunction< - CFURLRef Function(CFBundleRef, CFStringRef, CFStringRef, CFStringRef, - CFStringRef)>(); + ffi.Void Function( + CFTreeRef, ffi.Pointer)>>('CFTreeSetContext'); + late final _CFTreeSetContext = _CFTreeSetContextPtr.asFunction< + void Function(CFTreeRef, ffi.Pointer)>(); - CFArrayRef CFBundleCopyResourceURLsOfTypeForLocalization( - CFBundleRef bundle, - CFStringRef resourceType, - CFStringRef subDirName, - CFStringRef localizationName, + void CFTreePrependChild( + CFTreeRef tree, + CFTreeRef newChild, ) { - return _CFBundleCopyResourceURLsOfTypeForLocalization( - bundle, - resourceType, - subDirName, - localizationName, + return _CFTreePrependChild( + tree, + newChild, ); } - late final _CFBundleCopyResourceURLsOfTypeForLocalizationPtr = _lookup< - ffi.NativeFunction< - CFArrayRef Function(CFBundleRef, CFStringRef, CFStringRef, - CFStringRef)>>('CFBundleCopyResourceURLsOfTypeForLocalization'); - late final _CFBundleCopyResourceURLsOfTypeForLocalization = - _CFBundleCopyResourceURLsOfTypeForLocalizationPtr.asFunction< - CFArrayRef Function( - CFBundleRef, CFStringRef, CFStringRef, CFStringRef)>(); + late final _CFTreePrependChildPtr = + _lookup>( + 'CFTreePrependChild'); + late final _CFTreePrependChild = + _CFTreePrependChildPtr.asFunction(); - CFDictionaryRef CFBundleCopyInfoDictionaryForURL( - CFURLRef url, + void CFTreeAppendChild( + CFTreeRef tree, + CFTreeRef newChild, ) { - return _CFBundleCopyInfoDictionaryForURL( - url, + return _CFTreeAppendChild( + tree, + newChild, ); } - 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)>(); + 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; + + 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 _CFBundleGetPlugInPtr = - _lookup>( - 'CFBundleGetPlugIn'); - late final _CFBundleGetPlugIn = - _CFBundleGetPlugInPtr.asFunction(); + late final _CFUUIDGetTypeIDPtr = + _lookup>('CFUUIDGetTypeID'); + late final _CFUUIDGetTypeID = + _CFUUIDGetTypeIDPtr.asFunction(); - int CFBundleOpenBundleResourceMap( - CFBundleRef bundle, + CFUUIDRef CFUUIDCreate( + CFAllocatorRef alloc, ) { - return _CFBundleOpenBundleResourceMap( - bundle, + return _CFUUIDCreate( + alloc, ); } - late final _CFBundleOpenBundleResourceMapPtr = - _lookup>( - 'CFBundleOpenBundleResourceMap'); - late final _CFBundleOpenBundleResourceMap = - _CFBundleOpenBundleResourceMapPtr.asFunction(); + late final _CFUUIDCreatePtr = + _lookup>( + 'CFUUIDCreate'); + late final _CFUUIDCreate = + _CFUUIDCreatePtr.asFunction(); - int CFBundleOpenBundleResourceFiles( - CFBundleRef bundle, - ffi.Pointer refNum, - ffi.Pointer localizedRefNum, + 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 _CFBundleOpenBundleResourceFiles( - bundle, - refNum, - localizedRefNum, + return _CFUUIDCreateWithBytes( + alloc, + byte0, + byte1, + byte2, + byte3, + byte4, + byte5, + byte6, + byte7, + byte8, + byte9, + byte10, + byte11, + byte12, + byte13, + byte14, + byte15, ); } - late final _CFBundleOpenBundleResourceFilesPtr = _lookup< + late final _CFUUIDCreateWithBytesPtr = _lookup< ffi.NativeFunction< - SInt32 Function(CFBundleRef, ffi.Pointer, - ffi.Pointer)>>('CFBundleOpenBundleResourceFiles'); - late final _CFBundleOpenBundleResourceFiles = - _CFBundleOpenBundleResourceFilesPtr.asFunction< - int Function(CFBundleRef, ffi.Pointer, - ffi.Pointer)>(); + 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)>(); - void CFBundleCloseBundleResourceMap( - CFBundleRef bundle, - int refNum, + CFUUIDRef CFUUIDCreateFromString( + CFAllocatorRef alloc, + CFStringRef uuidStr, ) { - return _CFBundleCloseBundleResourceMap( - bundle, - refNum, + return _CFUUIDCreateFromString( + alloc, + uuidStr, ); } - 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(); + late final _CFUUIDCreateFromStringPtr = _lookup< + ffi.NativeFunction>( + 'CFUUIDCreateFromString'); + late final _CFUUIDCreateFromString = _CFUUIDCreateFromStringPtr.asFunction< + CFUUIDRef Function(CFAllocatorRef, CFStringRef)>(); - CFMessagePortRef CFMessagePortCreateLocal( - CFAllocatorRef allocator, - CFStringRef name, - CFMessagePortCallBack callout, - ffi.Pointer context, - ffi.Pointer shouldFreeInfo, + CFStringRef CFUUIDCreateString( + CFAllocatorRef alloc, + CFUUIDRef uuid, ) { - return _CFMessagePortCreateLocal( - allocator, - name, - callout, - context, - shouldFreeInfo, + return _CFUUIDCreateString( + alloc, + uuid, ); } - 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 _CFUUIDCreateStringPtr = _lookup< + ffi.NativeFunction>( + 'CFUUIDCreateString'); + late final _CFUUIDCreateString = _CFUUIDCreateStringPtr.asFunction< + CFStringRef Function(CFAllocatorRef, CFUUIDRef)>(); - CFMessagePortRef CFMessagePortCreateRemote( - CFAllocatorRef allocator, - CFStringRef name, + 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 _CFMessagePortCreateRemote( - allocator, - name, + return _CFUUIDGetConstantUUIDWithBytes( + alloc, + byte0, + byte1, + byte2, + byte3, + byte4, + byte5, + byte6, + byte7, + byte8, + byte9, + byte10, + byte11, + byte12, + byte13, + byte14, + byte15, ); } - late final _CFMessagePortCreateRemotePtr = _lookup< + late final _CFUUIDGetConstantUUIDWithBytesPtr = _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)>>('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)>(); - CFStringRef CFMessagePortGetName( - CFMessagePortRef ms, + CFUUIDBytes CFUUIDGetUUIDBytes( + CFUUIDRef uuid, ) { - return _CFMessagePortGetName( - ms, + return _CFUUIDGetUUIDBytes( + uuid, ); } - late final _CFMessagePortGetNamePtr = - _lookup>( - 'CFMessagePortGetName'); - late final _CFMessagePortGetName = _CFMessagePortGetNamePtr.asFunction< - CFStringRef Function(CFMessagePortRef)>(); + late final _CFUUIDGetUUIDBytesPtr = + _lookup>( + 'CFUUIDGetUUIDBytes'); + late final _CFUUIDGetUUIDBytes = + _CFUUIDGetUUIDBytesPtr.asFunction(); - int CFMessagePortSetName( - CFMessagePortRef ms, - CFStringRef newName, + CFUUIDRef CFUUIDCreateFromUUIDBytes( + CFAllocatorRef alloc, + CFUUIDBytes bytes, ) { - return _CFMessagePortSetName( - ms, - newName, + return _CFUUIDCreateFromUUIDBytes( + alloc, + bytes, ); } - late final _CFMessagePortSetNamePtr = _lookup< - ffi.NativeFunction>( - 'CFMessagePortSetName'); - late final _CFMessagePortSetName = _CFMessagePortSetNamePtr.asFunction< - int Function(CFMessagePortRef, CFStringRef)>(); + late final _CFUUIDCreateFromUUIDBytesPtr = _lookup< + ffi.NativeFunction>( + 'CFUUIDCreateFromUUIDBytes'); + late final _CFUUIDCreateFromUUIDBytes = _CFUUIDCreateFromUUIDBytesPtr + .asFunction(); - void CFMessagePortGetContext( - CFMessagePortRef ms, - ffi.Pointer context, - ) { - return _CFMessagePortGetContext( - ms, - context, - ); + CFURLRef CFCopyHomeDirectoryURL() { + return _CFCopyHomeDirectoryURL(); } - 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 _CFCopyHomeDirectoryURLPtr = + _lookup>( + 'CFCopyHomeDirectoryURL'); + late final _CFCopyHomeDirectoryURL = + _CFCopyHomeDirectoryURLPtr.asFunction(); - void CFMessagePortInvalidate( - CFMessagePortRef ms, - ) { - return _CFMessagePortInvalidate( - ms, - ); - } + late final ffi.Pointer _kCFBundleInfoDictionaryVersionKey = + _lookup('kCFBundleInfoDictionaryVersionKey'); - late final _CFMessagePortInvalidatePtr = - _lookup>( - 'CFMessagePortInvalidate'); - late final _CFMessagePortInvalidate = - _CFMessagePortInvalidatePtr.asFunction(); + CFStringRef get kCFBundleInfoDictionaryVersionKey => + _kCFBundleInfoDictionaryVersionKey.value; - int CFMessagePortIsValid( - CFMessagePortRef ms, - ) { - return _CFMessagePortIsValid( - ms, - ); - } + set kCFBundleInfoDictionaryVersionKey(CFStringRef value) => + _kCFBundleInfoDictionaryVersionKey.value = value; - late final _CFMessagePortIsValidPtr = - _lookup>( - 'CFMessagePortIsValid'); - late final _CFMessagePortIsValid = - _CFMessagePortIsValidPtr.asFunction(); + late final ffi.Pointer _kCFBundleExecutableKey = + _lookup('kCFBundleExecutableKey'); - CFMessagePortInvalidationCallBack CFMessagePortGetInvalidationCallBack( - CFMessagePortRef ms, - ) { - return _CFMessagePortGetInvalidationCallBack( - ms, - ); - } + CFStringRef get kCFBundleExecutableKey => _kCFBundleExecutableKey.value; - late final _CFMessagePortGetInvalidationCallBackPtr = _lookup< - ffi.NativeFunction< - CFMessagePortInvalidationCallBack Function( - CFMessagePortRef)>>('CFMessagePortGetInvalidationCallBack'); - late final _CFMessagePortGetInvalidationCallBack = - _CFMessagePortGetInvalidationCallBackPtr.asFunction< - CFMessagePortInvalidationCallBack Function(CFMessagePortRef)>(); + set kCFBundleExecutableKey(CFStringRef value) => + _kCFBundleExecutableKey.value = value; - void CFMessagePortSetInvalidationCallBack( - CFMessagePortRef ms, - CFMessagePortInvalidationCallBack callout, - ) { - return _CFMessagePortSetInvalidationCallBack( - ms, - callout, - ); - } + late final ffi.Pointer _kCFBundleIdentifierKey = + _lookup('kCFBundleIdentifierKey'); - late final _CFMessagePortSetInvalidationCallBackPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFMessagePortRef, CFMessagePortInvalidationCallBack)>>( - 'CFMessagePortSetInvalidationCallBack'); - late final _CFMessagePortSetInvalidationCallBack = - _CFMessagePortSetInvalidationCallBackPtr.asFunction< - void Function(CFMessagePortRef, CFMessagePortInvalidationCallBack)>(); + CFStringRef get kCFBundleIdentifierKey => _kCFBundleIdentifierKey.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 kCFBundleIdentifierKey(CFStringRef value) => + _kCFBundleIdentifierKey.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 _kCFBundleVersionKey = + _lookup('kCFBundleVersionKey'); - CFRunLoopSourceRef CFMessagePortCreateRunLoopSource( - CFAllocatorRef allocator, - CFMessagePortRef local, - int order, - ) { - return _CFMessagePortCreateRunLoopSource( - allocator, - local, - order, - ); - } + CFStringRef get kCFBundleVersionKey => _kCFBundleVersionKey.value; - late final _CFMessagePortCreateRunLoopSourcePtr = _lookup< - ffi.NativeFunction< - CFRunLoopSourceRef Function(CFAllocatorRef, CFMessagePortRef, - CFIndex)>>('CFMessagePortCreateRunLoopSource'); - late final _CFMessagePortCreateRunLoopSource = - _CFMessagePortCreateRunLoopSourcePtr.asFunction< - CFRunLoopSourceRef Function(CFAllocatorRef, CFMessagePortRef, int)>(); + set kCFBundleVersionKey(CFStringRef value) => + _kCFBundleVersionKey.value = value; - void CFMessagePortSetDispatchQueue( - CFMessagePortRef ms, - dispatch_queue_t queue, - ) { - return _CFMessagePortSetDispatchQueue( - ms, - queue, - ); - } + late final ffi.Pointer _kCFBundleDevelopmentRegionKey = + _lookup('kCFBundleDevelopmentRegionKey'); - late final _CFMessagePortSetDispatchQueuePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFMessagePortRef, - dispatch_queue_t)>>('CFMessagePortSetDispatchQueue'); - late final _CFMessagePortSetDispatchQueue = _CFMessagePortSetDispatchQueuePtr - .asFunction(); + CFStringRef get kCFBundleDevelopmentRegionKey => + _kCFBundleDevelopmentRegionKey.value; - late final ffi.Pointer _kCFPlugInDynamicRegistrationKey = - _lookup('kCFPlugInDynamicRegistrationKey'); + set kCFBundleDevelopmentRegionKey(CFStringRef value) => + _kCFBundleDevelopmentRegionKey.value = value; - CFStringRef get kCFPlugInDynamicRegistrationKey => - _kCFPlugInDynamicRegistrationKey.value; + late final ffi.Pointer _kCFBundleNameKey = + _lookup('kCFBundleNameKey'); - set kCFPlugInDynamicRegistrationKey(CFStringRef value) => - _kCFPlugInDynamicRegistrationKey.value = value; + CFStringRef get kCFBundleNameKey => _kCFBundleNameKey.value; - late final ffi.Pointer _kCFPlugInDynamicRegisterFunctionKey = - _lookup('kCFPlugInDynamicRegisterFunctionKey'); + set kCFBundleNameKey(CFStringRef value) => _kCFBundleNameKey.value = value; - CFStringRef get kCFPlugInDynamicRegisterFunctionKey => - _kCFPlugInDynamicRegisterFunctionKey.value; + late final ffi.Pointer _kCFBundleLocalizationsKey = + _lookup('kCFBundleLocalizationsKey'); - set kCFPlugInDynamicRegisterFunctionKey(CFStringRef value) => - _kCFPlugInDynamicRegisterFunctionKey.value = value; + CFStringRef get kCFBundleLocalizationsKey => _kCFBundleLocalizationsKey.value; - late final ffi.Pointer _kCFPlugInUnloadFunctionKey = - _lookup('kCFPlugInUnloadFunctionKey'); + set kCFBundleLocalizationsKey(CFStringRef value) => + _kCFBundleLocalizationsKey.value = value; - CFStringRef get kCFPlugInUnloadFunctionKey => - _kCFPlugInUnloadFunctionKey.value; + CFBundleRef CFBundleGetMainBundle() { + return _CFBundleGetMainBundle(); + } - set kCFPlugInUnloadFunctionKey(CFStringRef value) => - _kCFPlugInUnloadFunctionKey.value = value; + late final _CFBundleGetMainBundlePtr = + _lookup>( + 'CFBundleGetMainBundle'); + late final _CFBundleGetMainBundle = + _CFBundleGetMainBundlePtr.asFunction(); - late final ffi.Pointer _kCFPlugInFactoriesKey = - _lookup('kCFPlugInFactoriesKey'); + CFBundleRef CFBundleGetBundleWithIdentifier( + CFStringRef bundleID, + ) { + return _CFBundleGetBundleWithIdentifier( + bundleID, + ); + } - CFStringRef get kCFPlugInFactoriesKey => _kCFPlugInFactoriesKey.value; + late final _CFBundleGetBundleWithIdentifierPtr = + _lookup>( + 'CFBundleGetBundleWithIdentifier'); + late final _CFBundleGetBundleWithIdentifier = + _CFBundleGetBundleWithIdentifierPtr.asFunction< + CFBundleRef Function(CFStringRef)>(); - set kCFPlugInFactoriesKey(CFStringRef value) => - _kCFPlugInFactoriesKey.value = value; + CFArrayRef CFBundleGetAllBundles() { + return _CFBundleGetAllBundles(); + } - late final ffi.Pointer _kCFPlugInTypesKey = - _lookup('kCFPlugInTypesKey'); + late final _CFBundleGetAllBundlesPtr = + _lookup>( + 'CFBundleGetAllBundles'); + late final _CFBundleGetAllBundles = + _CFBundleGetAllBundlesPtr.asFunction(); - CFStringRef get kCFPlugInTypesKey => _kCFPlugInTypesKey.value; + int CFBundleGetTypeID() { + return _CFBundleGetTypeID(); + } - set kCFPlugInTypesKey(CFStringRef value) => _kCFPlugInTypesKey.value = value; + late final _CFBundleGetTypeIDPtr = + _lookup>('CFBundleGetTypeID'); + late final _CFBundleGetTypeID = + _CFBundleGetTypeIDPtr.asFunction(); - int CFPlugInGetTypeID() { - return _CFPlugInGetTypeID(); + CFBundleRef CFBundleCreate( + CFAllocatorRef allocator, + CFURLRef bundleURL, + ) { + return _CFBundleCreate( + allocator, + bundleURL, + ); } - late final _CFPlugInGetTypeIDPtr = - _lookup>('CFPlugInGetTypeID'); - late final _CFPlugInGetTypeID = - _CFPlugInGetTypeIDPtr.asFunction(); + late final _CFBundleCreatePtr = _lookup< + ffi.NativeFunction>( + 'CFBundleCreate'); + late final _CFBundleCreate = _CFBundleCreatePtr.asFunction< + CFBundleRef Function(CFAllocatorRef, CFURLRef)>(); - CFPlugInRef CFPlugInCreate( + CFArrayRef CFBundleCreateBundlesFromDirectory( CFAllocatorRef allocator, - CFURLRef plugInURL, + CFURLRef directoryURL, + CFStringRef bundleType, ) { - return _CFPlugInCreate( + return _CFBundleCreateBundlesFromDirectory( allocator, - plugInURL, + directoryURL, + bundleType, ); } - late final _CFPlugInCreatePtr = _lookup< - ffi.NativeFunction>( - 'CFPlugInCreate'); - late final _CFPlugInCreate = _CFPlugInCreatePtr.asFunction< - CFPlugInRef Function(CFAllocatorRef, CFURLRef)>(); + late final _CFBundleCreateBundlesFromDirectoryPtr = _lookup< + ffi.NativeFunction< + CFArrayRef Function(CFAllocatorRef, CFURLRef, + CFStringRef)>>('CFBundleCreateBundlesFromDirectory'); + late final _CFBundleCreateBundlesFromDirectory = + _CFBundleCreateBundlesFromDirectoryPtr.asFunction< + CFArrayRef Function(CFAllocatorRef, CFURLRef, CFStringRef)>(); - CFBundleRef CFPlugInGetBundle( - CFPlugInRef plugIn, + CFURLRef CFBundleCopyBundleURL( + CFBundleRef bundle, ) { - return _CFPlugInGetBundle( - plugIn, + return _CFBundleCopyBundleURL( + bundle, ); } - late final _CFPlugInGetBundlePtr = - _lookup>( - 'CFPlugInGetBundle'); - late final _CFPlugInGetBundle = - _CFPlugInGetBundlePtr.asFunction(); + late final _CFBundleCopyBundleURLPtr = + _lookup>( + 'CFBundleCopyBundleURL'); + late final _CFBundleCopyBundleURL = + _CFBundleCopyBundleURLPtr.asFunction(); - void CFPlugInSetLoadOnDemand( - CFPlugInRef plugIn, - int flag, + CFTypeRef CFBundleGetValueForInfoDictionaryKey( + CFBundleRef bundle, + CFStringRef key, ) { - return _CFPlugInSetLoadOnDemand( - plugIn, - flag, + return _CFBundleGetValueForInfoDictionaryKey( + bundle, + key, ); } - late final _CFPlugInSetLoadOnDemandPtr = - _lookup>( - 'CFPlugInSetLoadOnDemand'); - late final _CFPlugInSetLoadOnDemand = - _CFPlugInSetLoadOnDemandPtr.asFunction(); + late final _CFBundleGetValueForInfoDictionaryKeyPtr = + _lookup>( + 'CFBundleGetValueForInfoDictionaryKey'); + late final _CFBundleGetValueForInfoDictionaryKey = + _CFBundleGetValueForInfoDictionaryKeyPtr.asFunction< + CFTypeRef Function(CFBundleRef, CFStringRef)>(); - int CFPlugInIsLoadOnDemand( - CFPlugInRef plugIn, + CFDictionaryRef CFBundleGetInfoDictionary( + CFBundleRef bundle, ) { - return _CFPlugInIsLoadOnDemand( - plugIn, + return _CFBundleGetInfoDictionary( + bundle, ); } - late final _CFPlugInIsLoadOnDemandPtr = - _lookup>( - 'CFPlugInIsLoadOnDemand'); - late final _CFPlugInIsLoadOnDemand = - _CFPlugInIsLoadOnDemandPtr.asFunction(); + late final _CFBundleGetInfoDictionaryPtr = + _lookup>( + 'CFBundleGetInfoDictionary'); + late final _CFBundleGetInfoDictionary = _CFBundleGetInfoDictionaryPtr + .asFunction(); - CFArrayRef CFPlugInFindFactoriesForPlugInType( - CFUUIDRef typeUUID, + CFDictionaryRef CFBundleGetLocalInfoDictionary( + CFBundleRef bundle, ) { - return _CFPlugInFindFactoriesForPlugInType( - typeUUID, + return _CFBundleGetLocalInfoDictionary( + bundle, ); } - late final _CFPlugInFindFactoriesForPlugInTypePtr = - _lookup>( - 'CFPlugInFindFactoriesForPlugInType'); - late final _CFPlugInFindFactoriesForPlugInType = - _CFPlugInFindFactoriesForPlugInTypePtr.asFunction< - CFArrayRef Function(CFUUIDRef)>(); + late final _CFBundleGetLocalInfoDictionaryPtr = + _lookup>( + 'CFBundleGetLocalInfoDictionary'); + late final _CFBundleGetLocalInfoDictionary = + _CFBundleGetLocalInfoDictionaryPtr.asFunction< + CFDictionaryRef Function(CFBundleRef)>(); - CFArrayRef CFPlugInFindFactoriesForPlugInTypeInPlugIn( - CFUUIDRef typeUUID, - CFPlugInRef plugIn, + void CFBundleGetPackageInfo( + CFBundleRef bundle, + ffi.Pointer packageType, + ffi.Pointer packageCreator, ) { - return _CFPlugInFindFactoriesForPlugInTypeInPlugIn( - typeUUID, - plugIn, + return _CFBundleGetPackageInfo( + bundle, + packageType, + packageCreator, ); } - late final _CFPlugInFindFactoriesForPlugInTypeInPlugInPtr = - _lookup>( - 'CFPlugInFindFactoriesForPlugInTypeInPlugIn'); - late final _CFPlugInFindFactoriesForPlugInTypeInPlugIn = - _CFPlugInFindFactoriesForPlugInTypeInPlugInPtr.asFunction< - CFArrayRef Function(CFUUIDRef, CFPlugInRef)>(); + 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)>(); - ffi.Pointer CFPlugInInstanceCreate( - CFAllocatorRef allocator, - CFUUIDRef factoryUUID, - CFUUIDRef typeUUID, + CFStringRef CFBundleGetIdentifier( + CFBundleRef bundle, ) { - return _CFPlugInInstanceCreate( - allocator, - factoryUUID, - typeUUID, + return _CFBundleGetIdentifier( + 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 _CFBundleGetIdentifierPtr = + _lookup>( + 'CFBundleGetIdentifier'); + late final _CFBundleGetIdentifier = + _CFBundleGetIdentifierPtr.asFunction(); - int CFPlugInRegisterFactoryFunction( - CFUUIDRef factoryUUID, - CFPlugInFactoryFunction func, + int CFBundleGetVersionNumber( + CFBundleRef bundle, ) { - return _CFPlugInRegisterFactoryFunction( - factoryUUID, - func, + return _CFBundleGetVersionNumber( + bundle, ); } - late final _CFPlugInRegisterFactoryFunctionPtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFUUIDRef, - CFPlugInFactoryFunction)>>('CFPlugInRegisterFactoryFunction'); - late final _CFPlugInRegisterFactoryFunction = - _CFPlugInRegisterFactoryFunctionPtr.asFunction< - int Function(CFUUIDRef, CFPlugInFactoryFunction)>(); + late final _CFBundleGetVersionNumberPtr = + _lookup>( + 'CFBundleGetVersionNumber'); + late final _CFBundleGetVersionNumber = + _CFBundleGetVersionNumberPtr.asFunction(); - int CFPlugInRegisterFactoryFunctionByName( - CFUUIDRef factoryUUID, - CFPlugInRef plugIn, - CFStringRef functionName, + CFStringRef CFBundleGetDevelopmentRegion( + CFBundleRef bundle, ) { - return _CFPlugInRegisterFactoryFunctionByName( - factoryUUID, - plugIn, - functionName, + return _CFBundleGetDevelopmentRegion( + bundle, ); } - late final _CFPlugInRegisterFactoryFunctionByNamePtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFUUIDRef, CFPlugInRef, - CFStringRef)>>('CFPlugInRegisterFactoryFunctionByName'); - late final _CFPlugInRegisterFactoryFunctionByName = - _CFPlugInRegisterFactoryFunctionByNamePtr.asFunction< - int Function(CFUUIDRef, CFPlugInRef, CFStringRef)>(); + late final _CFBundleGetDevelopmentRegionPtr = + _lookup>( + 'CFBundleGetDevelopmentRegion'); + late final _CFBundleGetDevelopmentRegion = _CFBundleGetDevelopmentRegionPtr + .asFunction(); - int CFPlugInUnregisterFactory( - CFUUIDRef factoryUUID, + CFURLRef CFBundleCopySupportFilesDirectoryURL( + CFBundleRef bundle, ) { - return _CFPlugInUnregisterFactory( - factoryUUID, + return _CFBundleCopySupportFilesDirectoryURL( + bundle, ); } - late final _CFPlugInUnregisterFactoryPtr = - _lookup>( - 'CFPlugInUnregisterFactory'); - late final _CFPlugInUnregisterFactory = - _CFPlugInUnregisterFactoryPtr.asFunction(); + late final _CFBundleCopySupportFilesDirectoryURLPtr = + _lookup>( + 'CFBundleCopySupportFilesDirectoryURL'); + late final _CFBundleCopySupportFilesDirectoryURL = + _CFBundleCopySupportFilesDirectoryURLPtr.asFunction< + CFURLRef Function(CFBundleRef)>(); - int CFPlugInRegisterPlugInType( - CFUUIDRef factoryUUID, - CFUUIDRef typeUUID, + CFURLRef CFBundleCopyResourcesDirectoryURL( + CFBundleRef bundle, ) { - return _CFPlugInRegisterPlugInType( - factoryUUID, - typeUUID, + return _CFBundleCopyResourcesDirectoryURL( + bundle, ); } - late final _CFPlugInRegisterPlugInTypePtr = - _lookup>( - 'CFPlugInRegisterPlugInType'); - late final _CFPlugInRegisterPlugInType = _CFPlugInRegisterPlugInTypePtr - .asFunction(); + late final _CFBundleCopyResourcesDirectoryURLPtr = + _lookup>( + 'CFBundleCopyResourcesDirectoryURL'); + late final _CFBundleCopyResourcesDirectoryURL = + _CFBundleCopyResourcesDirectoryURLPtr.asFunction< + CFURLRef Function(CFBundleRef)>(); - int CFPlugInUnregisterPlugInType( - CFUUIDRef factoryUUID, - CFUUIDRef typeUUID, + CFURLRef CFBundleCopyPrivateFrameworksURL( + CFBundleRef bundle, ) { - return _CFPlugInUnregisterPlugInType( - factoryUUID, - typeUUID, + return _CFBundleCopyPrivateFrameworksURL( + bundle, ); } - late final _CFPlugInUnregisterPlugInTypePtr = - _lookup>( - 'CFPlugInUnregisterPlugInType'); - late final _CFPlugInUnregisterPlugInType = _CFPlugInUnregisterPlugInTypePtr - .asFunction(); + late final _CFBundleCopyPrivateFrameworksURLPtr = + _lookup>( + 'CFBundleCopyPrivateFrameworksURL'); + late final _CFBundleCopyPrivateFrameworksURL = + _CFBundleCopyPrivateFrameworksURLPtr.asFunction< + CFURLRef Function(CFBundleRef)>(); - void CFPlugInAddInstanceForFactory( - CFUUIDRef factoryID, + CFURLRef CFBundleCopySharedFrameworksURL( + CFBundleRef bundle, ) { - return _CFPlugInAddInstanceForFactory( - factoryID, + return _CFBundleCopySharedFrameworksURL( + bundle, ); } - late final _CFPlugInAddInstanceForFactoryPtr = - _lookup>( - 'CFPlugInAddInstanceForFactory'); - late final _CFPlugInAddInstanceForFactory = - _CFPlugInAddInstanceForFactoryPtr.asFunction(); + late final _CFBundleCopySharedFrameworksURLPtr = + _lookup>( + 'CFBundleCopySharedFrameworksURL'); + late final _CFBundleCopySharedFrameworksURL = + _CFBundleCopySharedFrameworksURLPtr.asFunction< + CFURLRef Function(CFBundleRef)>(); - void CFPlugInRemoveInstanceForFactory( - CFUUIDRef factoryID, + CFURLRef CFBundleCopySharedSupportURL( + CFBundleRef bundle, ) { - return _CFPlugInRemoveInstanceForFactory( - factoryID, + return _CFBundleCopySharedSupportURL( + bundle, ); } - late final _CFPlugInRemoveInstanceForFactoryPtr = - _lookup>( - 'CFPlugInRemoveInstanceForFactory'); - late final _CFPlugInRemoveInstanceForFactory = - _CFPlugInRemoveInstanceForFactoryPtr.asFunction< - void Function(CFUUIDRef)>(); + late final _CFBundleCopySharedSupportURLPtr = + _lookup>( + 'CFBundleCopySharedSupportURL'); + late final _CFBundleCopySharedSupportURL = _CFBundleCopySharedSupportURLPtr + .asFunction(); - int CFPlugInInstanceGetInterfaceFunctionTable( - CFPlugInInstanceRef instance, - CFStringRef interfaceName, - ffi.Pointer> ftbl, + CFURLRef CFBundleCopyBuiltInPlugInsURL( + CFBundleRef bundle, ) { - return _CFPlugInInstanceGetInterfaceFunctionTable( - instance, - interfaceName, - ftbl, + return _CFBundleCopyBuiltInPlugInsURL( + 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 _CFBundleCopyBuiltInPlugInsURLPtr = + _lookup>( + 'CFBundleCopyBuiltInPlugInsURL'); + late final _CFBundleCopyBuiltInPlugInsURL = _CFBundleCopyBuiltInPlugInsURLPtr + .asFunction(); - CFStringRef CFPlugInInstanceGetFactoryName( - CFPlugInInstanceRef instance, + CFDictionaryRef CFBundleCopyInfoDictionaryInDirectory( + CFURLRef bundleURL, ) { - return _CFPlugInInstanceGetFactoryName( - instance, + return _CFBundleCopyInfoDictionaryInDirectory( + bundleURL, ); } - late final _CFPlugInInstanceGetFactoryNamePtr = - _lookup>( - 'CFPlugInInstanceGetFactoryName'); - late final _CFPlugInInstanceGetFactoryName = - _CFPlugInInstanceGetFactoryNamePtr.asFunction< - CFStringRef Function(CFPlugInInstanceRef)>(); + late final _CFBundleCopyInfoDictionaryInDirectoryPtr = + _lookup>( + 'CFBundleCopyInfoDictionaryInDirectory'); + late final _CFBundleCopyInfoDictionaryInDirectory = + _CFBundleCopyInfoDictionaryInDirectoryPtr.asFunction< + CFDictionaryRef Function(CFURLRef)>(); - ffi.Pointer CFPlugInInstanceGetInstanceData( - CFPlugInInstanceRef instance, + int CFBundleGetPackageInfoInDirectory( + CFURLRef url, + ffi.Pointer packageType, + ffi.Pointer packageCreator, ) { - return _CFPlugInInstanceGetInstanceData( - instance, + return _CFBundleGetPackageInfoInDirectory( + url, + packageType, + packageCreator, ); } - late final _CFPlugInInstanceGetInstanceDataPtr = _lookup< + late final _CFBundleGetPackageInfoInDirectoryPtr = _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(); + Boolean Function(CFURLRef, ffi.Pointer, + ffi.Pointer)>>('CFBundleGetPackageInfoInDirectory'); + late final _CFBundleGetPackageInfoInDirectory = + _CFBundleGetPackageInfoInDirectoryPtr.asFunction< + int Function(CFURLRef, ffi.Pointer, ffi.Pointer)>(); - CFPlugInInstanceRef CFPlugInInstanceCreateWithInstanceDataSize( - CFAllocatorRef allocator, - int instanceDataSize, - CFPlugInInstanceDeallocateInstanceDataFunction deallocateInstanceFunction, - CFStringRef factoryName, - CFPlugInInstanceGetInterfaceFunction getInterfaceFunction, + CFURLRef CFBundleCopyResourceURL( + CFBundleRef bundle, + CFStringRef resourceName, + CFStringRef resourceType, + CFStringRef subDirName, ) { - return _CFPlugInInstanceCreateWithInstanceDataSize( - allocator, - instanceDataSize, - deallocateInstanceFunction, - factoryName, - getInterfaceFunction, + return _CFBundleCopyResourceURL( + bundle, + resourceName, + resourceType, + subDirName, ); } - 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(); + late final _CFBundleCopyResourceURLPtr = _lookup< + ffi.NativeFunction< + CFURLRef Function(CFBundleRef, CFStringRef, CFStringRef, + CFStringRef)>>('CFBundleCopyResourceURL'); + late final _CFBundleCopyResourceURL = _CFBundleCopyResourceURLPtr.asFunction< + CFURLRef Function(CFBundleRef, CFStringRef, CFStringRef, CFStringRef)>(); - CFMachPortRef CFMachPortCreate( - CFAllocatorRef allocator, - CFMachPortCallBack callout, - ffi.Pointer context, - ffi.Pointer shouldFreeInfo, + CFArrayRef CFBundleCopyResourceURLsOfType( + CFBundleRef bundle, + CFStringRef resourceType, + CFStringRef subDirName, ) { - return _CFMachPortCreate( - allocator, - callout, - context, - shouldFreeInfo, + return _CFBundleCopyResourceURLsOfType( + bundle, + resourceType, + subDirName, ); } - late final _CFMachPortCreatePtr = _lookup< + late final _CFBundleCopyResourceURLsOfTypePtr = _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)>(); + CFArrayRef Function(CFBundleRef, CFStringRef, + CFStringRef)>>('CFBundleCopyResourceURLsOfType'); + late final _CFBundleCopyResourceURLsOfType = + _CFBundleCopyResourceURLsOfTypePtr.asFunction< + CFArrayRef Function(CFBundleRef, CFStringRef, CFStringRef)>(); - CFMachPortRef CFMachPortCreateWithPort( - CFAllocatorRef allocator, - int portNum, - CFMachPortCallBack callout, - ffi.Pointer context, - ffi.Pointer shouldFreeInfo, + CFStringRef CFBundleCopyLocalizedString( + CFBundleRef bundle, + CFStringRef key, + CFStringRef value, + CFStringRef tableName, ) { - return _CFMachPortCreateWithPort( - allocator, - portNum, - callout, - context, - shouldFreeInfo, + return _CFBundleCopyLocalizedString( + bundle, + key, + value, + tableName, ); } - late final _CFMachPortCreateWithPortPtr = _lookup< + late final _CFBundleCopyLocalizedStringPtr = _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)>(); + CFStringRef Function(CFBundleRef, CFStringRef, CFStringRef, + CFStringRef)>>('CFBundleCopyLocalizedString'); + late final _CFBundleCopyLocalizedString = + _CFBundleCopyLocalizedStringPtr.asFunction< + CFStringRef Function( + CFBundleRef, CFStringRef, CFStringRef, CFStringRef)>(); - int CFMachPortGetPort( - CFMachPortRef port, + CFURLRef CFBundleCopyResourceURLInDirectory( + CFURLRef bundleURL, + CFStringRef resourceName, + CFStringRef resourceType, + CFStringRef subDirName, ) { - return _CFMachPortGetPort( - port, + return _CFBundleCopyResourceURLInDirectory( + bundleURL, + resourceName, + resourceType, + subDirName, ); } - late final _CFMachPortGetPortPtr = - _lookup>( - 'CFMachPortGetPort'); - late final _CFMachPortGetPort = - _CFMachPortGetPortPtr.asFunction(); + late final _CFBundleCopyResourceURLInDirectoryPtr = _lookup< + ffi.NativeFunction< + CFURLRef Function(CFURLRef, CFStringRef, CFStringRef, + CFStringRef)>>('CFBundleCopyResourceURLInDirectory'); + late final _CFBundleCopyResourceURLInDirectory = + _CFBundleCopyResourceURLInDirectoryPtr.asFunction< + CFURLRef Function(CFURLRef, CFStringRef, CFStringRef, CFStringRef)>(); - void CFMachPortGetContext( - CFMachPortRef port, - ffi.Pointer context, + CFArrayRef CFBundleCopyResourceURLsOfTypeInDirectory( + CFURLRef bundleURL, + CFStringRef resourceType, + CFStringRef subDirName, ) { - return _CFMachPortGetContext( - port, - context, + return _CFBundleCopyResourceURLsOfTypeInDirectory( + bundleURL, + resourceType, + subDirName, ); } - late final _CFMachPortGetContextPtr = _lookup< + late final _CFBundleCopyResourceURLsOfTypeInDirectoryPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFMachPortRef, - ffi.Pointer)>>('CFMachPortGetContext'); - late final _CFMachPortGetContext = _CFMachPortGetContextPtr.asFunction< - void Function(CFMachPortRef, ffi.Pointer)>(); + CFArrayRef Function(CFURLRef, CFStringRef, + CFStringRef)>>('CFBundleCopyResourceURLsOfTypeInDirectory'); + late final _CFBundleCopyResourceURLsOfTypeInDirectory = + _CFBundleCopyResourceURLsOfTypeInDirectoryPtr.asFunction< + CFArrayRef Function(CFURLRef, CFStringRef, CFStringRef)>(); - void CFMachPortInvalidate( - CFMachPortRef port, + CFArrayRef CFBundleCopyBundleLocalizations( + CFBundleRef bundle, ) { - return _CFMachPortInvalidate( - port, + return _CFBundleCopyBundleLocalizations( + bundle, ); } - late final _CFMachPortInvalidatePtr = - _lookup>( - 'CFMachPortInvalidate'); - late final _CFMachPortInvalidate = - _CFMachPortInvalidatePtr.asFunction(); + late final _CFBundleCopyBundleLocalizationsPtr = + _lookup>( + 'CFBundleCopyBundleLocalizations'); + late final _CFBundleCopyBundleLocalizations = + _CFBundleCopyBundleLocalizationsPtr.asFunction< + CFArrayRef Function(CFBundleRef)>(); - int CFMachPortIsValid( - CFMachPortRef port, + CFArrayRef CFBundleCopyPreferredLocalizationsFromArray( + CFArrayRef locArray, ) { - return _CFMachPortIsValid( - port, + return _CFBundleCopyPreferredLocalizationsFromArray( + locArray, ); } - 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)>(); + 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)>(); - - int CFAttributedStringGetTypeID() { - return _CFAttributedStringGetTypeID(); - } - - late final _CFAttributedStringGetTypeIDPtr = - _lookup>( - 'CFAttributedStringGetTypeID'); - late final _CFAttributedStringGetTypeID = - _CFAttributedStringGetTypeIDPtr.asFunction(); + CFURLRef Function(CFBundleRef, CFStringRef, CFStringRef, CFStringRef, + CFStringRef)>>('CFBundleCopyResourceURLForLocalization'); + late final _CFBundleCopyResourceURLForLocalization = + _CFBundleCopyResourceURLForLocalizationPtr.asFunction< + CFURLRef Function(CFBundleRef, CFStringRef, CFStringRef, CFStringRef, + CFStringRef)>(); - CFAttributedStringRef CFAttributedStringCreate( - CFAllocatorRef alloc, - CFStringRef str, - CFDictionaryRef attributes, + CFArrayRef CFBundleCopyResourceURLsOfTypeForLocalization( + CFBundleRef bundle, + CFStringRef resourceType, + CFStringRef subDirName, + CFStringRef localizationName, ) { - return _CFAttributedStringCreate( - alloc, - str, - attributes, + return _CFBundleCopyResourceURLsOfTypeForLocalization( + bundle, + resourceType, + subDirName, + localizationName, ); } - late final _CFAttributedStringCreatePtr = _lookup< + late final _CFBundleCopyResourceURLsOfTypeForLocalizationPtr = _lookup< ffi.NativeFunction< - CFAttributedStringRef Function(CFAllocatorRef, CFStringRef, - CFDictionaryRef)>>('CFAttributedStringCreate'); - late final _CFAttributedStringCreate = - _CFAttributedStringCreatePtr.asFunction< - CFAttributedStringRef Function( - CFAllocatorRef, CFStringRef, CFDictionaryRef)>(); + CFArrayRef Function(CFBundleRef, CFStringRef, CFStringRef, + CFStringRef)>>('CFBundleCopyResourceURLsOfTypeForLocalization'); + late final _CFBundleCopyResourceURLsOfTypeForLocalization = + _CFBundleCopyResourceURLsOfTypeForLocalizationPtr.asFunction< + CFArrayRef Function( + CFBundleRef, CFStringRef, CFStringRef, CFStringRef)>(); - CFAttributedStringRef CFAttributedStringCreateWithSubstring( - CFAllocatorRef alloc, - CFAttributedStringRef aStr, - CFRange range, + CFDictionaryRef CFBundleCopyInfoDictionaryForURL( + CFURLRef url, ) { - return _CFAttributedStringCreateWithSubstring( - alloc, - aStr, - range, + return _CFBundleCopyInfoDictionaryForURL( + 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 _CFBundleCopyInfoDictionaryForURLPtr = + _lookup>( + 'CFBundleCopyInfoDictionaryForURL'); + late final _CFBundleCopyInfoDictionaryForURL = + _CFBundleCopyInfoDictionaryForURLPtr.asFunction< + CFDictionaryRef Function(CFURLRef)>(); - CFAttributedStringRef CFAttributedStringCreateCopy( - CFAllocatorRef alloc, - CFAttributedStringRef aStr, + CFArrayRef CFBundleCopyLocalizationsForURL( + CFURLRef url, ) { - return _CFAttributedStringCreateCopy( - alloc, - aStr, + return _CFBundleCopyLocalizationsForURL( + url, ); } - late final _CFAttributedStringCreateCopyPtr = _lookup< - ffi.NativeFunction< - CFAttributedStringRef Function(CFAllocatorRef, - CFAttributedStringRef)>>('CFAttributedStringCreateCopy'); - late final _CFAttributedStringCreateCopy = - _CFAttributedStringCreateCopyPtr.asFunction< - CFAttributedStringRef Function( - CFAllocatorRef, CFAttributedStringRef)>(); + late final _CFBundleCopyLocalizationsForURLPtr = + _lookup>( + 'CFBundleCopyLocalizationsForURL'); + late final _CFBundleCopyLocalizationsForURL = + _CFBundleCopyLocalizationsForURLPtr.asFunction< + CFArrayRef Function(CFURLRef)>(); - CFStringRef CFAttributedStringGetString( - CFAttributedStringRef aStr, + CFArrayRef CFBundleCopyExecutableArchitecturesForURL( + CFURLRef url, ) { - return _CFAttributedStringGetString( - aStr, + return _CFBundleCopyExecutableArchitecturesForURL( + url, ); } - late final _CFAttributedStringGetStringPtr = - _lookup>( - 'CFAttributedStringGetString'); - late final _CFAttributedStringGetString = _CFAttributedStringGetStringPtr - .asFunction(); + late final _CFBundleCopyExecutableArchitecturesForURLPtr = + _lookup>( + 'CFBundleCopyExecutableArchitecturesForURL'); + late final _CFBundleCopyExecutableArchitecturesForURL = + _CFBundleCopyExecutableArchitecturesForURLPtr.asFunction< + CFArrayRef Function(CFURLRef)>(); - int CFAttributedStringGetLength( - CFAttributedStringRef aStr, + CFURLRef CFBundleCopyExecutableURL( + CFBundleRef bundle, ) { - return _CFAttributedStringGetLength( - aStr, + return _CFBundleCopyExecutableURL( + bundle, ); } - late final _CFAttributedStringGetLengthPtr = - _lookup>( - 'CFAttributedStringGetLength'); - late final _CFAttributedStringGetLength = _CFAttributedStringGetLengthPtr - .asFunction(); + late final _CFBundleCopyExecutableURLPtr = + _lookup>( + 'CFBundleCopyExecutableURL'); + late final _CFBundleCopyExecutableURL = _CFBundleCopyExecutableURLPtr + .asFunction(); - CFDictionaryRef CFAttributedStringGetAttributes( - CFAttributedStringRef aStr, - int loc, - ffi.Pointer effectiveRange, + CFArrayRef CFBundleCopyExecutableArchitectures( + CFBundleRef bundle, ) { - return _CFAttributedStringGetAttributes( - aStr, - loc, - effectiveRange, + return _CFBundleCopyExecutableArchitectures( + 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 _CFBundleCopyExecutableArchitecturesPtr = + _lookup>( + 'CFBundleCopyExecutableArchitectures'); + late final _CFBundleCopyExecutableArchitectures = + _CFBundleCopyExecutableArchitecturesPtr.asFunction< + CFArrayRef Function(CFBundleRef)>(); - CFTypeRef CFAttributedStringGetAttribute( - CFAttributedStringRef aStr, - int loc, - CFStringRef attrName, - ffi.Pointer effectiveRange, + int CFBundlePreflightExecutable( + CFBundleRef bundle, + ffi.Pointer error, ) { - return _CFAttributedStringGetAttribute( - aStr, - loc, - attrName, - effectiveRange, + return _CFBundlePreflightExecutable( + bundle, + error, ); } - late final _CFAttributedStringGetAttributePtr = _lookup< + late final _CFBundlePreflightExecutablePtr = _lookup< ffi.NativeFunction< - CFTypeRef Function(CFAttributedStringRef, CFIndex, CFStringRef, - ffi.Pointer)>>('CFAttributedStringGetAttribute'); - late final _CFAttributedStringGetAttribute = - _CFAttributedStringGetAttributePtr.asFunction< - CFTypeRef Function( - CFAttributedStringRef, int, CFStringRef, ffi.Pointer)>(); + Boolean Function(CFBundleRef, + ffi.Pointer)>>('CFBundlePreflightExecutable'); + late final _CFBundlePreflightExecutable = _CFBundlePreflightExecutablePtr + .asFunction)>(); - CFDictionaryRef CFAttributedStringGetAttributesAndLongestEffectiveRange( - CFAttributedStringRef aStr, - int loc, - CFRange inRange, - ffi.Pointer longestEffectiveRange, + int CFBundleLoadExecutableAndReturnError( + CFBundleRef bundle, + ffi.Pointer error, ) { - return _CFAttributedStringGetAttributesAndLongestEffectiveRange( - aStr, - loc, - inRange, - longestEffectiveRange, + return _CFBundleLoadExecutableAndReturnError( + bundle, + error, ); } - 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 _CFBundleLoadExecutableAndReturnErrorPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFBundleRef, ffi.Pointer)>>( + 'CFBundleLoadExecutableAndReturnError'); + late final _CFBundleLoadExecutableAndReturnError = + _CFBundleLoadExecutableAndReturnErrorPtr.asFunction< + int Function(CFBundleRef, ffi.Pointer)>(); - CFTypeRef CFAttributedStringGetAttributeAndLongestEffectiveRange( - CFAttributedStringRef aStr, - int loc, - CFStringRef attrName, - CFRange inRange, - ffi.Pointer longestEffectiveRange, + int CFBundleLoadExecutable( + CFBundleRef bundle, ) { - return _CFAttributedStringGetAttributeAndLongestEffectiveRange( - aStr, - loc, - attrName, - inRange, - longestEffectiveRange, + return _CFBundleLoadExecutable( + 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 _CFBundleLoadExecutablePtr = + _lookup>( + 'CFBundleLoadExecutable'); + late final _CFBundleLoadExecutable = + _CFBundleLoadExecutablePtr.asFunction(); - CFMutableAttributedStringRef CFAttributedStringCreateMutableCopy( - CFAllocatorRef alloc, - int maxLength, - CFAttributedStringRef aStr, + int CFBundleIsExecutableLoaded( + CFBundleRef bundle, ) { - return _CFAttributedStringCreateMutableCopy( - alloc, - maxLength, - aStr, + return _CFBundleIsExecutableLoaded( + 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 _CFBundleIsExecutableLoadedPtr = + _lookup>( + 'CFBundleIsExecutableLoaded'); + late final _CFBundleIsExecutableLoaded = + _CFBundleIsExecutableLoadedPtr.asFunction(); - CFMutableAttributedStringRef CFAttributedStringCreateMutable( - CFAllocatorRef alloc, - int maxLength, + void CFBundleUnloadExecutable( + CFBundleRef bundle, ) { - return _CFAttributedStringCreateMutable( - alloc, - maxLength, + return _CFBundleUnloadExecutable( + bundle, ); } - late final _CFAttributedStringCreateMutablePtr = _lookup< - ffi.NativeFunction< - CFMutableAttributedStringRef Function( - CFAllocatorRef, CFIndex)>>('CFAttributedStringCreateMutable'); - late final _CFAttributedStringCreateMutable = - _CFAttributedStringCreateMutablePtr.asFunction< - CFMutableAttributedStringRef Function(CFAllocatorRef, int)>(); + late final _CFBundleUnloadExecutablePtr = + _lookup>( + 'CFBundleUnloadExecutable'); + late final _CFBundleUnloadExecutable = + _CFBundleUnloadExecutablePtr.asFunction(); - void CFAttributedStringReplaceString( - CFMutableAttributedStringRef aStr, - CFRange range, - CFStringRef replacement, + ffi.Pointer CFBundleGetFunctionPointerForName( + CFBundleRef bundle, + CFStringRef functionName, ) { - return _CFAttributedStringReplaceString( - aStr, - range, - replacement, + return _CFBundleGetFunctionPointerForName( + bundle, + functionName, ); } - late final _CFAttributedStringReplaceStringPtr = _lookup< + late final _CFBundleGetFunctionPointerForNamePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFMutableAttributedStringRef, CFRange, - CFStringRef)>>('CFAttributedStringReplaceString'); - late final _CFAttributedStringReplaceString = - _CFAttributedStringReplaceStringPtr.asFunction< - void Function(CFMutableAttributedStringRef, CFRange, CFStringRef)>(); + ffi.Pointer Function( + CFBundleRef, CFStringRef)>>('CFBundleGetFunctionPointerForName'); + late final _CFBundleGetFunctionPointerForName = + _CFBundleGetFunctionPointerForNamePtr.asFunction< + ffi.Pointer Function(CFBundleRef, CFStringRef)>(); - CFMutableStringRef CFAttributedStringGetMutableString( - CFMutableAttributedStringRef aStr, + void CFBundleGetFunctionPointersForNames( + CFBundleRef bundle, + CFArrayRef functionNames, + ffi.Pointer> ftbl, ) { - return _CFAttributedStringGetMutableString( - aStr, + return _CFBundleGetFunctionPointersForNames( + bundle, + functionNames, + ftbl, ); } - 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)>(); - - void CFAttributedStringReplaceAttributedString( - CFMutableAttributedStringRef aStr, - CFRange range, - CFAttributedStringRef replacement, + late final _CFBundleCopyAuxiliaryExecutableURLPtr = + _lookup>( + 'CFBundleCopyAuxiliaryExecutableURL'); + late final _CFBundleCopyAuxiliaryExecutableURL = + _CFBundleCopyAuxiliaryExecutableURLPtr.asFunction< + CFURLRef Function(CFBundleRef, CFStringRef)>(); + + 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)>(); + CFMessagePortInvalidationCallBack Function( + CFMessagePortRef)>>('CFMessagePortGetInvalidationCallBack'); + late final _CFMessagePortGetInvalidationCallBack = + _CFMessagePortGetInvalidationCallBackPtr.asFunction< + CFMessagePortInvalidationCallBack Function(CFMessagePortRef)>(); - int acl_valid( - acl_t acl, + void CFMessagePortSetInvalidationCallBack( + CFMessagePortRef ms, + CFMessagePortInvalidationCallBack callout, ) { - return _acl_valid( - acl, + return _CFMessagePortSetInvalidationCallBack( + ms, + callout, ); } - late final _acl_validPtr = - _lookup>('acl_valid'); - late final _acl_valid = _acl_validPtr.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_fd_np( - int fd, - 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_fd_np( - fd, - type, - acl, + return _CFMessagePortSendRequest( + remote, + msgid, + data, + sendTimeout, + rcvTimeout, + replyMode, + returnData, ); } - late final _acl_valid_fd_npPtr = - _lookup>( - 'acl_valid_fd_np'); - late final _acl_valid_fd_np = - _acl_valid_fd_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_valid_file_np( - ffi.Pointer path, - int type, - acl_t acl, + CFRunLoopSourceRef CFMessagePortCreateRunLoopSource( + CFAllocatorRef allocator, + CFMessagePortRef local, + int order, ) { - return _acl_valid_file_np( - path, - type, - acl, + return _CFMessagePortCreateRunLoopSource( + allocator, + local, + order, ); } - late final _acl_valid_file_npPtr = _lookup< + late final _CFMessagePortCreateRunLoopSourcePtr = _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)>(); + CFRunLoopSourceRef Function(CFAllocatorRef, CFMessagePortRef, + CFIndex)>>('CFMessagePortCreateRunLoopSource'); + late final _CFMessagePortCreateRunLoopSource = + _CFMessagePortCreateRunLoopSourcePtr.asFunction< + CFRunLoopSourceRef Function(CFAllocatorRef, CFMessagePortRef, int)>(); - int acl_valid_link_np( - ffi.Pointer path, - int type, - acl_t acl, + void CFMessagePortSetDispatchQueue( + CFMessagePortRef ms, + dispatch_queue_t queue, ) { - return _acl_valid_link_np( - path, - type, - acl, + return _CFMessagePortSetDispatchQueue( + ms, + queue, ); } - late final _acl_valid_link_npPtr = _lookup< + late final _CFMessagePortSetDispatchQueuePtr = _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, - ); - } + ffi.Void Function(CFMessagePortRef, + dispatch_queue_t)>>('CFMessagePortSetDispatchQueue'); + late final _CFMessagePortSetDispatchQueue = _CFMessagePortSetDispatchQueuePtr + .asFunction(); - late final _acl_add_permPtr = - _lookup>( - 'acl_add_perm'); - late final _acl_add_perm = - _acl_add_permPtr.asFunction(); + late final ffi.Pointer _kCFPlugInDynamicRegistrationKey = + _lookup('kCFPlugInDynamicRegistrationKey'); - int acl_calc_mask( - ffi.Pointer acl_p, - ) { - return _acl_calc_mask( - acl_p, - ); - } + CFStringRef get kCFPlugInDynamicRegistrationKey => + _kCFPlugInDynamicRegistrationKey.value; - late final _acl_calc_maskPtr = - _lookup)>>( - 'acl_calc_mask'); - late final _acl_calc_mask = - _acl_calc_maskPtr.asFunction)>(); + set kCFPlugInDynamicRegistrationKey(CFStringRef value) => + _kCFPlugInDynamicRegistrationKey.value = value; - int acl_clear_perms( - acl_permset_t permset_d, - ) { - return _acl_clear_perms( - permset_d, - ); - } + late final ffi.Pointer _kCFPlugInDynamicRegisterFunctionKey = + _lookup('kCFPlugInDynamicRegisterFunctionKey'); - late final _acl_clear_permsPtr = - _lookup>( - 'acl_clear_perms'); - late final _acl_clear_perms = - _acl_clear_permsPtr.asFunction(); + CFStringRef get kCFPlugInDynamicRegisterFunctionKey => + _kCFPlugInDynamicRegisterFunctionKey.value; - int acl_delete_perm( - acl_permset_t permset_d, - int perm, - ) { - return _acl_delete_perm( - permset_d, - perm, - ); - } + set kCFPlugInDynamicRegisterFunctionKey(CFStringRef value) => + _kCFPlugInDynamicRegisterFunctionKey.value = value; - late final _acl_delete_permPtr = - _lookup>( - 'acl_delete_perm'); - late final _acl_delete_perm = - _acl_delete_permPtr.asFunction(); + late final ffi.Pointer _kCFPlugInUnloadFunctionKey = + _lookup('kCFPlugInUnloadFunctionKey'); - int acl_get_perm_np( - acl_permset_t permset_d, - int perm, - ) { - return _acl_get_perm_np( - permset_d, - perm, - ); - } + CFStringRef get kCFPlugInUnloadFunctionKey => + _kCFPlugInUnloadFunctionKey.value; - late final _acl_get_perm_npPtr = - _lookup>( - 'acl_get_perm_np'); - late final _acl_get_perm_np = - _acl_get_perm_npPtr.asFunction(); + set kCFPlugInUnloadFunctionKey(CFStringRef value) => + _kCFPlugInUnloadFunctionKey.value = value; - int acl_get_permset( - acl_entry_t entry_d, - ffi.Pointer permset_p, - ) { - return _acl_get_permset( - entry_d, - permset_p, - ); - } + late final ffi.Pointer _kCFPlugInFactoriesKey = + _lookup('kCFPlugInFactoriesKey'); - 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)>(); + CFStringRef get kCFPlugInFactoriesKey => _kCFPlugInFactoriesKey.value; - int acl_set_permset( - acl_entry_t entry_d, - acl_permset_t permset_d, - ) { - return _acl_set_permset( - entry_d, - permset_d, - ); - } + set kCFPlugInFactoriesKey(CFStringRef value) => + _kCFPlugInFactoriesKey.value = value; - late final _acl_set_permsetPtr = - _lookup>( - 'acl_set_permset'); - late final _acl_set_permset = _acl_set_permsetPtr - .asFunction(); + late final ffi.Pointer _kCFPlugInTypesKey = + _lookup('kCFPlugInTypesKey'); - int acl_maximal_permset_mask_np( - ffi.Pointer mask_p, - ) { - return _acl_maximal_permset_mask_np( - mask_p, - ); + CFStringRef get kCFPlugInTypesKey => _kCFPlugInTypesKey.value; + + set kCFPlugInTypesKey(CFStringRef value) => _kCFPlugInTypesKey.value = value; + + int CFPlugInGetTypeID() { + return _CFPlugInGetTypeID(); } - 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 _CFPlugInGetTypeIDPtr = + _lookup>('CFPlugInGetTypeID'); + late final _CFPlugInGetTypeID = + _CFPlugInGetTypeIDPtr.asFunction(); - int acl_get_permset_mask_np( - acl_entry_t entry_d, - ffi.Pointer mask_p, + CFPlugInRef CFPlugInCreate( + CFAllocatorRef allocator, + CFURLRef plugInURL, ) { - return _acl_get_permset_mask_np( - entry_d, - mask_p, + return _CFPlugInCreate( + allocator, + plugInURL, ); } - 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 _CFPlugInCreatePtr = _lookup< + ffi.NativeFunction>( + 'CFPlugInCreate'); + late final _CFPlugInCreate = _CFPlugInCreatePtr.asFunction< + CFPlugInRef Function(CFAllocatorRef, CFURLRef)>(); - int acl_set_permset_mask_np( - acl_entry_t entry_d, - int mask, + CFBundleRef CFPlugInGetBundle( + CFPlugInRef plugIn, ) { - return _acl_set_permset_mask_np( - entry_d, - mask, + return _CFPlugInGetBundle( + plugIn, ); } - 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 _CFPlugInGetBundlePtr = + _lookup>( + 'CFPlugInGetBundle'); + late final _CFPlugInGetBundle = + _CFPlugInGetBundlePtr.asFunction(); - int acl_add_flag_np( - acl_flagset_t flagset_d, + void CFPlugInSetLoadOnDemand( + CFPlugInRef plugIn, int flag, ) { - return _acl_add_flag_np( - flagset_d, + return _CFPlugInSetLoadOnDemand( + plugIn, flag, ); } - late final _acl_add_flag_npPtr = - _lookup>( - 'acl_add_flag_np'); - late final _acl_add_flag_np = - _acl_add_flag_npPtr.asFunction(); + late final _CFPlugInSetLoadOnDemandPtr = + _lookup>( + 'CFPlugInSetLoadOnDemand'); + late final _CFPlugInSetLoadOnDemand = + _CFPlugInSetLoadOnDemandPtr.asFunction(); - int acl_clear_flags_np( - acl_flagset_t flagset_d, + int CFPlugInIsLoadOnDemand( + CFPlugInRef plugIn, ) { - return _acl_clear_flags_np( - flagset_d, + return _CFPlugInIsLoadOnDemand( + plugIn, ); } - late final _acl_clear_flags_npPtr = - _lookup>( - 'acl_clear_flags_np'); - late final _acl_clear_flags_np = - _acl_clear_flags_npPtr.asFunction(); + late final _CFPlugInIsLoadOnDemandPtr = + _lookup>( + 'CFPlugInIsLoadOnDemand'); + late final _CFPlugInIsLoadOnDemand = + _CFPlugInIsLoadOnDemandPtr.asFunction(); - int acl_delete_flag_np( - acl_flagset_t flagset_d, - int flag, + CFArrayRef CFPlugInFindFactoriesForPlugInType( + CFUUIDRef typeUUID, ) { - return _acl_delete_flag_np( - flagset_d, - flag, + return _CFPlugInFindFactoriesForPlugInType( + 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 _CFPlugInFindFactoriesForPlugInTypePtr = + _lookup>( + 'CFPlugInFindFactoriesForPlugInType'); + late final _CFPlugInFindFactoriesForPlugInType = + _CFPlugInFindFactoriesForPlugInTypePtr.asFunction< + CFArrayRef Function(CFUUIDRef)>(); - int acl_get_flag_np( - acl_flagset_t flagset_d, - int flag, + CFArrayRef CFPlugInFindFactoriesForPlugInTypeInPlugIn( + CFUUIDRef typeUUID, + CFPlugInRef plugIn, ) { - return _acl_get_flag_np( - flagset_d, - flag, + return _CFPlugInFindFactoriesForPlugInTypeInPlugIn( + typeUUID, + plugIn, ); } - late final _acl_get_flag_npPtr = - _lookup>( - 'acl_get_flag_np'); - late final _acl_get_flag_np = - _acl_get_flag_npPtr.asFunction(); + late final _CFPlugInFindFactoriesForPlugInTypeInPlugInPtr = + _lookup>( + 'CFPlugInFindFactoriesForPlugInTypeInPlugIn'); + late final _CFPlugInFindFactoriesForPlugInTypeInPlugIn = + _CFPlugInFindFactoriesForPlugInTypeInPlugInPtr.asFunction< + CFArrayRef Function(CFUUIDRef, CFPlugInRef)>(); - int acl_get_flagset_np( - ffi.Pointer obj_p, - ffi.Pointer flagset_p, + ffi.Pointer CFPlugInInstanceCreate( + CFAllocatorRef allocator, + CFUUIDRef factoryUUID, + CFUUIDRef typeUUID, ) { - return _acl_get_flagset_np( - obj_p, - flagset_p, + return _CFPlugInInstanceCreate( + allocator, + factoryUUID, + typeUUID, ); } - late final _acl_get_flagset_npPtr = _lookup< + late final _CFPlugInInstanceCreatePtr = _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.Pointer Function( + CFAllocatorRef, CFUUIDRef, CFUUIDRef)>>('CFPlugInInstanceCreate'); + late final _CFPlugInInstanceCreate = _CFPlugInInstanceCreatePtr.asFunction< + ffi.Pointer Function(CFAllocatorRef, CFUUIDRef, CFUUIDRef)>(); - int acl_set_flagset_np( - ffi.Pointer obj_p, - acl_flagset_t flagset_d, + int CFPlugInRegisterFactoryFunction( + CFUUIDRef factoryUUID, + CFPlugInFactoryFunction func, ) { - return _acl_set_flagset_np( - obj_p, - flagset_d, + return _CFPlugInRegisterFactoryFunction( + factoryUUID, + func, ); } - late final _acl_set_flagset_npPtr = _lookup< + late final _CFPlugInRegisterFactoryFunctionPtr = _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)>(); + Boolean Function(CFUUIDRef, + CFPlugInFactoryFunction)>>('CFPlugInRegisterFactoryFunction'); + late final _CFPlugInRegisterFactoryFunction = + _CFPlugInRegisterFactoryFunctionPtr.asFunction< + int Function(CFUUIDRef, CFPlugInFactoryFunction)>(); - ffi.Pointer acl_get_qualifier( - acl_entry_t entry_d, + int CFPlugInRegisterFactoryFunctionByName( + CFUUIDRef factoryUUID, + CFPlugInRef plugIn, + CFStringRef functionName, ) { - return _acl_get_qualifier( - entry_d, + return _CFPlugInRegisterFactoryFunctionByName( + factoryUUID, + plugIn, + functionName, ); } - 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 _CFPlugInRegisterFactoryFunctionByNamePtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFUUIDRef, CFPlugInRef, + CFStringRef)>>('CFPlugInRegisterFactoryFunctionByName'); + late final _CFPlugInRegisterFactoryFunctionByName = + _CFPlugInRegisterFactoryFunctionByNamePtr.asFunction< + int Function(CFUUIDRef, CFPlugInRef, CFStringRef)>(); - int acl_get_tag_type( - acl_entry_t entry_d, - ffi.Pointer tag_type_p, + int CFPlugInUnregisterFactory( + CFUUIDRef factoryUUID, ) { - return _acl_get_tag_type( - entry_d, - tag_type_p, + return _CFPlugInUnregisterFactory( + factoryUUID, ); } - 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 _CFPlugInUnregisterFactoryPtr = + _lookup>( + 'CFPlugInUnregisterFactory'); + late final _CFPlugInUnregisterFactory = + _CFPlugInUnregisterFactoryPtr.asFunction(); - int acl_set_qualifier( - acl_entry_t entry_d, - ffi.Pointer tag_qualifier_p, + int CFPlugInRegisterPlugInType( + CFUUIDRef factoryUUID, + CFUUIDRef typeUUID, ) { - return _acl_set_qualifier( - entry_d, - tag_qualifier_p, + return _CFPlugInRegisterPlugInType( + factoryUUID, + typeUUID, ); } - 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 _CFPlugInRegisterPlugInTypePtr = + _lookup>( + 'CFPlugInRegisterPlugInType'); + late final _CFPlugInRegisterPlugInType = _CFPlugInRegisterPlugInTypePtr + .asFunction(); - int acl_set_tag_type( - acl_entry_t entry_d, - int tag_type, + int CFPlugInUnregisterPlugInType( + CFUUIDRef factoryUUID, + CFUUIDRef typeUUID, ) { - return _acl_set_tag_type( - entry_d, - tag_type, + return _CFPlugInUnregisterPlugInType( + factoryUUID, + typeUUID, ); } - late final _acl_set_tag_typePtr = - _lookup>( - 'acl_set_tag_type'); - late final _acl_set_tag_type = - _acl_set_tag_typePtr.asFunction(); + late final _CFPlugInUnregisterPlugInTypePtr = + _lookup>( + 'CFPlugInUnregisterPlugInType'); + late final _CFPlugInUnregisterPlugInType = _CFPlugInUnregisterPlugInTypePtr + .asFunction(); - int acl_delete_def_file( - ffi.Pointer path_p, + void CFPlugInAddInstanceForFactory( + CFUUIDRef factoryID, ) { - return _acl_delete_def_file( - path_p, + return _CFPlugInAddInstanceForFactory( + factoryID, ); } - late final _acl_delete_def_filePtr = - _lookup)>>( - 'acl_delete_def_file'); - late final _acl_delete_def_file = - _acl_delete_def_filePtr.asFunction)>(); + late final _CFPlugInAddInstanceForFactoryPtr = + _lookup>( + 'CFPlugInAddInstanceForFactory'); + late final _CFPlugInAddInstanceForFactory = + _CFPlugInAddInstanceForFactoryPtr.asFunction(); - acl_t acl_get_fd( - int fd, + void CFPlugInRemoveInstanceForFactory( + CFUUIDRef factoryID, ) { - return _acl_get_fd( - fd, + return _CFPlugInRemoveInstanceForFactory( + factoryID, ); } - late final _acl_get_fdPtr = - _lookup>('acl_get_fd'); - late final _acl_get_fd = _acl_get_fdPtr.asFunction(); + late final _CFPlugInRemoveInstanceForFactoryPtr = + _lookup>( + 'CFPlugInRemoveInstanceForFactory'); + late final _CFPlugInRemoveInstanceForFactory = + _CFPlugInRemoveInstanceForFactoryPtr.asFunction< + void Function(CFUUIDRef)>(); - acl_t acl_get_fd_np( - int fd, - int type, + int CFPlugInInstanceGetInterfaceFunctionTable( + CFPlugInInstanceRef instance, + CFStringRef interfaceName, + ffi.Pointer> ftbl, ) { - return _acl_get_fd_np( - fd, - type, + return _CFPlugInInstanceGetInterfaceFunctionTable( + instance, + interfaceName, + ftbl, ); } - late final _acl_get_fd_npPtr = - _lookup>( - 'acl_get_fd_np'); - late final _acl_get_fd_np = - _acl_get_fd_npPtr.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>)>(); - acl_t acl_get_file( - ffi.Pointer path_p, - int type, + CFStringRef CFPlugInInstanceGetFactoryName( + CFPlugInInstanceRef instance, ) { - return _acl_get_file( - path_p, - type, + return _CFPlugInInstanceGetFactoryName( + instance, ); } - 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 _CFPlugInInstanceGetFactoryNamePtr = + _lookup>( + 'CFPlugInInstanceGetFactoryName'); + late final _CFPlugInInstanceGetFactoryName = + _CFPlugInInstanceGetFactoryNamePtr.asFunction< + CFStringRef Function(CFPlugInInstanceRef)>(); - acl_t acl_get_link_np( - ffi.Pointer path_p, - int type, + ffi.Pointer CFPlugInInstanceGetInstanceData( + CFPlugInInstanceRef instance, ) { - return _acl_get_link_np( - path_p, - type, + return _CFPlugInInstanceGetInstanceData( + instance, ); } - 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 _CFPlugInInstanceGetInstanceDataPtr = _lookup< + ffi + .NativeFunction Function(CFPlugInInstanceRef)>>( + 'CFPlugInInstanceGetInstanceData'); + late final _CFPlugInInstanceGetInstanceData = + _CFPlugInInstanceGetInstanceDataPtr.asFunction< + ffi.Pointer Function(CFPlugInInstanceRef)>(); - int acl_set_fd( - int fd, - acl_t acl, - ) { - return _acl_set_fd( - fd, - acl, - ); + int CFPlugInInstanceGetTypeID() { + return _CFPlugInInstanceGetTypeID(); } - late final _acl_set_fdPtr = - _lookup>( - 'acl_set_fd'); - late final _acl_set_fd = - _acl_set_fdPtr.asFunction(); + late final _CFPlugInInstanceGetTypeIDPtr = + _lookup>( + 'CFPlugInInstanceGetTypeID'); + late final _CFPlugInInstanceGetTypeID = + _CFPlugInInstanceGetTypeIDPtr.asFunction(); - int acl_set_fd_np( - int fd, - acl_t acl, - int acl_type, + CFPlugInInstanceRef CFPlugInInstanceCreateWithInstanceDataSize( + CFAllocatorRef allocator, + int instanceDataSize, + CFPlugInInstanceDeallocateInstanceDataFunction deallocateInstanceFunction, + CFStringRef factoryName, + CFPlugInInstanceGetInterfaceFunction getInterfaceFunction, ) { - return _acl_set_fd_np( - fd, - acl, - acl_type, + return _CFPlugInInstanceCreateWithInstanceDataSize( + allocator, + instanceDataSize, + deallocateInstanceFunction, + factoryName, + getInterfaceFunction, ); } - late final _acl_set_fd_npPtr = - _lookup>( - 'acl_set_fd_np'); - late final _acl_set_fd_np = - _acl_set_fd_npPtr.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)>(); - int acl_set_file( - ffi.Pointer path_p, - int type, - acl_t acl, + 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 _acl_set_file( - path_p, - type, - acl, + return _CFMachPortCreate( + allocator, + callout, + context, + shouldFreeInfo, ); } - late final _acl_set_filePtr = _lookup< + late final _CFMachPortCreatePtr = _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)>(); + CFMachPortRef Function( + CFAllocatorRef, + CFMachPortCallBack, + ffi.Pointer, + ffi.Pointer)>>('CFMachPortCreate'); + late final _CFMachPortCreate = _CFMachPortCreatePtr.asFunction< + CFMachPortRef Function(CFAllocatorRef, CFMachPortCallBack, + ffi.Pointer, ffi.Pointer)>(); - int acl_set_link_np( - ffi.Pointer path_p, - int type, - acl_t acl, + CFMachPortRef CFMachPortCreateWithPort( + CFAllocatorRef allocator, + int portNum, + CFMachPortCallBack callout, + ffi.Pointer context, + ffi.Pointer shouldFreeInfo, ) { - return _acl_set_link_np( - path_p, - type, - acl, + return _CFMachPortCreateWithPort( + allocator, + portNum, + callout, + context, + shouldFreeInfo, ); } - late final _acl_set_link_npPtr = _lookup< + late final _CFMachPortCreateWithPortPtr = _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)>(); + 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 acl_copy_ext( - ffi.Pointer buf_p, - acl_t acl, - int size, + int CFMachPortGetPort( + CFMachPortRef port, ) { - return _acl_copy_ext( - buf_p, - acl, - size, + return _CFMachPortGetPort( + port, ); } - 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 _CFMachPortGetPortPtr = + _lookup>( + 'CFMachPortGetPort'); + late final _CFMachPortGetPort = + _CFMachPortGetPortPtr.asFunction(); - int acl_copy_ext_native( - ffi.Pointer buf_p, - acl_t acl, - int size, + void CFMachPortGetContext( + CFMachPortRef port, + ffi.Pointer context, ) { - return _acl_copy_ext_native( - buf_p, - acl, - size, + return _CFMachPortGetContext( + port, + context, ); } - late final _acl_copy_ext_nativePtr = _lookup< + late final _CFMachPortGetContextPtr = _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)>(); + ffi.Void Function(CFMachPortRef, + ffi.Pointer)>>('CFMachPortGetContext'); + late final _CFMachPortGetContext = _CFMachPortGetContextPtr.asFunction< + void Function(CFMachPortRef, ffi.Pointer)>(); - acl_t acl_copy_int( - ffi.Pointer buf_p, + void CFMachPortInvalidate( + CFMachPortRef port, ) { - return _acl_copy_int( - buf_p, + return _CFMachPortInvalidate( + port, ); } - late final _acl_copy_intPtr = - _lookup)>>( - 'acl_copy_int'); - late final _acl_copy_int = - _acl_copy_intPtr.asFunction)>(); + late final _CFMachPortInvalidatePtr = + _lookup>( + 'CFMachPortInvalidate'); + late final _CFMachPortInvalidate = + _CFMachPortInvalidatePtr.asFunction(); - acl_t acl_copy_int_native( - ffi.Pointer buf_p, + int CFMachPortIsValid( + CFMachPortRef port, ) { - return _acl_copy_int_native( - buf_p, + return _CFMachPortIsValid( + port, ); } - late final _acl_copy_int_nativePtr = - _lookup)>>( - 'acl_copy_int_native'); - late final _acl_copy_int_native = _acl_copy_int_nativePtr - .asFunction)>(); + late final _CFMachPortIsValidPtr = + _lookup>( + 'CFMachPortIsValid'); + late final _CFMachPortIsValid = + _CFMachPortIsValidPtr.asFunction(); - acl_t acl_from_text( - ffi.Pointer buf_p, + CFMachPortInvalidationCallBack CFMachPortGetInvalidationCallBack( + CFMachPortRef port, ) { - return _acl_from_text( - buf_p, + return _CFMachPortGetInvalidationCallBack( + port, ); } - late final _acl_from_textPtr = - _lookup)>>( - 'acl_from_text'); - late final _acl_from_text = - _acl_from_textPtr.asFunction)>(); + late final _CFMachPortGetInvalidationCallBackPtr = _lookup< + ffi.NativeFunction< + CFMachPortInvalidationCallBack Function( + CFMachPortRef)>>('CFMachPortGetInvalidationCallBack'); + late final _CFMachPortGetInvalidationCallBack = + _CFMachPortGetInvalidationCallBackPtr.asFunction< + CFMachPortInvalidationCallBack Function(CFMachPortRef)>(); - int acl_size( - acl_t acl, + void CFMachPortSetInvalidationCallBack( + CFMachPortRef port, + CFMachPortInvalidationCallBack callout, ) { - return _acl_size( - acl, + return _CFMachPortSetInvalidationCallBack( + port, + callout, ); } - late final _acl_sizePtr = - _lookup>('acl_size'); - late final _acl_size = _acl_sizePtr.asFunction(); + late final _CFMachPortSetInvalidationCallBackPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMachPortRef, CFMachPortInvalidationCallBack)>>( + 'CFMachPortSetInvalidationCallBack'); + late final _CFMachPortSetInvalidationCallBack = + _CFMachPortSetInvalidationCallBackPtr.asFunction< + void Function(CFMachPortRef, CFMachPortInvalidationCallBack)>(); - ffi.Pointer acl_to_text( - acl_t acl, - ffi.Pointer len_p, + CFRunLoopSourceRef CFMachPortCreateRunLoopSource( + CFAllocatorRef allocator, + CFMachPortRef port, + int order, ) { - return _acl_to_text( - acl, - len_p, + return _CFMachPortCreateRunLoopSource( + allocator, + port, + order, ); } - late final _acl_to_textPtr = _lookup< + late final _CFMachPortCreateRunLoopSourcePtr = _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)>(); + CFRunLoopSourceRef Function(CFAllocatorRef, CFMachPortRef, + CFIndex)>>('CFMachPortCreateRunLoopSource'); + late final _CFMachPortCreateRunLoopSource = + _CFMachPortCreateRunLoopSourcePtr.asFunction< + CFRunLoopSourceRef Function(CFAllocatorRef, CFMachPortRef, int)>(); - int CFFileSecurityGetTypeID() { - return _CFFileSecurityGetTypeID(); + int CFAttributedStringGetTypeID() { + return _CFAttributedStringGetTypeID(); } - late final _CFFileSecurityGetTypeIDPtr = + late final _CFAttributedStringGetTypeIDPtr = _lookup>( - 'CFFileSecurityGetTypeID'); - late final _CFFileSecurityGetTypeID = - _CFFileSecurityGetTypeIDPtr.asFunction(); + 'CFAttributedStringGetTypeID'); + late final _CFAttributedStringGetTypeID = + _CFAttributedStringGetTypeIDPtr.asFunction(); - CFFileSecurityRef CFFileSecurityCreate( - CFAllocatorRef allocator, + CFAttributedStringRef CFAttributedStringCreate( + CFAllocatorRef alloc, + CFStringRef str, + CFDictionaryRef attributes, ) { - return _CFFileSecurityCreate( - allocator, + return _CFAttributedStringCreate( + alloc, + str, + attributes, ); } - late final _CFFileSecurityCreatePtr = - _lookup>( - 'CFFileSecurityCreate'); - late final _CFFileSecurityCreate = _CFFileSecurityCreatePtr.asFunction< - CFFileSecurityRef Function(CFAllocatorRef)>(); + late final _CFAttributedStringCreatePtr = _lookup< + ffi.NativeFunction< + CFAttributedStringRef Function(CFAllocatorRef, CFStringRef, + CFDictionaryRef)>>('CFAttributedStringCreate'); + late final _CFAttributedStringCreate = + _CFAttributedStringCreatePtr.asFunction< + CFAttributedStringRef Function( + CFAllocatorRef, CFStringRef, CFDictionaryRef)>(); - CFFileSecurityRef CFFileSecurityCreateCopy( - CFAllocatorRef allocator, - CFFileSecurityRef fileSec, + CFAttributedStringRef CFAttributedStringCreateWithSubstring( + CFAllocatorRef alloc, + CFAttributedStringRef aStr, + CFRange range, ) { - return _CFFileSecurityCreateCopy( - allocator, - fileSec, + return _CFAttributedStringCreateWithSubstring( + alloc, + aStr, + range, ); } - late final _CFFileSecurityCreateCopyPtr = _lookup< + late final _CFAttributedStringCreateWithSubstringPtr = _lookup< ffi.NativeFunction< - CFFileSecurityRef Function( - CFAllocatorRef, CFFileSecurityRef)>>('CFFileSecurityCreateCopy'); - late final _CFFileSecurityCreateCopy = - _CFFileSecurityCreateCopyPtr.asFunction< - CFFileSecurityRef Function(CFAllocatorRef, CFFileSecurityRef)>(); + CFAttributedStringRef Function(CFAllocatorRef, CFAttributedStringRef, + CFRange)>>('CFAttributedStringCreateWithSubstring'); + late final _CFAttributedStringCreateWithSubstring = + _CFAttributedStringCreateWithSubstringPtr.asFunction< + CFAttributedStringRef Function( + CFAllocatorRef, CFAttributedStringRef, CFRange)>(); - int CFFileSecurityCopyOwnerUUID( - CFFileSecurityRef fileSec, - ffi.Pointer ownerUUID, + CFAttributedStringRef CFAttributedStringCreateCopy( + CFAllocatorRef alloc, + CFAttributedStringRef aStr, ) { - return _CFFileSecurityCopyOwnerUUID( - fileSec, - ownerUUID, + return _CFAttributedStringCreateCopy( + alloc, + aStr, ); } - late final _CFFileSecurityCopyOwnerUUIDPtr = _lookup< + late final _CFAttributedStringCreateCopyPtr = _lookup< ffi.NativeFunction< - Boolean Function(CFFileSecurityRef, - ffi.Pointer)>>('CFFileSecurityCopyOwnerUUID'); - late final _CFFileSecurityCopyOwnerUUID = _CFFileSecurityCopyOwnerUUIDPtr - .asFunction)>(); + CFAttributedStringRef Function(CFAllocatorRef, + CFAttributedStringRef)>>('CFAttributedStringCreateCopy'); + late final _CFAttributedStringCreateCopy = + _CFAttributedStringCreateCopyPtr.asFunction< + CFAttributedStringRef Function( + CFAllocatorRef, CFAttributedStringRef)>(); - int CFFileSecuritySetOwnerUUID( - CFFileSecurityRef fileSec, - CFUUIDRef ownerUUID, + CFStringRef CFAttributedStringGetString( + CFAttributedStringRef aStr, ) { - return _CFFileSecuritySetOwnerUUID( - fileSec, - ownerUUID, + return _CFAttributedStringGetString( + aStr, ); } - late final _CFFileSecuritySetOwnerUUIDPtr = _lookup< - ffi.NativeFunction>( - 'CFFileSecuritySetOwnerUUID'); - late final _CFFileSecuritySetOwnerUUID = _CFFileSecuritySetOwnerUUIDPtr - .asFunction(); + late final _CFAttributedStringGetStringPtr = + _lookup>( + 'CFAttributedStringGetString'); + late final _CFAttributedStringGetString = _CFAttributedStringGetStringPtr + .asFunction(); - int CFFileSecurityCopyGroupUUID( - CFFileSecurityRef fileSec, - ffi.Pointer groupUUID, + int CFAttributedStringGetLength( + CFAttributedStringRef aStr, ) { - return _CFFileSecurityCopyGroupUUID( - fileSec, - groupUUID, + return _CFAttributedStringGetLength( + aStr, ); } - late final _CFFileSecurityCopyGroupUUIDPtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFFileSecurityRef, - ffi.Pointer)>>('CFFileSecurityCopyGroupUUID'); - late final _CFFileSecurityCopyGroupUUID = _CFFileSecurityCopyGroupUUIDPtr - .asFunction)>(); + late final _CFAttributedStringGetLengthPtr = + _lookup>( + 'CFAttributedStringGetLength'); + late final _CFAttributedStringGetLength = _CFAttributedStringGetLengthPtr + .asFunction(); - int CFFileSecuritySetGroupUUID( - CFFileSecurityRef fileSec, - CFUUIDRef groupUUID, + CFDictionaryRef CFAttributedStringGetAttributes( + CFAttributedStringRef aStr, + int loc, + ffi.Pointer effectiveRange, ) { - return _CFFileSecuritySetGroupUUID( - fileSec, - groupUUID, + return _CFAttributedStringGetAttributes( + aStr, + loc, + effectiveRange, ); } - late final _CFFileSecuritySetGroupUUIDPtr = _lookup< - ffi.NativeFunction>( - 'CFFileSecuritySetGroupUUID'); - late final _CFFileSecuritySetGroupUUID = _CFFileSecuritySetGroupUUIDPtr - .asFunction(); + late final _CFAttributedStringGetAttributesPtr = _lookup< + ffi.NativeFunction< + CFDictionaryRef Function(CFAttributedStringRef, CFIndex, + ffi.Pointer)>>('CFAttributedStringGetAttributes'); + late final _CFAttributedStringGetAttributes = + _CFAttributedStringGetAttributesPtr.asFunction< + CFDictionaryRef Function( + CFAttributedStringRef, int, ffi.Pointer)>(); - int CFFileSecurityCopyAccessControlList( - CFFileSecurityRef fileSec, - ffi.Pointer accessControlList, + CFTypeRef CFAttributedStringGetAttribute( + CFAttributedStringRef aStr, + int loc, + CFStringRef attrName, + ffi.Pointer effectiveRange, ) { - return _CFFileSecurityCopyAccessControlList( - fileSec, - accessControlList, + return _CFAttributedStringGetAttribute( + aStr, + loc, + attrName, + effectiveRange, ); } - late final _CFFileSecurityCopyAccessControlListPtr = _lookup< + late final _CFAttributedStringGetAttributePtr = _lookup< ffi.NativeFunction< - Boolean Function(CFFileSecurityRef, - ffi.Pointer)>>('CFFileSecurityCopyAccessControlList'); - late final _CFFileSecurityCopyAccessControlList = - _CFFileSecurityCopyAccessControlListPtr.asFunction< - int Function(CFFileSecurityRef, ffi.Pointer)>(); + CFTypeRef Function(CFAttributedStringRef, CFIndex, CFStringRef, + ffi.Pointer)>>('CFAttributedStringGetAttribute'); + late final _CFAttributedStringGetAttribute = + _CFAttributedStringGetAttributePtr.asFunction< + CFTypeRef Function( + CFAttributedStringRef, int, CFStringRef, ffi.Pointer)>(); - int CFFileSecuritySetAccessControlList( - CFFileSecurityRef fileSec, - acl_t accessControlList, + CFDictionaryRef CFAttributedStringGetAttributesAndLongestEffectiveRange( + CFAttributedStringRef aStr, + int loc, + CFRange inRange, + ffi.Pointer longestEffectiveRange, ) { - return _CFFileSecuritySetAccessControlList( - fileSec, - accessControlList, + return _CFAttributedStringGetAttributesAndLongestEffectiveRange( + aStr, + loc, + inRange, + longestEffectiveRange, ); } - late final _CFFileSecuritySetAccessControlListPtr = - _lookup>( - 'CFFileSecuritySetAccessControlList'); - late final _CFFileSecuritySetAccessControlList = - _CFFileSecuritySetAccessControlListPtr.asFunction< - int Function(CFFileSecurityRef, acl_t)>(); + 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 CFFileSecurityGetOwner( - CFFileSecurityRef fileSec, - ffi.Pointer owner, + CFTypeRef CFAttributedStringGetAttributeAndLongestEffectiveRange( + CFAttributedStringRef aStr, + int loc, + CFStringRef attrName, + CFRange inRange, + ffi.Pointer longestEffectiveRange, ) { - 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, + return _CFAttributedStringGetAttributeAndLongestEffectiveRange( + aStr, + loc, + attrName, + inRange, + longestEffectiveRange, ); } - late final _CFFileSecuritySetOwnerPtr = - _lookup>( - 'CFFileSecuritySetOwner'); - late final _CFFileSecuritySetOwner = _CFFileSecuritySetOwnerPtr.asFunction< - int Function(CFFileSecurityRef, int)>(); + 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 CFFileSecurityGetGroup( - CFFileSecurityRef fileSec, - ffi.Pointer group, + CFMutableAttributedStringRef CFAttributedStringCreateMutableCopy( + CFAllocatorRef alloc, + int maxLength, + CFAttributedStringRef aStr, ) { - return _CFFileSecurityGetGroup( - fileSec, - group, + return _CFAttributedStringCreateMutableCopy( + alloc, + maxLength, + aStr, ); } - late final _CFFileSecurityGetGroupPtr = _lookup< + late final _CFAttributedStringCreateMutableCopyPtr = _lookup< ffi.NativeFunction< - Boolean Function(CFFileSecurityRef, - ffi.Pointer)>>('CFFileSecurityGetGroup'); - late final _CFFileSecurityGetGroup = _CFFileSecurityGetGroupPtr.asFunction< - int Function(CFFileSecurityRef, ffi.Pointer)>(); + CFMutableAttributedStringRef Function(CFAllocatorRef, CFIndex, + CFAttributedStringRef)>>('CFAttributedStringCreateMutableCopy'); + late final _CFAttributedStringCreateMutableCopy = + _CFAttributedStringCreateMutableCopyPtr.asFunction< + CFMutableAttributedStringRef Function( + CFAllocatorRef, int, CFAttributedStringRef)>(); - int CFFileSecuritySetGroup( - CFFileSecurityRef fileSec, - int group, + CFMutableAttributedStringRef CFAttributedStringCreateMutable( + CFAllocatorRef alloc, + int maxLength, ) { - return _CFFileSecuritySetGroup( - fileSec, - group, + return _CFAttributedStringCreateMutable( + alloc, + maxLength, ); } - late final _CFFileSecuritySetGroupPtr = - _lookup>( - 'CFFileSecuritySetGroup'); - late final _CFFileSecuritySetGroup = _CFFileSecuritySetGroupPtr.asFunction< - int Function(CFFileSecurityRef, int)>(); + late final _CFAttributedStringCreateMutablePtr = _lookup< + ffi.NativeFunction< + CFMutableAttributedStringRef Function( + CFAllocatorRef, CFIndex)>>('CFAttributedStringCreateMutable'); + late final _CFAttributedStringCreateMutable = + _CFAttributedStringCreateMutablePtr.asFunction< + CFMutableAttributedStringRef Function(CFAllocatorRef, int)>(); - int CFFileSecurityGetMode( - CFFileSecurityRef fileSec, - ffi.Pointer mode, + void CFAttributedStringReplaceString( + CFMutableAttributedStringRef aStr, + CFRange range, + CFStringRef replacement, ) { - return _CFFileSecurityGetMode( - fileSec, - mode, + return _CFAttributedStringReplaceString( + aStr, + range, + replacement, ); } - late final _CFFileSecurityGetModePtr = _lookup< + late final _CFAttributedStringReplaceStringPtr = _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)>>('CFAttributedStringReplaceString'); + late final _CFAttributedStringReplaceString = + _CFAttributedStringReplaceStringPtr.asFunction< + void Function(CFMutableAttributedStringRef, CFRange, CFStringRef)>(); - int CFFileSecuritySetMode( - CFFileSecurityRef fileSec, - int mode, + CFMutableStringRef CFAttributedStringGetMutableString( + CFMutableAttributedStringRef aStr, ) { - return _CFFileSecuritySetMode( - fileSec, - mode, + return _CFAttributedStringGetMutableString( + aStr, ); } - late final _CFFileSecuritySetModePtr = - _lookup>( - 'CFFileSecuritySetMode'); - late final _CFFileSecuritySetMode = _CFFileSecuritySetModePtr.asFunction< - int Function(CFFileSecurityRef, int)>(); + late final _CFAttributedStringGetMutableStringPtr = _lookup< + ffi.NativeFunction< + CFMutableStringRef Function(CFMutableAttributedStringRef)>>( + 'CFAttributedStringGetMutableString'); + late final _CFAttributedStringGetMutableString = + _CFAttributedStringGetMutableStringPtr.asFunction< + CFMutableStringRef Function(CFMutableAttributedStringRef)>(); - int CFFileSecurityClearProperties( - CFFileSecurityRef fileSec, - int clearPropertyMask, + void CFAttributedStringSetAttributes( + CFMutableAttributedStringRef aStr, + CFRange range, + CFDictionaryRef replacement, + int clearOtherAttributes, ) { - return _CFFileSecurityClearProperties( - fileSec, - clearPropertyMask, + return _CFAttributedStringSetAttributes( + aStr, + range, + replacement, + clearOtherAttributes, ); } - late final _CFFileSecurityClearPropertiesPtr = _lookup< - ffi.NativeFunction>( - 'CFFileSecurityClearProperties'); - late final _CFFileSecurityClearProperties = _CFFileSecurityClearPropertiesPtr - .asFunction(); + 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)>(); - CFStringRef CFStringTokenizerCopyBestStringLanguage( - CFStringRef string, + void CFAttributedStringSetAttribute( + CFMutableAttributedStringRef aStr, CFRange range, + CFStringRef attrName, + CFTypeRef value, ) { - return _CFStringTokenizerCopyBestStringLanguage( - string, + return _CFAttributedStringSetAttribute( + aStr, range, + attrName, + value, ); } - 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 _CFAttributedStringSetAttributePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableAttributedStringRef, CFRange, CFStringRef, + CFTypeRef)>>('CFAttributedStringSetAttribute'); + late final _CFAttributedStringSetAttribute = + _CFAttributedStringSetAttributePtr.asFunction< + void Function( + CFMutableAttributedStringRef, CFRange, CFStringRef, CFTypeRef)>(); - CFStringTokenizerRef CFStringTokenizerCreate( - CFAllocatorRef alloc, - CFStringRef string, + void CFAttributedStringRemoveAttribute( + CFMutableAttributedStringRef aStr, CFRange range, - int options, - CFLocaleRef locale, + CFStringRef attrName, ) { - return _CFStringTokenizerCreate( - alloc, - string, + return _CFAttributedStringRemoveAttribute( + aStr, range, - options, - locale, + attrName, ); } - late final _CFStringTokenizerCreatePtr = _lookup< + late final _CFAttributedStringRemoveAttributePtr = _lookup< ffi.NativeFunction< - CFStringTokenizerRef Function(CFAllocatorRef, CFStringRef, CFRange, - CFOptionFlags, CFLocaleRef)>>('CFStringTokenizerCreate'); - late final _CFStringTokenizerCreate = _CFStringTokenizerCreatePtr.asFunction< - CFStringTokenizerRef Function( - CFAllocatorRef, CFStringRef, CFRange, int, CFLocaleRef)>(); + ffi.Void Function(CFMutableAttributedStringRef, CFRange, + CFStringRef)>>('CFAttributedStringRemoveAttribute'); + late final _CFAttributedStringRemoveAttribute = + _CFAttributedStringRemoveAttributePtr.asFunction< + void Function(CFMutableAttributedStringRef, CFRange, CFStringRef)>(); - void CFStringTokenizerSetString( - CFStringTokenizerRef tokenizer, - CFStringRef string, + void CFAttributedStringReplaceAttributedString( + CFMutableAttributedStringRef aStr, CFRange range, + CFAttributedStringRef replacement, ) { - return _CFStringTokenizerSetString( - tokenizer, - string, + return _CFAttributedStringReplaceAttributedString( + aStr, range, + replacement, ); } - late final _CFStringTokenizerSetStringPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFStringTokenizerRef, CFStringRef, - CFRange)>>('CFStringTokenizerSetString'); - late final _CFStringTokenizerSetString = _CFStringTokenizerSetStringPtr - .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 CFStringTokenizerGoToTokenAtIndex( - CFStringTokenizerRef tokenizer, - int index, + void CFAttributedStringBeginEditing( + CFMutableAttributedStringRef aStr, ) { - return _CFStringTokenizerGoToTokenAtIndex( - tokenizer, - index, + return _CFAttributedStringBeginEditing( + aStr, ); } - late final _CFStringTokenizerGoToTokenAtIndexPtr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function(CFStringTokenizerRef, - CFIndex)>>('CFStringTokenizerGoToTokenAtIndex'); - late final _CFStringTokenizerGoToTokenAtIndex = - _CFStringTokenizerGoToTokenAtIndexPtr.asFunction< - int Function(CFStringTokenizerRef, int)>(); + late final _CFAttributedStringBeginEditingPtr = _lookup< + ffi.NativeFunction>( + 'CFAttributedStringBeginEditing'); + late final _CFAttributedStringBeginEditing = + _CFAttributedStringBeginEditingPtr.asFunction< + void Function(CFMutableAttributedStringRef)>(); - int CFStringTokenizerAdvanceToNextToken( - CFStringTokenizerRef tokenizer, + void CFAttributedStringEndEditing( + CFMutableAttributedStringRef aStr, ) { - return _CFStringTokenizerAdvanceToNextToken( - tokenizer, + return _CFAttributedStringEndEditing( + aStr, ); } - late final _CFStringTokenizerAdvanceToNextTokenPtr = - _lookup>( - 'CFStringTokenizerAdvanceToNextToken'); - late final _CFStringTokenizerAdvanceToNextToken = - _CFStringTokenizerAdvanceToNextTokenPtr.asFunction< - int Function(CFStringTokenizerRef)>(); + late final _CFAttributedStringEndEditingPtr = _lookup< + ffi.NativeFunction>( + 'CFAttributedStringEndEditing'); + late final _CFAttributedStringEndEditing = _CFAttributedStringEndEditingPtr + .asFunction(); - CFRange CFStringTokenizerGetCurrentTokenRange( - CFStringTokenizerRef tokenizer, - ) { - return _CFStringTokenizerGetCurrentTokenRange( - tokenizer, - ); + int CFURLEnumeratorGetTypeID() { + return _CFURLEnumeratorGetTypeID(); } - late final _CFStringTokenizerGetCurrentTokenRangePtr = - _lookup>( - 'CFStringTokenizerGetCurrentTokenRange'); - late final _CFStringTokenizerGetCurrentTokenRange = - _CFStringTokenizerGetCurrentTokenRangePtr.asFunction< - CFRange Function(CFStringTokenizerRef)>(); + late final _CFURLEnumeratorGetTypeIDPtr = + _lookup>( + 'CFURLEnumeratorGetTypeID'); + late final _CFURLEnumeratorGetTypeID = + _CFURLEnumeratorGetTypeIDPtr.asFunction(); - CFTypeRef CFStringTokenizerCopyCurrentTokenAttribute( - CFStringTokenizerRef tokenizer, - int attribute, + CFURLEnumeratorRef CFURLEnumeratorCreateForDirectoryURL( + CFAllocatorRef alloc, + CFURLRef directoryURL, + int option, + CFArrayRef propertyKeys, ) { - return _CFStringTokenizerCopyCurrentTokenAttribute( - tokenizer, - attribute, + return _CFURLEnumeratorCreateForDirectoryURL( + alloc, + directoryURL, + option, + propertyKeys, ); } - late final _CFStringTokenizerCopyCurrentTokenAttributePtr = _lookup< + late final _CFURLEnumeratorCreateForDirectoryURLPtr = _lookup< ffi.NativeFunction< - CFTypeRef Function(CFStringTokenizerRef, - CFOptionFlags)>>('CFStringTokenizerCopyCurrentTokenAttribute'); - late final _CFStringTokenizerCopyCurrentTokenAttribute = - _CFStringTokenizerCopyCurrentTokenAttributePtr.asFunction< - CFTypeRef Function(CFStringTokenizerRef, int)>(); + CFURLEnumeratorRef Function(CFAllocatorRef, CFURLRef, ffi.Int32, + CFArrayRef)>>('CFURLEnumeratorCreateForDirectoryURL'); + late final _CFURLEnumeratorCreateForDirectoryURL = + _CFURLEnumeratorCreateForDirectoryURLPtr.asFunction< + CFURLEnumeratorRef Function( + CFAllocatorRef, CFURLRef, int, CFArrayRef)>(); - int CFStringTokenizerGetCurrentSubTokens( - CFStringTokenizerRef tokenizer, - ffi.Pointer ranges, - int maxRangeLength, - CFMutableArrayRef derivedSubTokens, + CFURLEnumeratorRef CFURLEnumeratorCreateForMountedVolumes( + CFAllocatorRef alloc, + int option, + CFArrayRef propertyKeys, ) { - return _CFStringTokenizerGetCurrentSubTokens( - tokenizer, - ranges, - maxRangeLength, - derivedSubTokens, + return _CFURLEnumeratorCreateForMountedVolumes( + alloc, + option, + propertyKeys, ); } - late final _CFStringTokenizerGetCurrentSubTokensPtr = _lookup< + late final _CFURLEnumeratorCreateForMountedVolumesPtr = _lookup< ffi.NativeFunction< - CFIndex Function(CFStringTokenizerRef, ffi.Pointer, CFIndex, - CFMutableArrayRef)>>('CFStringTokenizerGetCurrentSubTokens'); - late final _CFStringTokenizerGetCurrentSubTokens = - _CFStringTokenizerGetCurrentSubTokensPtr.asFunction< - int Function(CFStringTokenizerRef, ffi.Pointer, int, - CFMutableArrayRef)>(); + CFURLEnumeratorRef Function(CFAllocatorRef, ffi.Int32, + CFArrayRef)>>('CFURLEnumeratorCreateForMountedVolumes'); + late final _CFURLEnumeratorCreateForMountedVolumes = + _CFURLEnumeratorCreateForMountedVolumesPtr.asFunction< + CFURLEnumeratorRef Function(CFAllocatorRef, int, CFArrayRef)>(); - int CFFileDescriptorGetTypeID() { - return _CFFileDescriptorGetTypeID(); + int CFURLEnumeratorGetNextURL( + CFURLEnumeratorRef enumerator, + ffi.Pointer url, + ffi.Pointer error, + ) { + return _CFURLEnumeratorGetNextURL( + enumerator, + url, + error, + ); } - late final _CFFileDescriptorGetTypeIDPtr = - _lookup>( - 'CFFileDescriptorGetTypeID'); - late final _CFFileDescriptorGetTypeID = - _CFFileDescriptorGetTypeIDPtr.asFunction(); + 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)>(); - CFFileDescriptorRef CFFileDescriptorCreate( - CFAllocatorRef allocator, - int fd, - int closeOnInvalidate, - CFFileDescriptorCallBack callout, - ffi.Pointer context, + void CFURLEnumeratorSkipDescendents( + CFURLEnumeratorRef enumerator, ) { - return _CFFileDescriptorCreate( - allocator, - fd, - closeOnInvalidate, - callout, - context, + return _CFURLEnumeratorSkipDescendents( + enumerator, ); } - 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 _CFURLEnumeratorSkipDescendentsPtr = + _lookup>( + 'CFURLEnumeratorSkipDescendents'); + late final _CFURLEnumeratorSkipDescendents = + _CFURLEnumeratorSkipDescendentsPtr.asFunction< + void Function(CFURLEnumeratorRef)>(); - int CFFileDescriptorGetNativeDescriptor( - CFFileDescriptorRef f, + int CFURLEnumeratorGetDescendentLevel( + CFURLEnumeratorRef enumerator, ) { - return _CFFileDescriptorGetNativeDescriptor( - f, + return _CFURLEnumeratorGetDescendentLevel( + enumerator, ); } - late final _CFFileDescriptorGetNativeDescriptorPtr = _lookup< - ffi.NativeFunction< - CFFileDescriptorNativeDescriptor Function( - CFFileDescriptorRef)>>('CFFileDescriptorGetNativeDescriptor'); - late final _CFFileDescriptorGetNativeDescriptor = - _CFFileDescriptorGetNativeDescriptorPtr.asFunction< - int Function(CFFileDescriptorRef)>(); + late final _CFURLEnumeratorGetDescendentLevelPtr = + _lookup>( + 'CFURLEnumeratorGetDescendentLevel'); + late final _CFURLEnumeratorGetDescendentLevel = + _CFURLEnumeratorGetDescendentLevelPtr.asFunction< + int Function(CFURLEnumeratorRef)>(); - void CFFileDescriptorGetContext( - CFFileDescriptorRef f, - ffi.Pointer context, + int CFURLEnumeratorGetSourceDidChange( + CFURLEnumeratorRef enumerator, ) { - return _CFFileDescriptorGetContext( - f, - context, + return _CFURLEnumeratorGetSourceDidChange( + enumerator, ); } - 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 _CFURLEnumeratorGetSourceDidChangePtr = + _lookup>( + 'CFURLEnumeratorGetSourceDidChange'); + late final _CFURLEnumeratorGetSourceDidChange = + _CFURLEnumeratorGetSourceDidChangePtr.asFunction< + int Function(CFURLEnumeratorRef)>(); - void CFFileDescriptorEnableCallBacks( - CFFileDescriptorRef f, - int callBackTypes, + acl_t acl_dup( + acl_t acl, ) { - return _CFFileDescriptorEnableCallBacks( - f, - callBackTypes, + return _acl_dup( + acl, ); } - late final _CFFileDescriptorEnableCallBacksPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFFileDescriptorRef, - CFOptionFlags)>>('CFFileDescriptorEnableCallBacks'); - late final _CFFileDescriptorEnableCallBacks = - _CFFileDescriptorEnableCallBacksPtr.asFunction< - void Function(CFFileDescriptorRef, int)>(); + late final _acl_dupPtr = + _lookup>('acl_dup'); + late final _acl_dup = _acl_dupPtr.asFunction(); - void CFFileDescriptorDisableCallBacks( - CFFileDescriptorRef f, - int callBackTypes, + int acl_free( + ffi.Pointer obj_p, ) { - return _CFFileDescriptorDisableCallBacks( - f, - callBackTypes, + return _acl_free( + obj_p, ); } - late final _CFFileDescriptorDisableCallBacksPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFFileDescriptorRef, - CFOptionFlags)>>('CFFileDescriptorDisableCallBacks'); - late final _CFFileDescriptorDisableCallBacks = - _CFFileDescriptorDisableCallBacksPtr.asFunction< - void Function(CFFileDescriptorRef, int)>(); + late final _acl_freePtr = + _lookup)>>( + 'acl_free'); + late final _acl_free = + _acl_freePtr.asFunction)>(); - void CFFileDescriptorInvalidate( - CFFileDescriptorRef f, + acl_t acl_init( + int count, ) { - return _CFFileDescriptorInvalidate( - f, + return _acl_init( + count, ); } - late final _CFFileDescriptorInvalidatePtr = - _lookup>( - 'CFFileDescriptorInvalidate'); - late final _CFFileDescriptorInvalidate = _CFFileDescriptorInvalidatePtr - .asFunction(); + late final _acl_initPtr = + _lookup>('acl_init'); + late final _acl_init = _acl_initPtr.asFunction(); - int CFFileDescriptorIsValid( - CFFileDescriptorRef f, + int acl_copy_entry( + acl_entry_t dest_d, + acl_entry_t src_d, ) { - return _CFFileDescriptorIsValid( - f, + return _acl_copy_entry( + dest_d, + src_d, ); } - late final _CFFileDescriptorIsValidPtr = - _lookup>( - 'CFFileDescriptorIsValid'); - late final _CFFileDescriptorIsValid = _CFFileDescriptorIsValidPtr.asFunction< - int Function(CFFileDescriptorRef)>(); + late final _acl_copy_entryPtr = + _lookup>( + 'acl_copy_entry'); + late final _acl_copy_entry = + _acl_copy_entryPtr.asFunction(); - CFRunLoopSourceRef CFFileDescriptorCreateRunLoopSource( - CFAllocatorRef allocator, - CFFileDescriptorRef f, - int order, + int acl_create_entry( + ffi.Pointer acl_p, + ffi.Pointer entry_p, ) { - return _CFFileDescriptorCreateRunLoopSource( - allocator, - f, - order, + return _acl_create_entry( + acl_p, + entry_p, ); } - late final _CFFileDescriptorCreateRunLoopSourcePtr = _lookup< + late final _acl_create_entryPtr = _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(); + ffi.Int Function(ffi.Pointer, + ffi.Pointer)>>('acl_create_entry'); + late final _acl_create_entry = _acl_create_entryPtr + .asFunction, ffi.Pointer)>(); - CFUserNotificationRef CFUserNotificationCreate( - CFAllocatorRef allocator, - double timeout, - int flags, - ffi.Pointer error, - CFDictionaryRef dictionary, + int acl_create_entry_np( + ffi.Pointer acl_p, + ffi.Pointer entry_p, + int entry_index, ) { - return _CFUserNotificationCreate( - allocator, - timeout, - flags, - error, - dictionary, + return _acl_create_entry_np( + acl_p, + entry_p, + entry_index, ); } - late final _CFUserNotificationCreatePtr = _lookup< + late final _acl_create_entry_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.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 CFUserNotificationReceiveResponse( - CFUserNotificationRef userNotification, - double timeout, - ffi.Pointer responseFlags, + int acl_delete_entry( + acl_t acl, + acl_entry_t entry_d, ) { - return _CFUserNotificationReceiveResponse( - userNotification, - timeout, - responseFlags, + return _acl_delete_entry( + acl, + entry_d, ); } - 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_delete_entryPtr = + _lookup>( + 'acl_delete_entry'); + late final _acl_delete_entry = + _acl_delete_entryPtr.asFunction(); - CFStringRef CFUserNotificationGetResponseValue( - CFUserNotificationRef userNotification, - CFStringRef key, - int idx, + int acl_get_entry( + acl_t acl, + int entry_id, + ffi.Pointer entry_p, ) { - return _CFUserNotificationGetResponseValue( - userNotification, - key, - idx, + return _acl_get_entry( + acl, + entry_id, + entry_p, ); } - late final _CFUserNotificationGetResponseValuePtr = _lookup< + late final _acl_get_entryPtr = _lookup< ffi.NativeFunction< - CFStringRef Function(CFUserNotificationRef, CFStringRef, - CFIndex)>>('CFUserNotificationGetResponseValue'); - late final _CFUserNotificationGetResponseValue = - _CFUserNotificationGetResponseValuePtr.asFunction< - CFStringRef Function(CFUserNotificationRef, CFStringRef, int)>(); + ffi.Int Function( + acl_t, ffi.Int, ffi.Pointer)>>('acl_get_entry'); + late final _acl_get_entry = _acl_get_entryPtr + .asFunction)>(); - CFDictionaryRef CFUserNotificationGetResponseDictionary( - CFUserNotificationRef userNotification, + int acl_valid( + acl_t acl, ) { - return _CFUserNotificationGetResponseDictionary( - userNotification, + return _acl_valid( + acl, ); } - late final _CFUserNotificationGetResponseDictionaryPtr = _lookup< - ffi.NativeFunction>( - 'CFUserNotificationGetResponseDictionary'); - late final _CFUserNotificationGetResponseDictionary = - _CFUserNotificationGetResponseDictionaryPtr.asFunction< - CFDictionaryRef Function(CFUserNotificationRef)>(); + late final _acl_validPtr = + _lookup>('acl_valid'); + late final _acl_valid = _acl_validPtr.asFunction(); - int CFUserNotificationUpdate( - CFUserNotificationRef userNotification, - double timeout, - int flags, - CFDictionaryRef dictionary, + int acl_valid_fd_np( + int fd, + int type, + acl_t acl, ) { - return _CFUserNotificationUpdate( - userNotification, - timeout, - flags, - dictionary, + return _acl_valid_fd_np( + fd, + type, + 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_valid_fd_npPtr = + _lookup>( + 'acl_valid_fd_np'); + late final _acl_valid_fd_np = + _acl_valid_fd_npPtr.asFunction(); - int CFUserNotificationCancel( - CFUserNotificationRef userNotification, + int acl_valid_file_np( + ffi.Pointer path, + int type, + acl_t acl, ) { - return _CFUserNotificationCancel( - userNotification, + return _acl_valid_file_np( + path, + type, + acl, ); } - late final _CFUserNotificationCancelPtr = - _lookup>( - 'CFUserNotificationCancel'); - late final _CFUserNotificationCancel = _CFUserNotificationCancelPtr - .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)>(); - CFRunLoopSourceRef CFUserNotificationCreateRunLoopSource( - CFAllocatorRef allocator, - CFUserNotificationRef userNotification, - CFUserNotificationCallBack callout, - int order, + int acl_valid_link_np( + ffi.Pointer path, + int type, + acl_t acl, ) { - return _CFUserNotificationCreateRunLoopSource( - allocator, - userNotification, - callout, - order, + return _acl_valid_link_np( + path, + type, + acl, ); } - late final _CFUserNotificationCreateRunLoopSourcePtr = _lookup< + late final _acl_valid_link_npPtr = _lookup< ffi.NativeFunction< - CFRunLoopSourceRef Function( - CFAllocatorRef, - CFUserNotificationRef, - CFUserNotificationCallBack, - CFIndex)>>('CFUserNotificationCreateRunLoopSource'); - late final _CFUserNotificationCreateRunLoopSource = - _CFUserNotificationCreateRunLoopSourcePtr.asFunction< - CFRunLoopSourceRef Function(CFAllocatorRef, CFUserNotificationRef, - CFUserNotificationCallBack, int)>(); + 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 CFUserNotificationDisplayNotice( - double timeout, - int flags, - CFURLRef iconURL, - CFURLRef soundURL, - CFURLRef localizationURL, - CFStringRef alertHeader, - CFStringRef alertMessage, - CFStringRef defaultButtonTitle, + int acl_add_perm( + acl_permset_t permset_d, + int perm, ) { - return _CFUserNotificationDisplayNotice( - timeout, - flags, - iconURL, - soundURL, - localizationURL, - alertHeader, - alertMessage, - defaultButtonTitle, + return _acl_add_perm( + permset_d, + perm, ); } - 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_add_permPtr = + _lookup>( + 'acl_add_perm'); + late final _acl_add_perm = + _acl_add_permPtr.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_calc_mask( + ffi.Pointer acl_p, ) { - return _CFUserNotificationDisplayAlert( - timeout, - flags, - iconURL, - soundURL, - localizationURL, - alertHeader, - alertMessage, - defaultButtonTitle, - alternateButtonTitle, - otherButtonTitle, - responseFlags, + return _acl_calc_mask( + acl_p, ); } - 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 _acl_calc_maskPtr = + _lookup)>>( + 'acl_calc_mask'); + late final _acl_calc_mask = + _acl_calc_maskPtr.asFunction)>(); - late final ffi.Pointer _kCFUserNotificationSoundURLKey = - _lookup('kCFUserNotificationSoundURLKey'); + int acl_clear_perms( + acl_permset_t permset_d, + ) { + return _acl_clear_perms( + permset_d, + ); + } - CFStringRef get kCFUserNotificationSoundURLKey => - _kCFUserNotificationSoundURLKey.value; + late final _acl_clear_permsPtr = + _lookup>( + 'acl_clear_perms'); + late final _acl_clear_perms = + _acl_clear_permsPtr.asFunction(); - set kCFUserNotificationSoundURLKey(CFStringRef value) => - _kCFUserNotificationSoundURLKey.value = value; + int acl_delete_perm( + acl_permset_t permset_d, + int perm, + ) { + return _acl_delete_perm( + permset_d, + perm, + ); + } - late final ffi.Pointer _kCFUserNotificationLocalizationURLKey = - _lookup('kCFUserNotificationLocalizationURLKey'); + late final _acl_delete_permPtr = + _lookup>( + 'acl_delete_perm'); + late final _acl_delete_perm = + _acl_delete_permPtr.asFunction(); - CFStringRef get kCFUserNotificationLocalizationURLKey => - _kCFUserNotificationLocalizationURLKey.value; + int acl_get_perm_np( + acl_permset_t permset_d, + int perm, + ) { + return _acl_get_perm_np( + permset_d, + perm, + ); + } - set kCFUserNotificationLocalizationURLKey(CFStringRef value) => - _kCFUserNotificationLocalizationURLKey.value = value; + late final _acl_get_perm_npPtr = + _lookup>( + 'acl_get_perm_np'); + late final _acl_get_perm_np = + _acl_get_perm_npPtr.asFunction(); - late final ffi.Pointer _kCFUserNotificationAlertHeaderKey = - _lookup('kCFUserNotificationAlertHeaderKey'); + int acl_get_permset( + acl_entry_t entry_d, + ffi.Pointer permset_p, + ) { + return _acl_get_permset( + entry_d, + permset_p, + ); + } - CFStringRef get kCFUserNotificationAlertHeaderKey => - _kCFUserNotificationAlertHeaderKey.value; + 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)>(); - set kCFUserNotificationAlertHeaderKey(CFStringRef value) => - _kCFUserNotificationAlertHeaderKey.value = value; + int acl_set_permset( + acl_entry_t entry_d, + acl_permset_t permset_d, + ) { + return _acl_set_permset( + entry_d, + permset_d, + ); + } - late final ffi.Pointer _kCFUserNotificationAlertMessageKey = - _lookup('kCFUserNotificationAlertMessageKey'); + late final _acl_set_permsetPtr = + _lookup>( + 'acl_set_permset'); + late final _acl_set_permset = _acl_set_permsetPtr + .asFunction(); - CFStringRef get kCFUserNotificationAlertMessageKey => - _kCFUserNotificationAlertMessageKey.value; + int acl_maximal_permset_mask_np( + ffi.Pointer mask_p, + ) { + return _acl_maximal_permset_mask_np( + mask_p, + ); + } - set kCFUserNotificationAlertMessageKey(CFStringRef value) => - _kCFUserNotificationAlertMessageKey.value = value; + 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)>(); - late final ffi.Pointer - _kCFUserNotificationDefaultButtonTitleKey = - _lookup('kCFUserNotificationDefaultButtonTitleKey'); + 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, + ); + } - CFStringRef get kCFUserNotificationDefaultButtonTitleKey => - _kCFUserNotificationDefaultButtonTitleKey.value; + 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)>(); - 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, + int acl_set_permset_mask_np( + acl_entry_t entry_d, + int mask, ) { - return _CFXMLNodeCreate( - alloc, - xmlType, - dataString, - additionalInfoPtr, - version, + return _acl_set_permset_mask_np( + entry_d, + mask, ); } - 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)>(); + 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(); - CFXMLNodeRef CFXMLNodeCreateCopy( - CFAllocatorRef alloc, - CFXMLNodeRef origNode, + int acl_add_flag_np( + acl_flagset_t flagset_d, + int flag, ) { - return _CFXMLNodeCreateCopy( - alloc, - origNode, + return _acl_add_flag_np( + flagset_d, + flag, ); } - late final _CFXMLNodeCreateCopyPtr = _lookup< - ffi.NativeFunction< - CFXMLNodeRef Function( - CFAllocatorRef, CFXMLNodeRef)>>('CFXMLNodeCreateCopy'); - late final _CFXMLNodeCreateCopy = _CFXMLNodeCreateCopyPtr.asFunction< - CFXMLNodeRef Function(CFAllocatorRef, CFXMLNodeRef)>(); + late final _acl_add_flag_npPtr = + _lookup>( + 'acl_add_flag_np'); + late final _acl_add_flag_np = + _acl_add_flag_npPtr.asFunction(); - int CFXMLNodeGetTypeCode( - CFXMLNodeRef node, + int acl_clear_flags_np( + acl_flagset_t flagset_d, ) { - return _CFXMLNodeGetTypeCode( - node, + return _acl_clear_flags_np( + flagset_d, ); } - late final _CFXMLNodeGetTypeCodePtr = - _lookup>( - 'CFXMLNodeGetTypeCode'); - late final _CFXMLNodeGetTypeCode = - _CFXMLNodeGetTypeCodePtr.asFunction(); + late final _acl_clear_flags_npPtr = + _lookup>( + 'acl_clear_flags_np'); + late final _acl_clear_flags_np = + _acl_clear_flags_npPtr.asFunction(); - CFStringRef CFXMLNodeGetString( - CFXMLNodeRef node, + int acl_delete_flag_np( + acl_flagset_t flagset_d, + int flag, ) { - return _CFXMLNodeGetString( - node, + return _acl_delete_flag_np( + flagset_d, + flag, ); } - late final _CFXMLNodeGetStringPtr = - _lookup>( - 'CFXMLNodeGetString'); - late final _CFXMLNodeGetString = - _CFXMLNodeGetStringPtr.asFunction(); + late final _acl_delete_flag_npPtr = + _lookup>( + 'acl_delete_flag_np'); + late final _acl_delete_flag_np = + _acl_delete_flag_npPtr.asFunction(); - ffi.Pointer CFXMLNodeGetInfoPtr( - CFXMLNodeRef node, + int acl_get_flag_np( + acl_flagset_t flagset_d, + int flag, ) { - return _CFXMLNodeGetInfoPtr( - node, + return _acl_get_flag_np( + flagset_d, + flag, ); } - late final _CFXMLNodeGetInfoPtrPtr = - _lookup Function(CFXMLNodeRef)>>( - 'CFXMLNodeGetInfoPtr'); - late final _CFXMLNodeGetInfoPtr = _CFXMLNodeGetInfoPtrPtr.asFunction< - ffi.Pointer Function(CFXMLNodeRef)>(); + late final _acl_get_flag_npPtr = + _lookup>( + 'acl_get_flag_np'); + late final _acl_get_flag_np = + _acl_get_flag_npPtr.asFunction(); - int CFXMLNodeGetVersion( - CFXMLNodeRef node, + int acl_get_flagset_np( + ffi.Pointer obj_p, + ffi.Pointer flagset_p, ) { - return _CFXMLNodeGetVersion( - node, + return _acl_get_flagset_np( + obj_p, + flagset_p, ); } - late final _CFXMLNodeGetVersionPtr = - _lookup>( - 'CFXMLNodeGetVersion'); - late final _CFXMLNodeGetVersion = - _CFXMLNodeGetVersionPtr.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)>(); - CFXMLTreeRef CFXMLTreeCreateWithNode( - CFAllocatorRef allocator, - CFXMLNodeRef node, + int acl_set_flagset_np( + ffi.Pointer obj_p, + acl_flagset_t flagset_d, ) { - return _CFXMLTreeCreateWithNode( - allocator, - node, + return _acl_set_flagset_np( + obj_p, + flagset_d, ); } - late final _CFXMLTreeCreateWithNodePtr = _lookup< + late final _acl_set_flagset_npPtr = _lookup< ffi.NativeFunction< - CFXMLTreeRef Function( - CFAllocatorRef, CFXMLNodeRef)>>('CFXMLTreeCreateWithNode'); - late final _CFXMLTreeCreateWithNode = _CFXMLTreeCreateWithNodePtr.asFunction< - CFXMLTreeRef Function(CFAllocatorRef, CFXMLNodeRef)>(); + 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)>(); - CFXMLNodeRef CFXMLTreeGetNode( - CFXMLTreeRef xmlTree, + ffi.Pointer acl_get_qualifier( + acl_entry_t entry_d, ) { - return _CFXMLTreeGetNode( - xmlTree, + return _acl_get_qualifier( + entry_d, ); } - late final _CFXMLTreeGetNodePtr = - _lookup>( - 'CFXMLTreeGetNode'); - late final _CFXMLTreeGetNode = - _CFXMLTreeGetNodePtr.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)>(); - int CFXMLParserGetTypeID() { - return _CFXMLParserGetTypeID(); + 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 _CFXMLParserGetTypeIDPtr = - _lookup>('CFXMLParserGetTypeID'); - late final _CFXMLParserGetTypeID = - _CFXMLParserGetTypeIDPtr.asFunction(); + 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)>(); - CFXMLParserRef CFXMLParserCreate( - CFAllocatorRef allocator, - CFDataRef xmlData, - CFURLRef dataSource, - int parseOptions, - int versionOfNodes, - ffi.Pointer callBacks, - ffi.Pointer context, + int acl_set_qualifier( + acl_entry_t entry_d, + ffi.Pointer tag_qualifier_p, ) { - return _CFXMLParserCreate( - allocator, - xmlData, - dataSource, - parseOptions, - versionOfNodes, - callBacks, - context, + return _acl_set_qualifier( + entry_d, + tag_qualifier_p, ); } - late final _CFXMLParserCreatePtr = _lookup< + late final _acl_set_qualifierPtr = _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( + acl_entry_t, ffi.Pointer)>>('acl_set_qualifier'); + late final _acl_set_qualifier = _acl_set_qualifierPtr + .asFunction)>(); - CFXMLParserRef CFXMLParserCreateWithDataFromURL( - CFAllocatorRef allocator, - CFURLRef dataSource, - int parseOptions, - int versionOfNodes, - ffi.Pointer callBacks, - ffi.Pointer context, + int acl_set_tag_type( + acl_entry_t entry_d, + int tag_type, ) { - return _CFXMLParserCreateWithDataFromURL( - allocator, - dataSource, - parseOptions, - versionOfNodes, - callBacks, - context, + return _acl_set_tag_type( + entry_d, + tag_type, ); } - 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_tag_typePtr = + _lookup>( + 'acl_set_tag_type'); + late final _acl_set_tag_type = + _acl_set_tag_typePtr.asFunction(); - void CFXMLParserGetContext( - CFXMLParserRef parser, - ffi.Pointer context, + int acl_delete_def_file( + ffi.Pointer path_p, ) { - return _CFXMLParserGetContext( - parser, - context, + return _acl_delete_def_file( + path_p, ); } - late final _CFXMLParserGetContextPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFXMLParserRef, - ffi.Pointer)>>('CFXMLParserGetContext'); - late final _CFXMLParserGetContext = _CFXMLParserGetContextPtr.asFunction< - void Function(CFXMLParserRef, ffi.Pointer)>(); + late final _acl_delete_def_filePtr = + _lookup)>>( + 'acl_delete_def_file'); + late final _acl_delete_def_file = + _acl_delete_def_filePtr.asFunction)>(); - void CFXMLParserGetCallBacks( - CFXMLParserRef parser, - ffi.Pointer callBacks, + acl_t acl_get_fd( + int fd, ) { - return _CFXMLParserGetCallBacks( - parser, - callBacks, + return _acl_get_fd( + fd, ); } - 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_get_fdPtr = + _lookup>('acl_get_fd'); + late final _acl_get_fd = _acl_get_fdPtr.asFunction(); - CFURLRef CFXMLParserGetSourceURL( - CFXMLParserRef parser, + acl_t acl_get_fd_np( + int fd, + int type, ) { - return _CFXMLParserGetSourceURL( - parser, + return _acl_get_fd_np( + fd, + type, ); } - late final _CFXMLParserGetSourceURLPtr = - _lookup>( - 'CFXMLParserGetSourceURL'); - late final _CFXMLParserGetSourceURL = _CFXMLParserGetSourceURLPtr.asFunction< - CFURLRef Function(CFXMLParserRef)>(); + late final _acl_get_fd_npPtr = + _lookup>( + 'acl_get_fd_np'); + late final _acl_get_fd_np = + _acl_get_fd_npPtr.asFunction(); - int CFXMLParserGetLocation( - CFXMLParserRef parser, + acl_t acl_get_file( + ffi.Pointer path_p, + int type, ) { - return _CFXMLParserGetLocation( - parser, + return _acl_get_file( + path_p, + type, ); } - late final _CFXMLParserGetLocationPtr = - _lookup>( - 'CFXMLParserGetLocation'); - late final _CFXMLParserGetLocation = - _CFXMLParserGetLocationPtr.asFunction(); + late final _acl_get_filePtr = _lookup< + ffi.NativeFunction, ffi.Int32)>>( + 'acl_get_file'); + late final _acl_get_file = + _acl_get_filePtr.asFunction, int)>(); - int CFXMLParserGetLineNumber( - CFXMLParserRef parser, + acl_t acl_get_link_np( + ffi.Pointer path_p, + int type, ) { - return _CFXMLParserGetLineNumber( - parser, + return _acl_get_link_np( + path_p, + type, ); } - late final _CFXMLParserGetLineNumberPtr = - _lookup>( - 'CFXMLParserGetLineNumber'); - late final _CFXMLParserGetLineNumber = - _CFXMLParserGetLineNumberPtr.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)>(); - ffi.Pointer CFXMLParserGetDocument( - CFXMLParserRef parser, + int acl_set_fd( + int fd, + acl_t acl, ) { - return _CFXMLParserGetDocument( - parser, + return _acl_set_fd( + fd, + acl, ); } - late final _CFXMLParserGetDocumentPtr = _lookup< - ffi.NativeFunction Function(CFXMLParserRef)>>( - 'CFXMLParserGetDocument'); - late final _CFXMLParserGetDocument = _CFXMLParserGetDocumentPtr.asFunction< - ffi.Pointer Function(CFXMLParserRef)>(); + late final _acl_set_fdPtr = + _lookup>( + 'acl_set_fd'); + late final _acl_set_fd = + _acl_set_fdPtr.asFunction(); - int CFXMLParserGetStatusCode( - CFXMLParserRef parser, + int acl_set_fd_np( + int fd, + acl_t acl, + int acl_type, ) { - return _CFXMLParserGetStatusCode( - parser, + return _acl_set_fd_np( + fd, + acl, + acl_type, ); } - late final _CFXMLParserGetStatusCodePtr = - _lookup>( - 'CFXMLParserGetStatusCode'); - late final _CFXMLParserGetStatusCode = - _CFXMLParserGetStatusCodePtr.asFunction(); + late final _acl_set_fd_npPtr = + _lookup>( + 'acl_set_fd_np'); + late final _acl_set_fd_np = + _acl_set_fd_npPtr.asFunction(); - CFStringRef CFXMLParserCopyErrorDescription( - CFXMLParserRef parser, + int acl_set_file( + ffi.Pointer path_p, + int type, + acl_t acl, ) { - return _CFXMLParserCopyErrorDescription( - parser, + return _acl_set_file( + path_p, + type, + acl, ); } - late final _CFXMLParserCopyErrorDescriptionPtr = - _lookup>( - 'CFXMLParserCopyErrorDescription'); - late final _CFXMLParserCopyErrorDescription = - _CFXMLParserCopyErrorDescriptionPtr.asFunction< - CFStringRef Function(CFXMLParserRef)>(); + 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 CFXMLParserAbort( - CFXMLParserRef parser, - int errorCode, - CFStringRef errorDescription, + int acl_set_link_np( + ffi.Pointer path_p, + int type, + acl_t acl, ) { - return _CFXMLParserAbort( - parser, - errorCode, - errorDescription, + return _acl_set_link_np( + path_p, + type, + acl, ); } - late final _CFXMLParserAbortPtr = _lookup< + late final _acl_set_link_npPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - CFXMLParserRef, ffi.Int32, CFStringRef)>>('CFXMLParserAbort'); - late final _CFXMLParserAbort = _CFXMLParserAbortPtr.asFunction< - void Function(CFXMLParserRef, int, CFStringRef)>(); + 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 CFXMLParserParse( - CFXMLParserRef parser, + int acl_copy_ext( + ffi.Pointer buf_p, + acl_t acl, + int size, ) { - return _CFXMLParserParse( - parser, + return _acl_copy_ext( + buf_p, + acl, + size, ); } - late final _CFXMLParserParsePtr = - _lookup>( - 'CFXMLParserParse'); - late final _CFXMLParserParse = - _CFXMLParserParsePtr.asFunction(); + 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)>(); - CFXMLTreeRef CFXMLTreeCreateFromData( - CFAllocatorRef allocator, - CFDataRef xmlData, - CFURLRef dataSource, - int parseOptions, - int versionOfNodes, + int acl_copy_ext_native( + ffi.Pointer buf_p, + acl_t acl, + int size, ) { - return _CFXMLTreeCreateFromData( - allocator, - xmlData, - dataSource, - parseOptions, - versionOfNodes, + return _acl_copy_ext_native( + buf_p, + acl, + size, ); } - late final _CFXMLTreeCreateFromDataPtr = _lookup< + late final _acl_copy_ext_nativePtr = _lookup< ffi.NativeFunction< - CFXMLTreeRef Function(CFAllocatorRef, CFDataRef, CFURLRef, - CFOptionFlags, CFIndex)>>('CFXMLTreeCreateFromData'); - late final _CFXMLTreeCreateFromData = _CFXMLTreeCreateFromDataPtr.asFunction< - CFXMLTreeRef Function(CFAllocatorRef, CFDataRef, CFURLRef, int, int)>(); + 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)>(); - CFXMLTreeRef CFXMLTreeCreateFromDataWithError( - CFAllocatorRef allocator, - CFDataRef xmlData, - CFURLRef dataSource, - int parseOptions, - int versionOfNodes, - ffi.Pointer errorDict, + acl_t acl_copy_int( + ffi.Pointer buf_p, ) { - return _CFXMLTreeCreateFromDataWithError( - allocator, - xmlData, - dataSource, - parseOptions, - versionOfNodes, - errorDict, + return _acl_copy_int( + buf_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_copy_intPtr = + _lookup)>>( + 'acl_copy_int'); + late final _acl_copy_int = + _acl_copy_intPtr.asFunction)>(); - CFXMLTreeRef CFXMLTreeCreateWithDataFromURL( - CFAllocatorRef allocator, - CFURLRef dataSource, - int parseOptions, - int versionOfNodes, + acl_t acl_copy_int_native( + ffi.Pointer buf_p, ) { - return _CFXMLTreeCreateWithDataFromURL( - allocator, - dataSource, - parseOptions, - versionOfNodes, + return _acl_copy_int_native( + buf_p, ); } - 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_copy_int_nativePtr = + _lookup)>>( + 'acl_copy_int_native'); + late final _acl_copy_int_native = _acl_copy_int_nativePtr + .asFunction)>(); - CFDataRef CFXMLTreeCreateXMLData( - CFAllocatorRef allocator, - CFXMLTreeRef xmlTree, + acl_t acl_from_text( + ffi.Pointer buf_p, ) { - return _CFXMLTreeCreateXMLData( - allocator, - xmlTree, + return _acl_from_text( + buf_p, ); } - late final _CFXMLTreeCreateXMLDataPtr = _lookup< - ffi.NativeFunction>( - 'CFXMLTreeCreateXMLData'); - late final _CFXMLTreeCreateXMLData = _CFXMLTreeCreateXMLDataPtr.asFunction< - CFDataRef Function(CFAllocatorRef, CFXMLTreeRef)>(); + late final _acl_from_textPtr = + _lookup)>>( + 'acl_from_text'); + late final _acl_from_text = + _acl_from_textPtr.asFunction)>(); - CFStringRef CFXMLCreateStringByEscapingEntities( - CFAllocatorRef allocator, - CFStringRef string, - CFDictionaryRef entitiesDictionary, + int acl_size( + acl_t acl, ) { - return _CFXMLCreateStringByEscapingEntities( - allocator, - string, - entitiesDictionary, + return _acl_size( + acl, ); } - 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_sizePtr = + _lookup>('acl_size'); + late final _acl_size = _acl_sizePtr.asFunction(); - CFStringRef CFXMLCreateStringByUnescapingEntities( - CFAllocatorRef allocator, - CFStringRef string, - CFDictionaryRef entitiesDictionary, + ffi.Pointer acl_to_text( + acl_t acl, + ffi.Pointer len_p, ) { - return _CFXMLCreateStringByUnescapingEntities( - allocator, - string, - entitiesDictionary, + return _acl_to_text( + acl, + len_p, ); } - late final _CFXMLCreateStringByUnescapingEntitiesPtr = _lookup< + late final _acl_to_textPtr = _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; + 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 SecTrustGetTypeID() { - return _SecTrustGetTypeID(); + int CFFileSecurityGetTypeID() { + return _CFFileSecurityGetTypeID(); } - late final _SecTrustGetTypeIDPtr = - _lookup>('SecTrustGetTypeID'); - late final _SecTrustGetTypeID = - _SecTrustGetTypeIDPtr.asFunction(); + late final _CFFileSecurityGetTypeIDPtr = + _lookup>( + 'CFFileSecurityGetTypeID'); + late final _CFFileSecurityGetTypeID = + _CFFileSecurityGetTypeIDPtr.asFunction(); - int SecTrustCreateWithCertificates( - CFTypeRef certificates, - CFTypeRef policies, - ffi.Pointer trust, + CFFileSecurityRef CFFileSecurityCreate( + CFAllocatorRef allocator, ) { - return _SecTrustCreateWithCertificates( - certificates, - policies, - trust, + return _CFFileSecurityCreate( + allocator, ); } - late final _SecTrustCreateWithCertificatesPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(CFTypeRef, CFTypeRef, - ffi.Pointer)>>('SecTrustCreateWithCertificates'); - late final _SecTrustCreateWithCertificates = - _SecTrustCreateWithCertificatesPtr.asFunction< - int Function(CFTypeRef, CFTypeRef, ffi.Pointer)>(); + late final _CFFileSecurityCreatePtr = + _lookup>( + 'CFFileSecurityCreate'); + late final _CFFileSecurityCreate = _CFFileSecurityCreatePtr.asFunction< + CFFileSecurityRef Function(CFAllocatorRef)>(); - int SecTrustSetPolicies( - SecTrustRef trust, - CFTypeRef policies, + CFFileSecurityRef CFFileSecurityCreateCopy( + CFAllocatorRef allocator, + CFFileSecurityRef fileSec, ) { - return _SecTrustSetPolicies( - trust, - policies, + return _CFFileSecurityCreateCopy( + allocator, + fileSec, ); } - late final _SecTrustSetPoliciesPtr = - _lookup>( - 'SecTrustSetPolicies'); - late final _SecTrustSetPolicies = _SecTrustSetPoliciesPtr.asFunction< - int Function(SecTrustRef, CFTypeRef)>(); + late final _CFFileSecurityCreateCopyPtr = _lookup< + ffi.NativeFunction< + CFFileSecurityRef Function( + CFAllocatorRef, CFFileSecurityRef)>>('CFFileSecurityCreateCopy'); + late final _CFFileSecurityCreateCopy = + _CFFileSecurityCreateCopyPtr.asFunction< + CFFileSecurityRef Function(CFAllocatorRef, CFFileSecurityRef)>(); - int SecTrustCopyPolicies( - SecTrustRef trust, - ffi.Pointer policies, + int CFFileSecurityCopyOwnerUUID( + CFFileSecurityRef fileSec, + ffi.Pointer ownerUUID, ) { - return _SecTrustCopyPolicies( - trust, - policies, + return _CFFileSecurityCopyOwnerUUID( + fileSec, + ownerUUID, ); } - late final _SecTrustCopyPoliciesPtr = _lookup< + late final _CFFileSecurityCopyOwnerUUIDPtr = _lookup< ffi.NativeFunction< - OSStatus Function( - SecTrustRef, ffi.Pointer)>>('SecTrustCopyPolicies'); - late final _SecTrustCopyPolicies = _SecTrustCopyPoliciesPtr.asFunction< - int Function(SecTrustRef, ffi.Pointer)>(); + Boolean Function(CFFileSecurityRef, + ffi.Pointer)>>('CFFileSecurityCopyOwnerUUID'); + late final _CFFileSecurityCopyOwnerUUID = _CFFileSecurityCopyOwnerUUIDPtr + .asFunction)>(); - int SecTrustSetNetworkFetchAllowed( - SecTrustRef trust, - int allowFetch, + int CFFileSecuritySetOwnerUUID( + CFFileSecurityRef fileSec, + CFUUIDRef ownerUUID, ) { - return _SecTrustSetNetworkFetchAllowed( - trust, - allowFetch, + return _CFFileSecuritySetOwnerUUID( + fileSec, + ownerUUID, ); } - late final _SecTrustSetNetworkFetchAllowedPtr = - _lookup>( - 'SecTrustSetNetworkFetchAllowed'); - late final _SecTrustSetNetworkFetchAllowed = - _SecTrustSetNetworkFetchAllowedPtr.asFunction< - int Function(SecTrustRef, int)>(); + late final _CFFileSecuritySetOwnerUUIDPtr = _lookup< + ffi.NativeFunction>( + 'CFFileSecuritySetOwnerUUID'); + late final _CFFileSecuritySetOwnerUUID = _CFFileSecuritySetOwnerUUIDPtr + .asFunction(); - int SecTrustGetNetworkFetchAllowed( - SecTrustRef trust, - ffi.Pointer allowFetch, + int CFFileSecurityCopyGroupUUID( + CFFileSecurityRef fileSec, + ffi.Pointer groupUUID, ) { - return _SecTrustGetNetworkFetchAllowed( - trust, - allowFetch, + return _CFFileSecurityCopyGroupUUID( + fileSec, + groupUUID, ); } - late final _SecTrustGetNetworkFetchAllowedPtr = _lookup< + late final _CFFileSecurityCopyGroupUUIDPtr = _lookup< ffi.NativeFunction< - OSStatus Function(SecTrustRef, - ffi.Pointer)>>('SecTrustGetNetworkFetchAllowed'); - late final _SecTrustGetNetworkFetchAllowed = - _SecTrustGetNetworkFetchAllowedPtr.asFunction< - int Function(SecTrustRef, ffi.Pointer)>(); + Boolean Function(CFFileSecurityRef, + ffi.Pointer)>>('CFFileSecurityCopyGroupUUID'); + late final _CFFileSecurityCopyGroupUUID = _CFFileSecurityCopyGroupUUIDPtr + .asFunction)>(); - int SecTrustSetAnchorCertificates( - SecTrustRef trust, - CFArrayRef anchorCertificates, + int CFFileSecuritySetGroupUUID( + CFFileSecurityRef fileSec, + CFUUIDRef groupUUID, ) { - return _SecTrustSetAnchorCertificates( - trust, - anchorCertificates, + return _CFFileSecuritySetGroupUUID( + fileSec, + groupUUID, ); } - late final _SecTrustSetAnchorCertificatesPtr = - _lookup>( - 'SecTrustSetAnchorCertificates'); - late final _SecTrustSetAnchorCertificates = _SecTrustSetAnchorCertificatesPtr - .asFunction(); + late final _CFFileSecuritySetGroupUUIDPtr = _lookup< + ffi.NativeFunction>( + 'CFFileSecuritySetGroupUUID'); + late final _CFFileSecuritySetGroupUUID = _CFFileSecuritySetGroupUUIDPtr + .asFunction(); - int SecTrustSetAnchorCertificatesOnly( - SecTrustRef trust, - int anchorCertificatesOnly, - ) { - return _SecTrustSetAnchorCertificatesOnly( - trust, - anchorCertificatesOnly, + int CFFileSecurityCopyAccessControlList( + CFFileSecurityRef fileSec, + ffi.Pointer accessControlList, + ) { + return _CFFileSecurityCopyAccessControlList( + fileSec, + accessControlList, ); } - late final _SecTrustSetAnchorCertificatesOnlyPtr = - _lookup>( - 'SecTrustSetAnchorCertificatesOnly'); - late final _SecTrustSetAnchorCertificatesOnly = - _SecTrustSetAnchorCertificatesOnlyPtr.asFunction< - int Function(SecTrustRef, int)>(); + late final _CFFileSecurityCopyAccessControlListPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFFileSecurityRef, + ffi.Pointer)>>('CFFileSecurityCopyAccessControlList'); + late final _CFFileSecurityCopyAccessControlList = + _CFFileSecurityCopyAccessControlListPtr.asFunction< + int Function(CFFileSecurityRef, ffi.Pointer)>(); - int SecTrustCopyCustomAnchorCertificates( - SecTrustRef trust, - ffi.Pointer anchors, + int CFFileSecuritySetAccessControlList( + CFFileSecurityRef fileSec, + acl_t accessControlList, ) { - return _SecTrustCopyCustomAnchorCertificates( - trust, - anchors, + return _CFFileSecuritySetAccessControlList( + fileSec, + accessControlList, ); } - late final _SecTrustCopyCustomAnchorCertificatesPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SecTrustRef, ffi.Pointer)>>( - 'SecTrustCopyCustomAnchorCertificates'); - late final _SecTrustCopyCustomAnchorCertificates = - _SecTrustCopyCustomAnchorCertificatesPtr.asFunction< - int Function(SecTrustRef, ffi.Pointer)>(); + late final _CFFileSecuritySetAccessControlListPtr = + _lookup>( + 'CFFileSecuritySetAccessControlList'); + late final _CFFileSecuritySetAccessControlList = + _CFFileSecuritySetAccessControlListPtr.asFunction< + int Function(CFFileSecurityRef, acl_t)>(); - int SecTrustSetVerifyDate( - SecTrustRef trust, - CFDateRef verifyDate, + int CFFileSecurityGetOwner( + CFFileSecurityRef fileSec, + ffi.Pointer owner, ) { - return _SecTrustSetVerifyDate( - trust, - verifyDate, + return _CFFileSecurityGetOwner( + fileSec, + owner, ); } - late final _SecTrustSetVerifyDatePtr = - _lookup>( - 'SecTrustSetVerifyDate'); - late final _SecTrustSetVerifyDate = _SecTrustSetVerifyDatePtr.asFunction< - int Function(SecTrustRef, CFDateRef)>(); + late final _CFFileSecurityGetOwnerPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFFileSecurityRef, + ffi.Pointer)>>('CFFileSecurityGetOwner'); + late final _CFFileSecurityGetOwner = _CFFileSecurityGetOwnerPtr.asFunction< + int Function(CFFileSecurityRef, ffi.Pointer)>(); - double SecTrustGetVerifyTime( - SecTrustRef trust, + int CFFileSecuritySetOwner( + CFFileSecurityRef fileSec, + int owner, ) { - return _SecTrustGetVerifyTime( - trust, + return _CFFileSecuritySetOwner( + fileSec, + owner, ); } - late final _SecTrustGetVerifyTimePtr = - _lookup>( - 'SecTrustGetVerifyTime'); - late final _SecTrustGetVerifyTime = - _SecTrustGetVerifyTimePtr.asFunction(); + late final _CFFileSecuritySetOwnerPtr = + _lookup>( + 'CFFileSecuritySetOwner'); + late final _CFFileSecuritySetOwner = _CFFileSecuritySetOwnerPtr.asFunction< + int Function(CFFileSecurityRef, int)>(); - int SecTrustEvaluate( - SecTrustRef trust, - ffi.Pointer result, + int CFFileSecurityGetGroup( + CFFileSecurityRef fileSec, + ffi.Pointer group, ) { - return _SecTrustEvaluate( - trust, - result, + return _CFFileSecurityGetGroup( + fileSec, + group, ); } - late final _SecTrustEvaluatePtr = _lookup< + late final _CFFileSecurityGetGroupPtr = _lookup< ffi.NativeFunction< - OSStatus Function( - SecTrustRef, ffi.Pointer)>>('SecTrustEvaluate'); - late final _SecTrustEvaluate = _SecTrustEvaluatePtr.asFunction< - int Function(SecTrustRef, ffi.Pointer)>(); + Boolean Function(CFFileSecurityRef, + ffi.Pointer)>>('CFFileSecurityGetGroup'); + late final _CFFileSecurityGetGroup = _CFFileSecurityGetGroupPtr.asFunction< + int Function(CFFileSecurityRef, ffi.Pointer)>(); - int SecTrustEvaluateAsync( - SecTrustRef trust, - dispatch_queue_t queue, - SecTrustCallback result, + int CFFileSecuritySetGroup( + CFFileSecurityRef fileSec, + int group, ) { - return _SecTrustEvaluateAsync( - trust, - queue, - result, + return _CFFileSecuritySetGroup( + fileSec, + group, ); } - 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 _CFFileSecuritySetGroupPtr = + _lookup>( + 'CFFileSecuritySetGroup'); + late final _CFFileSecuritySetGroup = _CFFileSecuritySetGroupPtr.asFunction< + int Function(CFFileSecurityRef, int)>(); - bool SecTrustEvaluateWithError( - SecTrustRef trust, - ffi.Pointer error, + int CFFileSecurityGetMode( + CFFileSecurityRef fileSec, + ffi.Pointer mode, ) { - return _SecTrustEvaluateWithError( - trust, - error, + return _CFFileSecurityGetMode( + fileSec, + mode, ); } - late final _SecTrustEvaluateWithErrorPtr = _lookup< + late final _CFFileSecurityGetModePtr = _lookup< ffi.NativeFunction< - ffi.Bool Function(SecTrustRef, - ffi.Pointer)>>('SecTrustEvaluateWithError'); - late final _SecTrustEvaluateWithError = _SecTrustEvaluateWithErrorPtr - .asFunction)>(); + Boolean Function(CFFileSecurityRef, + ffi.Pointer)>>('CFFileSecurityGetMode'); + late final _CFFileSecurityGetMode = _CFFileSecurityGetModePtr.asFunction< + int Function(CFFileSecurityRef, ffi.Pointer)>(); - int SecTrustEvaluateAsyncWithError( - SecTrustRef trust, - dispatch_queue_t queue, - SecTrustWithErrorCallback result, + int CFFileSecuritySetMode( + CFFileSecurityRef fileSec, + int mode, ) { - return _SecTrustEvaluateAsyncWithError( - trust, - queue, - result, + return _CFFileSecuritySetMode( + fileSec, + mode, ); } - 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 _CFFileSecuritySetModePtr = + _lookup>( + 'CFFileSecuritySetMode'); + late final _CFFileSecuritySetMode = _CFFileSecuritySetModePtr.asFunction< + int Function(CFFileSecurityRef, int)>(); - int SecTrustGetTrustResult( - SecTrustRef trust, - ffi.Pointer result, + int CFFileSecurityClearProperties( + CFFileSecurityRef fileSec, + int clearPropertyMask, ) { - return _SecTrustGetTrustResult( - trust, - result, + return _CFFileSecurityClearProperties( + fileSec, + clearPropertyMask, ); } - late final _SecTrustGetTrustResultPtr = _lookup< - ffi.NativeFunction< - OSStatus Function( - SecTrustRef, ffi.Pointer)>>('SecTrustGetTrustResult'); - late final _SecTrustGetTrustResult = _SecTrustGetTrustResultPtr.asFunction< - int Function(SecTrustRef, ffi.Pointer)>(); + late final _CFFileSecurityClearPropertiesPtr = _lookup< + ffi.NativeFunction>( + 'CFFileSecurityClearProperties'); + late final _CFFileSecurityClearProperties = _CFFileSecurityClearPropertiesPtr + .asFunction(); - SecKeyRef SecTrustCopyPublicKey( - SecTrustRef trust, + CFStringRef CFStringTokenizerCopyBestStringLanguage( + CFStringRef string, + CFRange range, ) { - return _SecTrustCopyPublicKey( - trust, + return _CFStringTokenizerCopyBestStringLanguage( + string, + range, ); } - late final _SecTrustCopyPublicKeyPtr = - _lookup>( - 'SecTrustCopyPublicKey'); - late final _SecTrustCopyPublicKey = - _SecTrustCopyPublicKeyPtr.asFunction(); + late final _CFStringTokenizerCopyBestStringLanguagePtr = + _lookup>( + 'CFStringTokenizerCopyBestStringLanguage'); + late final _CFStringTokenizerCopyBestStringLanguage = + _CFStringTokenizerCopyBestStringLanguagePtr.asFunction< + CFStringRef Function(CFStringRef, CFRange)>(); - SecKeyRef SecTrustCopyKey( - SecTrustRef trust, + 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 _SecTrustCopyKey( - trust, + return _CFStringTokenizerCreate( + alloc, + string, + range, + options, + locale, ); } - late final _SecTrustCopyKeyPtr = - _lookup>( - 'SecTrustCopyKey'); - late final _SecTrustCopyKey = - _SecTrustCopyKeyPtr.asFunction(); + 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 SecTrustGetCertificateCount( - SecTrustRef trust, + void CFStringTokenizerSetString( + CFStringTokenizerRef tokenizer, + CFStringRef string, + CFRange range, ) { - return _SecTrustGetCertificateCount( - trust, + return _CFStringTokenizerSetString( + tokenizer, + string, + range, ); } - late final _SecTrustGetCertificateCountPtr = - _lookup>( - 'SecTrustGetCertificateCount'); - late final _SecTrustGetCertificateCount = - _SecTrustGetCertificateCountPtr.asFunction(); + late final _CFStringTokenizerSetStringPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFStringTokenizerRef, CFStringRef, + CFRange)>>('CFStringTokenizerSetString'); + late final _CFStringTokenizerSetString = _CFStringTokenizerSetStringPtr + .asFunction(); - SecCertificateRef SecTrustGetCertificateAtIndex( - SecTrustRef trust, - int ix, + int CFStringTokenizerGoToTokenAtIndex( + CFStringTokenizerRef tokenizer, + int index, ) { - return _SecTrustGetCertificateAtIndex( - trust, - ix, + return _CFStringTokenizerGoToTokenAtIndex( + tokenizer, + index, ); } - late final _SecTrustGetCertificateAtIndexPtr = _lookup< - ffi.NativeFunction>( - 'SecTrustGetCertificateAtIndex'); - late final _SecTrustGetCertificateAtIndex = _SecTrustGetCertificateAtIndexPtr - .asFunction(); + late final _CFStringTokenizerGoToTokenAtIndexPtr = _lookup< + ffi + .NativeFunction>( + 'CFStringTokenizerGoToTokenAtIndex'); + late final _CFStringTokenizerGoToTokenAtIndex = + _CFStringTokenizerGoToTokenAtIndexPtr.asFunction< + int Function(CFStringTokenizerRef, int)>(); - CFDataRef SecTrustCopyExceptions( - SecTrustRef trust, + int CFStringTokenizerAdvanceToNextToken( + CFStringTokenizerRef tokenizer, ) { - return _SecTrustCopyExceptions( - trust, + return _CFStringTokenizerAdvanceToNextToken( + tokenizer, ); } - late final _SecTrustCopyExceptionsPtr = - _lookup>( - 'SecTrustCopyExceptions'); - late final _SecTrustCopyExceptions = - _SecTrustCopyExceptionsPtr.asFunction(); + late final _CFStringTokenizerAdvanceToNextTokenPtr = + _lookup>( + 'CFStringTokenizerAdvanceToNextToken'); + late final _CFStringTokenizerAdvanceToNextToken = + _CFStringTokenizerAdvanceToNextTokenPtr.asFunction< + int Function(CFStringTokenizerRef)>(); - bool SecTrustSetExceptions( - SecTrustRef trust, - CFDataRef exceptions, + CFRange CFStringTokenizerGetCurrentTokenRange( + CFStringTokenizerRef tokenizer, ) { - return _SecTrustSetExceptions( - trust, - exceptions, + return _CFStringTokenizerGetCurrentTokenRange( + tokenizer, ); } - late final _SecTrustSetExceptionsPtr = - _lookup>( - 'SecTrustSetExceptions'); - late final _SecTrustSetExceptions = _SecTrustSetExceptionsPtr.asFunction< - bool Function(SecTrustRef, CFDataRef)>(); + late final _CFStringTokenizerGetCurrentTokenRangePtr = + _lookup>( + 'CFStringTokenizerGetCurrentTokenRange'); + late final _CFStringTokenizerGetCurrentTokenRange = + _CFStringTokenizerGetCurrentTokenRangePtr.asFunction< + CFRange Function(CFStringTokenizerRef)>(); - CFArrayRef SecTrustCopyProperties( - SecTrustRef trust, + CFTypeRef CFStringTokenizerCopyCurrentTokenAttribute( + CFStringTokenizerRef tokenizer, + int attribute, ) { - return _SecTrustCopyProperties( - trust, + return _CFStringTokenizerCopyCurrentTokenAttribute( + tokenizer, + attribute, ); } - late final _SecTrustCopyPropertiesPtr = - _lookup>( - 'SecTrustCopyProperties'); - late final _SecTrustCopyProperties = - _SecTrustCopyPropertiesPtr.asFunction(); + late final _CFStringTokenizerCopyCurrentTokenAttributePtr = _lookup< + ffi.NativeFunction< + CFTypeRef Function(CFStringTokenizerRef, + CFOptionFlags)>>('CFStringTokenizerCopyCurrentTokenAttribute'); + late final _CFStringTokenizerCopyCurrentTokenAttribute = + _CFStringTokenizerCopyCurrentTokenAttributePtr.asFunction< + CFTypeRef Function(CFStringTokenizerRef, int)>(); - CFDictionaryRef SecTrustCopyResult( - SecTrustRef trust, + int CFStringTokenizerGetCurrentSubTokens( + CFStringTokenizerRef tokenizer, + ffi.Pointer ranges, + int maxRangeLength, + CFMutableArrayRef derivedSubTokens, ) { - return _SecTrustCopyResult( - trust, + return _CFStringTokenizerGetCurrentSubTokens( + tokenizer, + ranges, + maxRangeLength, + derivedSubTokens, ); } - late final _SecTrustCopyResultPtr = - _lookup>( - 'SecTrustCopyResult'); - late final _SecTrustCopyResult = _SecTrustCopyResultPtr.asFunction< - CFDictionaryRef Function(SecTrustRef)>(); + 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 SecTrustSetOCSPResponse( - SecTrustRef trust, - CFTypeRef responseData, + 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 _SecTrustSetOCSPResponse( - trust, - responseData, + return _CFFileDescriptorCreate( + allocator, + fd, + closeOnInvalidate, + callout, + context, ); } - late final _SecTrustSetOCSPResponsePtr = - _lookup>( - 'SecTrustSetOCSPResponse'); - late final _SecTrustSetOCSPResponse = _SecTrustSetOCSPResponsePtr.asFunction< - int Function(SecTrustRef, CFTypeRef)>(); + 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 SecTrustSetSignedCertificateTimestamps( - SecTrustRef trust, - CFArrayRef sctArray, + int CFFileDescriptorGetNativeDescriptor( + CFFileDescriptorRef f, ) { - return _SecTrustSetSignedCertificateTimestamps( - trust, - sctArray, + return _CFFileDescriptorGetNativeDescriptor( + f, ); } - late final _SecTrustSetSignedCertificateTimestampsPtr = - _lookup>( - 'SecTrustSetSignedCertificateTimestamps'); - late final _SecTrustSetSignedCertificateTimestamps = - _SecTrustSetSignedCertificateTimestampsPtr.asFunction< - int Function(SecTrustRef, CFArrayRef)>(); + late final _CFFileDescriptorGetNativeDescriptorPtr = _lookup< + ffi.NativeFunction< + CFFileDescriptorNativeDescriptor Function( + CFFileDescriptorRef)>>('CFFileDescriptorGetNativeDescriptor'); + late final _CFFileDescriptorGetNativeDescriptor = + _CFFileDescriptorGetNativeDescriptorPtr.asFunction< + int Function(CFFileDescriptorRef)>(); - CFArrayRef SecTrustCopyCertificateChain( - SecTrustRef trust, + void CFFileDescriptorGetContext( + CFFileDescriptorRef f, + ffi.Pointer context, ) { - return _SecTrustCopyCertificateChain( - trust, + return _CFFileDescriptorGetContext( + f, + context, ); } - late final _SecTrustCopyCertificateChainPtr = - _lookup>( - 'SecTrustCopyCertificateChain'); - late final _SecTrustCopyCertificateChain = _SecTrustCopyCertificateChainPtr - .asFunction(); + 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 ffi.Pointer _gGuidCssm = - _lookup('gGuidCssm'); + void CFFileDescriptorEnableCallBacks( + CFFileDescriptorRef f, + int callBackTypes, + ) { + return _CFFileDescriptorEnableCallBacks( + f, + callBackTypes, + ); + } - CSSM_GUID get gGuidCssm => _gGuidCssm.ref; + late final _CFFileDescriptorEnableCallBacksPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFFileDescriptorRef, + CFOptionFlags)>>('CFFileDescriptorEnableCallBacks'); + late final _CFFileDescriptorEnableCallBacks = + _CFFileDescriptorEnableCallBacksPtr.asFunction< + void Function(CFFileDescriptorRef, int)>(); - 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, + void CFFileDescriptorDisableCallBacks( + CFFileDescriptorRef f, + int callBackTypes, ) { - return _cssmPerror( - how, - error, + return _CFFileDescriptorDisableCallBacks( + f, + callBackTypes, ); } - late final _cssmPerrorPtr = _lookup< + late final _CFFileDescriptorDisableCallBacksPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, CSSM_RETURN)>>('cssmPerror'); - late final _cssmPerror = - _cssmPerrorPtr.asFunction, int)>(); + ffi.Void Function(CFFileDescriptorRef, + CFOptionFlags)>>('CFFileDescriptorDisableCallBacks'); + late final _CFFileDescriptorDisableCallBacks = + _CFFileDescriptorDisableCallBacksPtr.asFunction< + void Function(CFFileDescriptorRef, int)>(); - bool cssmOidToAlg( - ffi.Pointer oid, - ffi.Pointer alg, + void CFFileDescriptorInvalidate( + CFFileDescriptorRef f, ) { - return _cssmOidToAlg( - oid, - alg, + return _CFFileDescriptorInvalidate( + 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 _CFFileDescriptorInvalidatePtr = + _lookup>( + 'CFFileDescriptorInvalidate'); + late final _CFFileDescriptorInvalidate = _CFFileDescriptorInvalidatePtr + .asFunction(); - ffi.Pointer cssmAlgToOid( - int algId, + int CFFileDescriptorIsValid( + CFFileDescriptorRef f, ) { - return _cssmAlgToOid( - algId, + return _CFFileDescriptorIsValid( + f, ); } - late final _cssmAlgToOidPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(CSSM_ALGORITHMS)>>('cssmAlgToOid'); - late final _cssmAlgToOid = - _cssmAlgToOidPtr.asFunction Function(int)>(); + late final _CFFileDescriptorIsValidPtr = + _lookup>( + 'CFFileDescriptorIsValid'); + late final _CFFileDescriptorIsValid = _CFFileDescriptorIsValidPtr.asFunction< + int Function(CFFileDescriptorRef)>(); - int SecTrustSetOptions( - SecTrustRef trustRef, - int options, + CFRunLoopSourceRef CFFileDescriptorCreateRunLoopSource( + CFAllocatorRef allocator, + CFFileDescriptorRef f, + int order, ) { - return _SecTrustSetOptions( - trustRef, - options, + return _CFFileDescriptorCreateRunLoopSource( + allocator, + f, + order, ); } - late final _SecTrustSetOptionsPtr = - _lookup>( - 'SecTrustSetOptions'); - late final _SecTrustSetOptions = - _SecTrustSetOptionsPtr.asFunction(); + late final _CFFileDescriptorCreateRunLoopSourcePtr = _lookup< + ffi.NativeFunction< + CFRunLoopSourceRef Function(CFAllocatorRef, CFFileDescriptorRef, + CFIndex)>>('CFFileDescriptorCreateRunLoopSource'); + late final _CFFileDescriptorCreateRunLoopSource = + _CFFileDescriptorCreateRunLoopSourcePtr.asFunction< + CFRunLoopSourceRef Function( + CFAllocatorRef, CFFileDescriptorRef, int)>(); - int SecTrustSetParameters( - SecTrustRef trustRef, - int action, - CFDataRef actionData, - ) { - return _SecTrustSetParameters( - trustRef, - action, - actionData, - ); + int CFUserNotificationGetTypeID() { + return _CFUserNotificationGetTypeID(); } - late final _SecTrustSetParametersPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SecTrustRef, CSSM_TP_ACTION, - CFDataRef)>>('SecTrustSetParameters'); - late final _SecTrustSetParameters = _SecTrustSetParametersPtr.asFunction< - int Function(SecTrustRef, int, CFDataRef)>(); + late final _CFUserNotificationGetTypeIDPtr = + _lookup>( + 'CFUserNotificationGetTypeID'); + late final _CFUserNotificationGetTypeID = + _CFUserNotificationGetTypeIDPtr.asFunction(); - int SecTrustSetKeychains( - SecTrustRef trust, - CFTypeRef keychainOrArray, + CFUserNotificationRef CFUserNotificationCreate( + CFAllocatorRef allocator, + double timeout, + int flags, + ffi.Pointer error, + CFDictionaryRef dictionary, ) { - return _SecTrustSetKeychains( - trust, - keychainOrArray, + return _CFUserNotificationCreate( + allocator, + timeout, + flags, + error, + dictionary, ); } - late final _SecTrustSetKeychainsPtr = - _lookup>( - 'SecTrustSetKeychains'); - late final _SecTrustSetKeychains = _SecTrustSetKeychainsPtr.asFunction< - int Function(SecTrustRef, CFTypeRef)>(); + 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 SecTrustGetResult( - SecTrustRef trustRef, - ffi.Pointer result, - ffi.Pointer certChain, - ffi.Pointer> statusChain, + int CFUserNotificationReceiveResponse( + CFUserNotificationRef userNotification, + double timeout, + ffi.Pointer responseFlags, ) { - return _SecTrustGetResult( - trustRef, - result, - certChain, - statusChain, + return _CFUserNotificationReceiveResponse( + userNotification, + timeout, + responseFlags, ); } - late final _SecTrustGetResultPtr = _lookup< + late final _CFUserNotificationReceiveResponsePtr = _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>)>(); + SInt32 Function(CFUserNotificationRef, CFTimeInterval, + ffi.Pointer)>>( + 'CFUserNotificationReceiveResponse'); + late final _CFUserNotificationReceiveResponse = + _CFUserNotificationReceiveResponsePtr.asFunction< + int Function( + CFUserNotificationRef, double, ffi.Pointer)>(); - int SecTrustGetCssmResult( - SecTrustRef trust, - ffi.Pointer result, + CFStringRef CFUserNotificationGetResponseValue( + CFUserNotificationRef userNotification, + CFStringRef key, + int idx, ) { - return _SecTrustGetCssmResult( - trust, - result, + return _CFUserNotificationGetResponseValue( + userNotification, + key, + idx, ); } - late final _SecTrustGetCssmResultPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SecTrustRef, - ffi.Pointer)>>( - 'SecTrustGetCssmResult'); - late final _SecTrustGetCssmResult = _SecTrustGetCssmResultPtr.asFunction< - int Function( - SecTrustRef, 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 SecTrustGetCssmResultCode( - SecTrustRef trust, - ffi.Pointer resultCode, + CFDictionaryRef CFUserNotificationGetResponseDictionary( + CFUserNotificationRef userNotification, ) { - return _SecTrustGetCssmResultCode( - trust, - resultCode, + return _CFUserNotificationGetResponseDictionary( + userNotification, ); } - late final _SecTrustGetCssmResultCodePtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SecTrustRef, - ffi.Pointer)>>('SecTrustGetCssmResultCode'); - late final _SecTrustGetCssmResultCode = _SecTrustGetCssmResultCodePtr - .asFunction)>(); + late final _CFUserNotificationGetResponseDictionaryPtr = _lookup< + ffi.NativeFunction>( + 'CFUserNotificationGetResponseDictionary'); + late final _CFUserNotificationGetResponseDictionary = + _CFUserNotificationGetResponseDictionaryPtr.asFunction< + CFDictionaryRef Function(CFUserNotificationRef)>(); - int SecTrustGetTPHandle( - SecTrustRef trust, - ffi.Pointer handle, + int CFUserNotificationUpdate( + CFUserNotificationRef userNotification, + double timeout, + int flags, + CFDictionaryRef dictionary, ) { - return _SecTrustGetTPHandle( - trust, - handle, + return _CFUserNotificationUpdate( + userNotification, + timeout, + flags, + dictionary, ); } - late final _SecTrustGetTPHandlePtr = _lookup< + late final _CFUserNotificationUpdatePtr = _lookup< ffi.NativeFunction< - OSStatus Function(SecTrustRef, - ffi.Pointer)>>('SecTrustGetTPHandle'); - late final _SecTrustGetTPHandle = _SecTrustGetTPHandlePtr.asFunction< - int Function(SecTrustRef, ffi.Pointer)>(); + SInt32 Function(CFUserNotificationRef, CFTimeInterval, CFOptionFlags, + CFDictionaryRef)>>('CFUserNotificationUpdate'); + late final _CFUserNotificationUpdate = + _CFUserNotificationUpdatePtr.asFunction< + int Function(CFUserNotificationRef, double, int, CFDictionaryRef)>(); - int SecTrustCopyAnchorCertificates( - ffi.Pointer anchors, + int CFUserNotificationCancel( + CFUserNotificationRef userNotification, ) { - return _SecTrustCopyAnchorCertificates( - anchors, + return _CFUserNotificationCancel( + userNotification, ); } - 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 _CFUserNotificationCancelPtr = + _lookup>( + 'CFUserNotificationCancel'); + late final _CFUserNotificationCancel = _CFUserNotificationCancelPtr + .asFunction(); - SecCertificateRef SecCertificateCreateWithData( + CFRunLoopSourceRef CFUserNotificationCreateRunLoopSource( CFAllocatorRef allocator, - CFDataRef data, + CFUserNotificationRef userNotification, + CFUserNotificationCallBack callout, + int order, ) { - return _SecCertificateCreateWithData( + return _CFUserNotificationCreateRunLoopSource( allocator, - data, + userNotification, + callout, + order, ); } - late final _SecCertificateCreateWithDataPtr = _lookup< + late final _CFUserNotificationCreateRunLoopSourcePtr = _lookup< ffi.NativeFunction< - SecCertificateRef Function( - CFAllocatorRef, CFDataRef)>>('SecCertificateCreateWithData'); - late final _SecCertificateCreateWithData = _SecCertificateCreateWithDataPtr - .asFunction(); + CFRunLoopSourceRef Function( + CFAllocatorRef, + CFUserNotificationRef, + CFUserNotificationCallBack, + CFIndex)>>('CFUserNotificationCreateRunLoopSource'); + late final _CFUserNotificationCreateRunLoopSource = + _CFUserNotificationCreateRunLoopSourcePtr.asFunction< + CFRunLoopSourceRef Function(CFAllocatorRef, CFUserNotificationRef, + CFUserNotificationCallBack, int)>(); - CFDataRef SecCertificateCopyData( - SecCertificateRef certificate, + int CFUserNotificationDisplayNotice( + double timeout, + int flags, + CFURLRef iconURL, + CFURLRef soundURL, + CFURLRef localizationURL, + CFStringRef alertHeader, + CFStringRef alertMessage, + CFStringRef defaultButtonTitle, ) { - return _SecCertificateCopyData( - certificate, + return _CFUserNotificationDisplayNotice( + timeout, + flags, + iconURL, + soundURL, + localizationURL, + alertHeader, + alertMessage, + defaultButtonTitle, ); } - late final _SecCertificateCopyDataPtr = - _lookup>( - 'SecCertificateCopyData'); - late final _SecCertificateCopyData = _SecCertificateCopyDataPtr.asFunction< - CFDataRef Function(SecCertificateRef)>(); + 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)>(); - CFStringRef SecCertificateCopySubjectSummary( - 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 _SecCertificateCopySubjectSummary( - certificate, + return _CFUserNotificationDisplayAlert( + timeout, + flags, + iconURL, + soundURL, + localizationURL, + alertHeader, + alertMessage, + defaultButtonTitle, + alternateButtonTitle, + otherButtonTitle, + responseFlags, ); } - late final _SecCertificateCopySubjectSummaryPtr = - _lookup>( - 'SecCertificateCopySubjectSummary'); - late final _SecCertificateCopySubjectSummary = - _SecCertificateCopySubjectSummaryPtr.asFunction< - CFStringRef 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)>(); - int SecCertificateCopyCommonName( - SecCertificateRef certificate, - ffi.Pointer commonName, - ) { - return _SecCertificateCopyCommonName( - certificate, - commonName, - ); - } + late final ffi.Pointer _kCFUserNotificationIconURLKey = + _lookup('kCFUserNotificationIconURLKey'); - late final _SecCertificateCopyCommonNamePtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SecCertificateRef, - ffi.Pointer)>>('SecCertificateCopyCommonName'); - late final _SecCertificateCopyCommonName = _SecCertificateCopyCommonNamePtr - .asFunction)>(); + CFStringRef get kCFUserNotificationIconURLKey => + _kCFUserNotificationIconURLKey.value; - int SecCertificateCopyEmailAddresses( - SecCertificateRef certificate, - ffi.Pointer emailAddresses, - ) { - return _SecCertificateCopyEmailAddresses( - certificate, - emailAddresses, - ); - } + set kCFUserNotificationIconURLKey(CFStringRef value) => + _kCFUserNotificationIconURLKey.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 _kCFUserNotificationSoundURLKey = + _lookup('kCFUserNotificationSoundURLKey'); - CFDataRef SecCertificateCopyNormalizedIssuerSequence( - SecCertificateRef certificate, - ) { - return _SecCertificateCopyNormalizedIssuerSequence( - certificate, - ); - } + CFStringRef get kCFUserNotificationSoundURLKey => + _kCFUserNotificationSoundURLKey.value; - late final _SecCertificateCopyNormalizedIssuerSequencePtr = - _lookup>( - 'SecCertificateCopyNormalizedIssuerSequence'); - late final _SecCertificateCopyNormalizedIssuerSequence = - _SecCertificateCopyNormalizedIssuerSequencePtr.asFunction< - CFDataRef Function(SecCertificateRef)>(); + set kCFUserNotificationSoundURLKey(CFStringRef value) => + _kCFUserNotificationSoundURLKey.value = value; - CFDataRef SecCertificateCopyNormalizedSubjectSequence( - SecCertificateRef certificate, - ) { - return _SecCertificateCopyNormalizedSubjectSequence( - certificate, - ); - } + late final ffi.Pointer _kCFUserNotificationLocalizationURLKey = + _lookup('kCFUserNotificationLocalizationURLKey'); - late final _SecCertificateCopyNormalizedSubjectSequencePtr = - _lookup>( - 'SecCertificateCopyNormalizedSubjectSequence'); - late final _SecCertificateCopyNormalizedSubjectSequence = - _SecCertificateCopyNormalizedSubjectSequencePtr.asFunction< - CFDataRef Function(SecCertificateRef)>(); + CFStringRef get kCFUserNotificationLocalizationURLKey => + _kCFUserNotificationLocalizationURLKey.value; - SecKeyRef SecCertificateCopyKey( - SecCertificateRef certificate, - ) { - return _SecCertificateCopyKey( - certificate, - ); + 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 _SecCertificateCopyKeyPtr = - _lookup>( - 'SecCertificateCopyKey'); - late final _SecCertificateCopyKey = _SecCertificateCopyKeyPtr.asFunction< - SecKeyRef Function(SecCertificateRef)>(); + late final _CFXMLNodeGetTypeIDPtr = + _lookup>('CFXMLNodeGetTypeID'); + late final _CFXMLNodeGetTypeID = + _CFXMLNodeGetTypeIDPtr.asFunction(); - int SecCertificateCopyPublicKey( - SecCertificateRef certificate, - ffi.Pointer key, + CFXMLNodeRef CFXMLNodeCreate( + CFAllocatorRef alloc, + int xmlType, + CFStringRef dataString, + ffi.Pointer additionalInfoPtr, + int version, ) { - return _SecCertificateCopyPublicKey( - certificate, - key, + return _CFXMLNodeCreate( + alloc, + xmlType, + dataString, + additionalInfoPtr, + version, ); } - late final _SecCertificateCopyPublicKeyPtr = _lookup< + late final _CFXMLNodeCreatePtr = _lookup< ffi.NativeFunction< - OSStatus Function(SecCertificateRef, - ffi.Pointer)>>('SecCertificateCopyPublicKey'); - late final _SecCertificateCopyPublicKey = _SecCertificateCopyPublicKeyPtr - .asFunction)>(); + CFXMLNodeRef Function(CFAllocatorRef, ffi.Int32, CFStringRef, + ffi.Pointer, CFIndex)>>('CFXMLNodeCreate'); + late final _CFXMLNodeCreate = _CFXMLNodeCreatePtr.asFunction< + CFXMLNodeRef Function( + CFAllocatorRef, int, CFStringRef, ffi.Pointer, int)>(); - CFDataRef SecCertificateCopySerialNumberData( - SecCertificateRef certificate, - ffi.Pointer error, + CFXMLNodeRef CFXMLNodeCreateCopy( + CFAllocatorRef alloc, + CFXMLNodeRef origNode, ) { - return _SecCertificateCopySerialNumberData( - certificate, - error, + return _CFXMLNodeCreateCopy( + alloc, + origNode, ); } - late final _SecCertificateCopySerialNumberDataPtr = _lookup< - ffi.NativeFunction< - CFDataRef Function(SecCertificateRef, - ffi.Pointer)>>('SecCertificateCopySerialNumberData'); - late final _SecCertificateCopySerialNumberData = - _SecCertificateCopySerialNumberDataPtr.asFunction< - CFDataRef Function(SecCertificateRef, ffi.Pointer)>(); + late final _CFXMLNodeCreateCopyPtr = _lookup< + ffi + .NativeFunction>( + 'CFXMLNodeCreateCopy'); + late final _CFXMLNodeCreateCopy = _CFXMLNodeCreateCopyPtr.asFunction< + CFXMLNodeRef Function(CFAllocatorRef, CFXMLNodeRef)>(); - CFDataRef SecCertificateCopySerialNumber( - SecCertificateRef certificate, - ffi.Pointer error, + int CFXMLNodeGetTypeCode( + CFXMLNodeRef node, ) { - return _SecCertificateCopySerialNumber( - certificate, - error, + return _CFXMLNodeGetTypeCode( + node, ); } - late final _SecCertificateCopySerialNumberPtr = _lookup< - ffi.NativeFunction< - CFDataRef Function(SecCertificateRef, - ffi.Pointer)>>('SecCertificateCopySerialNumber'); - late final _SecCertificateCopySerialNumber = - _SecCertificateCopySerialNumberPtr.asFunction< - CFDataRef Function(SecCertificateRef, ffi.Pointer)>(); + late final _CFXMLNodeGetTypeCodePtr = + _lookup>( + 'CFXMLNodeGetTypeCode'); + late final _CFXMLNodeGetTypeCode = + _CFXMLNodeGetTypeCodePtr.asFunction(); - int SecCertificateCreateFromData( - ffi.Pointer data, - int type, - int encoding, - ffi.Pointer certificate, + CFStringRef CFXMLNodeGetString( + CFXMLNodeRef node, ) { - return _SecCertificateCreateFromData( - data, - type, - encoding, - certificate, + return _CFXMLNodeGetString( + 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 _CFXMLNodeGetStringPtr = + _lookup>( + 'CFXMLNodeGetString'); + late final _CFXMLNodeGetString = + _CFXMLNodeGetStringPtr.asFunction(); - int SecCertificateAddToKeychain( - SecCertificateRef certificate, - SecKeychainRef keychain, + ffi.Pointer CFXMLNodeGetInfoPtr( + CFXMLNodeRef node, ) { - return _SecCertificateAddToKeychain( - certificate, - keychain, + return _CFXMLNodeGetInfoPtr( + node, ); } - late final _SecCertificateAddToKeychainPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SecCertificateRef, - SecKeychainRef)>>('SecCertificateAddToKeychain'); - late final _SecCertificateAddToKeychain = _SecCertificateAddToKeychainPtr - .asFunction(); + late final _CFXMLNodeGetInfoPtrPtr = + _lookup Function(CFXMLNodeRef)>>( + 'CFXMLNodeGetInfoPtr'); + late final _CFXMLNodeGetInfoPtr = _CFXMLNodeGetInfoPtrPtr.asFunction< + ffi.Pointer Function(CFXMLNodeRef)>(); - int SecCertificateGetData( - SecCertificateRef certificate, - CSSM_DATA_PTR data, + int CFXMLNodeGetVersion( + CFXMLNodeRef node, ) { - return _SecCertificateGetData( - certificate, - data, + return _CFXMLNodeGetVersion( + 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 _CFXMLNodeGetVersionPtr = + _lookup>( + 'CFXMLNodeGetVersion'); + late final _CFXMLNodeGetVersion = + _CFXMLNodeGetVersionPtr.asFunction(); - int SecCertificateGetType( - SecCertificateRef certificate, - ffi.Pointer certificateType, + CFXMLTreeRef CFXMLTreeCreateWithNode( + CFAllocatorRef allocator, + CFXMLNodeRef node, ) { - return _SecCertificateGetType( - certificate, - certificateType, + return _CFXMLTreeCreateWithNode( + allocator, + 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 _CFXMLTreeCreateWithNodePtr = _lookup< + ffi + .NativeFunction>( + 'CFXMLTreeCreateWithNode'); + late final _CFXMLTreeCreateWithNode = _CFXMLTreeCreateWithNodePtr.asFunction< + CFXMLTreeRef Function(CFAllocatorRef, CFXMLNodeRef)>(); - int SecCertificateGetSubject( - SecCertificateRef certificate, - ffi.Pointer> subject, + CFXMLNodeRef CFXMLTreeGetNode( + CFXMLTreeRef xmlTree, ) { - return _SecCertificateGetSubject( - certificate, - subject, + return _CFXMLTreeGetNode( + xmlTree, ); } - late final _SecCertificateGetSubjectPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SecCertificateRef, - ffi.Pointer>)>>( - 'SecCertificateGetSubject'); - late final _SecCertificateGetSubject = - _SecCertificateGetSubjectPtr.asFunction< - int Function( - SecCertificateRef, ffi.Pointer>)>(); + late final _CFXMLTreeGetNodePtr = + _lookup>( + 'CFXMLTreeGetNode'); + late final _CFXMLTreeGetNode = + _CFXMLTreeGetNodePtr.asFunction(); - int SecCertificateGetIssuer( - SecCertificateRef certificate, - ffi.Pointer> issuer, - ) { - return _SecCertificateGetIssuer( - certificate, - issuer, - ); + int CFXMLParserGetTypeID() { + return _CFXMLParserGetTypeID(); } - late final _SecCertificateGetIssuerPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SecCertificateRef, - ffi.Pointer>)>>( - 'SecCertificateGetIssuer'); - late final _SecCertificateGetIssuer = _SecCertificateGetIssuerPtr.asFunction< - int Function( - SecCertificateRef, ffi.Pointer>)>(); + late final _CFXMLParserGetTypeIDPtr = + _lookup>('CFXMLParserGetTypeID'); + late final _CFXMLParserGetTypeID = + _CFXMLParserGetTypeIDPtr.asFunction(); - int SecCertificateGetCLHandle( - SecCertificateRef certificate, - ffi.Pointer clHandle, + 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(); - - int SecCertificateSetPreference( - SecCertificateRef certificate, - CFStringRef name, - int keyUsage, - CFDateRef date, + ffi.Void Function(CFXMLParserRef, + ffi.Pointer)>>('CFXMLParserGetCallBacks'); + late final _CFXMLParserGetCallBacks = _CFXMLParserGetCallBacksPtr.asFunction< + void Function(CFXMLParserRef, ffi.Pointer)>(); + + 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 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; + late final _CFXMLParserGetLocationPtr = + _lookup>( + 'CFXMLParserGetLocation'); + late final _CFXMLParserGetLocation = + _CFXMLParserGetLocationPtr.asFunction(); - CFDictionaryRef SecCertificateCopyValues( - SecCertificateRef certificate, - CFArrayRef keys, - ffi.Pointer error, + int CFXMLParserGetLineNumber( + CFXMLParserRef parser, ) { - return _SecCertificateCopyValues( - certificate, - keys, - error, + return _CFXMLParserGetLineNumber( + parser, ); } - late final _SecCertificateCopyValuesPtr = _lookup< - ffi.NativeFunction< - CFDictionaryRef Function(SecCertificateRef, CFArrayRef, - ffi.Pointer)>>('SecCertificateCopyValues'); - late final _SecCertificateCopyValues = - _SecCertificateCopyValuesPtr.asFunction< - CFDictionaryRef Function( - SecCertificateRef, CFArrayRef, ffi.Pointer)>(); + late final _CFXMLParserGetLineNumberPtr = + _lookup>( + 'CFXMLParserGetLineNumber'); + late final _CFXMLParserGetLineNumber = + _CFXMLParserGetLineNumberPtr.asFunction(); - CFStringRef SecCertificateCopyLongDescription( - CFAllocatorRef alloc, - SecCertificateRef certificate, - ffi.Pointer error, + ffi.Pointer CFXMLParserGetDocument( + CFXMLParserRef parser, ) { - return _SecCertificateCopyLongDescription( - alloc, - certificate, - error, + return _CFXMLParserGetDocument( + parser, ); } - 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 _CFXMLParserGetDocumentPtr = _lookup< + ffi.NativeFunction Function(CFXMLParserRef)>>( + 'CFXMLParserGetDocument'); + late final _CFXMLParserGetDocument = _CFXMLParserGetDocumentPtr.asFunction< + ffi.Pointer Function(CFXMLParserRef)>(); - CFStringRef SecCertificateCopyShortDescription( - CFAllocatorRef alloc, - SecCertificateRef certificate, - ffi.Pointer error, + int CFXMLParserGetStatusCode( + CFXMLParserRef parser, ) { - return _SecCertificateCopyShortDescription( - alloc, - certificate, - error, + return _CFXMLParserGetStatusCode( + parser, ); } - late final _SecCertificateCopyShortDescriptionPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, SecCertificateRef, - ffi.Pointer)>>('SecCertificateCopyShortDescription'); - late final _SecCertificateCopyShortDescription = - _SecCertificateCopyShortDescriptionPtr.asFunction< - CFStringRef Function( - CFAllocatorRef, SecCertificateRef, ffi.Pointer)>(); + late final _CFXMLParserGetStatusCodePtr = + _lookup>( + 'CFXMLParserGetStatusCode'); + late final _CFXMLParserGetStatusCode = + _CFXMLParserGetStatusCodePtr.asFunction(); - CFDataRef SecCertificateCopyNormalizedIssuerContent( - SecCertificateRef certificate, - ffi.Pointer error, + CFStringRef CFXMLParserCopyErrorDescription( + CFXMLParserRef parser, ) { - return _SecCertificateCopyNormalizedIssuerContent( - certificate, - error, + return _CFXMLParserCopyErrorDescription( + parser, ); } - late final _SecCertificateCopyNormalizedIssuerContentPtr = _lookup< - ffi.NativeFunction< - CFDataRef Function(SecCertificateRef, ffi.Pointer)>>( - 'SecCertificateCopyNormalizedIssuerContent'); - late final _SecCertificateCopyNormalizedIssuerContent = - _SecCertificateCopyNormalizedIssuerContentPtr.asFunction< - CFDataRef Function(SecCertificateRef, ffi.Pointer)>(); + late final _CFXMLParserCopyErrorDescriptionPtr = + _lookup>( + 'CFXMLParserCopyErrorDescription'); + late final _CFXMLParserCopyErrorDescription = + _CFXMLParserCopyErrorDescriptionPtr.asFunction< + CFStringRef Function(CFXMLParserRef)>(); - CFDataRef SecCertificateCopyNormalizedSubjectContent( - SecCertificateRef certificate, - ffi.Pointer error, + void CFXMLParserAbort( + CFXMLParserRef parser, + int errorCode, + CFStringRef errorDescription, ) { - return _SecCertificateCopyNormalizedSubjectContent( - certificate, - error, + return _CFXMLParserAbort( + parser, + errorCode, + errorDescription, ); } - 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(); + 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 SecIdentityCreateWithCertificate( - CFTypeRef keychainOrArray, - SecCertificateRef certificateRef, - ffi.Pointer identityRef, + int CFXMLParserParse( + CFXMLParserRef parser, ) { - return _SecIdentityCreateWithCertificate( - keychainOrArray, - certificateRef, - identityRef, + return _CFXMLParserParse( + parser, ); } - 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 _CFXMLParserParsePtr = + _lookup>( + 'CFXMLParserParse'); + late final _CFXMLParserParse = + _CFXMLParserParsePtr.asFunction(); - int SecIdentityCopyCertificate( - SecIdentityRef identityRef, - ffi.Pointer certificateRef, + CFXMLTreeRef CFXMLTreeCreateFromData( + CFAllocatorRef allocator, + CFDataRef xmlData, + CFURLRef dataSource, + int parseOptions, + int versionOfNodes, ) { - return _SecIdentityCopyCertificate( - identityRef, - certificateRef, + return _CFXMLTreeCreateFromData( + allocator, + xmlData, + dataSource, + parseOptions, + versionOfNodes, ); } - late final _SecIdentityCopyCertificatePtr = _lookup< + late final _CFXMLTreeCreateFromDataPtr = _lookup< ffi.NativeFunction< - OSStatus Function(SecIdentityRef, - ffi.Pointer)>>('SecIdentityCopyCertificate'); - late final _SecIdentityCopyCertificate = - _SecIdentityCopyCertificatePtr.asFunction< - int Function(SecIdentityRef, ffi.Pointer)>(); + CFXMLTreeRef Function(CFAllocatorRef, CFDataRef, CFURLRef, + CFOptionFlags, CFIndex)>>('CFXMLTreeCreateFromData'); + late final _CFXMLTreeCreateFromData = _CFXMLTreeCreateFromDataPtr.asFunction< + CFXMLTreeRef Function(CFAllocatorRef, CFDataRef, CFURLRef, int, int)>(); - int SecIdentityCopyPrivateKey( - SecIdentityRef identityRef, - ffi.Pointer privateKeyRef, + CFXMLTreeRef CFXMLTreeCreateFromDataWithError( + CFAllocatorRef allocator, + CFDataRef xmlData, + CFURLRef dataSource, + int parseOptions, + int versionOfNodes, + ffi.Pointer errorDict, ) { - return _SecIdentityCopyPrivateKey( - identityRef, - privateKeyRef, + return _CFXMLTreeCreateFromDataWithError( + allocator, + xmlData, + dataSource, + parseOptions, + versionOfNodes, + errorDict, ); } - late final _SecIdentityCopyPrivateKeyPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SecIdentityRef, - ffi.Pointer)>>('SecIdentityCopyPrivateKey'); - late final _SecIdentityCopyPrivateKey = _SecIdentityCopyPrivateKeyPtr - .asFunction)>(); + 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)>(); - int SecIdentityCopyPreference( - CFStringRef name, - int keyUsage, - CFArrayRef validIssuers, - ffi.Pointer identity, + CFXMLTreeRef CFXMLTreeCreateWithDataFromURL( + CFAllocatorRef allocator, + CFURLRef dataSource, + int parseOptions, + int versionOfNodes, ) { - return _SecIdentityCopyPreference( - name, - keyUsage, - validIssuers, - identity, + return _CFXMLTreeCreateWithDataFromURL( + allocator, + dataSource, + parseOptions, + versionOfNodes, ); } - late final _SecIdentityCopyPreferencePtr = _lookup< + late final _CFXMLTreeCreateWithDataFromURLPtr = _lookup< ffi.NativeFunction< - OSStatus Function(CFStringRef, CSSM_KEYUSE, CFArrayRef, - ffi.Pointer)>>('SecIdentityCopyPreference'); - late final _SecIdentityCopyPreference = - _SecIdentityCopyPreferencePtr.asFunction< - int Function( - CFStringRef, int, CFArrayRef, ffi.Pointer)>(); + CFXMLTreeRef Function(CFAllocatorRef, CFURLRef, CFOptionFlags, + CFIndex)>>('CFXMLTreeCreateWithDataFromURL'); + late final _CFXMLTreeCreateWithDataFromURL = + _CFXMLTreeCreateWithDataFromURLPtr.asFunction< + CFXMLTreeRef Function(CFAllocatorRef, CFURLRef, int, int)>(); - SecIdentityRef SecIdentityCopyPreferred( - CFStringRef name, - CFArrayRef keyUsage, - CFArrayRef validIssuers, + CFDataRef CFXMLTreeCreateXMLData( + CFAllocatorRef allocator, + CFXMLTreeRef xmlTree, ) { - return _SecIdentityCopyPreferred( - name, - keyUsage, - validIssuers, + return _CFXMLTreeCreateXMLData( + allocator, + xmlTree, ); } - late final _SecIdentityCopyPreferredPtr = _lookup< - ffi.NativeFunction< - SecIdentityRef Function(CFStringRef, CFArrayRef, - CFArrayRef)>>('SecIdentityCopyPreferred'); - late final _SecIdentityCopyPreferred = - _SecIdentityCopyPreferredPtr.asFunction< - SecIdentityRef Function(CFStringRef, CFArrayRef, CFArrayRef)>(); + late final _CFXMLTreeCreateXMLDataPtr = _lookup< + ffi.NativeFunction>( + 'CFXMLTreeCreateXMLData'); + late final _CFXMLTreeCreateXMLData = _CFXMLTreeCreateXMLDataPtr.asFunction< + CFDataRef Function(CFAllocatorRef, CFXMLTreeRef)>(); - int SecIdentitySetPreference( - SecIdentityRef identity, - CFStringRef name, - int keyUsage, + CFStringRef CFXMLCreateStringByEscapingEntities( + CFAllocatorRef allocator, + CFStringRef string, + CFDictionaryRef entitiesDictionary, ) { - return _SecIdentitySetPreference( - identity, - name, - keyUsage, + return _CFXMLCreateStringByEscapingEntities( + allocator, + string, + entitiesDictionary, ); } - late final _SecIdentitySetPreferencePtr = _lookup< + late final _CFXMLCreateStringByEscapingEntitiesPtr = _lookup< ffi.NativeFunction< - OSStatus Function(SecIdentityRef, CFStringRef, - CSSM_KEYUSE)>>('SecIdentitySetPreference'); - late final _SecIdentitySetPreference = _SecIdentitySetPreferencePtr - .asFunction(); + CFStringRef Function(CFAllocatorRef, CFStringRef, + CFDictionaryRef)>>('CFXMLCreateStringByEscapingEntities'); + late final _CFXMLCreateStringByEscapingEntities = + _CFXMLCreateStringByEscapingEntitiesPtr.asFunction< + CFStringRef Function(CFAllocatorRef, CFStringRef, CFDictionaryRef)>(); - int SecIdentitySetPreferred( - SecIdentityRef identity, - CFStringRef name, - CFArrayRef keyUsage, + CFStringRef CFXMLCreateStringByUnescapingEntities( + CFAllocatorRef allocator, + CFStringRef string, + CFDictionaryRef entitiesDictionary, ) { - return _SecIdentitySetPreferred( - identity, - name, - keyUsage, + return _CFXMLCreateStringByUnescapingEntities( + allocator, + string, + entitiesDictionary, ); } - late final _SecIdentitySetPreferredPtr = _lookup< + late final _CFXMLCreateStringByUnescapingEntitiesPtr = _lookup< ffi.NativeFunction< - OSStatus Function(SecIdentityRef, CFStringRef, - CFArrayRef)>>('SecIdentitySetPreferred'); - late final _SecIdentitySetPreferred = _SecIdentitySetPreferredPtr.asFunction< - int Function(SecIdentityRef, CFStringRef, CFArrayRef)>(); + CFStringRef Function(CFAllocatorRef, CFStringRef, + CFDictionaryRef)>>('CFXMLCreateStringByUnescapingEntities'); + late final _CFXMLCreateStringByUnescapingEntities = + _CFXMLCreateStringByUnescapingEntitiesPtr.asFunction< + CFStringRef Function(CFAllocatorRef, CFStringRef, CFDictionaryRef)>(); - int SecIdentityCopySystemIdentity( - CFStringRef domain, - ffi.Pointer idRef, - ffi.Pointer actualDomain, - ) { - return _SecIdentityCopySystemIdentity( - domain, - idRef, - actualDomain, - ); - } + late final ffi.Pointer _kCFXMLTreeErrorDescription = + _lookup('kCFXMLTreeErrorDescription'); - 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 kCFXMLTreeErrorDescription => + _kCFXMLTreeErrorDescription.value; - int SecIdentitySetSystemIdentity( - CFStringRef domain, - SecIdentityRef idRef, - ) { - return _SecIdentitySetSystemIdentity( - domain, - idRef, - ); - } + set kCFXMLTreeErrorDescription(CFStringRef value) => + _kCFXMLTreeErrorDescription.value = value; - late final _SecIdentitySetSystemIdentityPtr = _lookup< - ffi.NativeFunction>( - 'SecIdentitySetSystemIdentity'); - late final _SecIdentitySetSystemIdentity = _SecIdentitySetSystemIdentityPtr - .asFunction(); + late final ffi.Pointer _kCFXMLTreeErrorLineNumber = + _lookup('kCFXMLTreeErrorLineNumber'); - late final ffi.Pointer _kSecIdentityDomainDefault = - _lookup('kSecIdentityDomainDefault'); + CFStringRef get kCFXMLTreeErrorLineNumber => _kCFXMLTreeErrorLineNumber.value; - CFStringRef get kSecIdentityDomainDefault => _kSecIdentityDomainDefault.value; + set kCFXMLTreeErrorLineNumber(CFStringRef value) => + _kCFXMLTreeErrorLineNumber.value = value; - set kSecIdentityDomainDefault(CFStringRef value) => - _kSecIdentityDomainDefault.value = value; + late final ffi.Pointer _kCFXMLTreeErrorLocation = + _lookup('kCFXMLTreeErrorLocation'); - late final ffi.Pointer _kSecIdentityDomainKerberosKDC = - _lookup('kSecIdentityDomainKerberosKDC'); + CFStringRef get kCFXMLTreeErrorLocation => _kCFXMLTreeErrorLocation.value; - CFStringRef get kSecIdentityDomainKerberosKDC => - _kSecIdentityDomainKerberosKDC.value; + set kCFXMLTreeErrorLocation(CFStringRef value) => + _kCFXMLTreeErrorLocation.value = value; - set kSecIdentityDomainKerberosKDC(CFStringRef value) => - _kSecIdentityDomainKerberosKDC.value = value; + late final ffi.Pointer _kCFXMLTreeErrorStatusCode = + _lookup('kCFXMLTreeErrorStatusCode'); - sec_trust_t sec_trust_create( - SecTrustRef trust, + 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 _sec_trust_create( + return _SecTrustCreateWithCertificates( + certificates, + policies, trust, ); } - late final _sec_trust_createPtr = - _lookup>( - 'sec_trust_create'); - late final _sec_trust_create = - _sec_trust_createPtr.asFunction(); + late final _SecTrustCreateWithCertificatesPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(CFTypeRef, CFTypeRef, + ffi.Pointer)>>('SecTrustCreateWithCertificates'); + late final _SecTrustCreateWithCertificates = + _SecTrustCreateWithCertificatesPtr.asFunction< + int Function(CFTypeRef, CFTypeRef, ffi.Pointer)>(); - SecTrustRef sec_trust_copy_ref( - sec_trust_t trust, + int SecTrustSetPolicies( + SecTrustRef trust, + CFTypeRef policies, ) { - return _sec_trust_copy_ref( + return _SecTrustSetPolicies( trust, + policies, ); } - late final _sec_trust_copy_refPtr = - _lookup>( - 'sec_trust_copy_ref'); - late final _sec_trust_copy_ref = - _sec_trust_copy_refPtr.asFunction(); + late final _SecTrustSetPoliciesPtr = + _lookup>( + 'SecTrustSetPolicies'); + late final _SecTrustSetPolicies = _SecTrustSetPoliciesPtr.asFunction< + int Function(SecTrustRef, CFTypeRef)>(); - sec_identity_t sec_identity_create( - SecIdentityRef identity, + int SecTrustCopyPolicies( + SecTrustRef trust, + ffi.Pointer policies, ) { - return _sec_identity_create( - identity, + return _SecTrustCopyPolicies( + trust, + policies, ); } - late final _sec_identity_createPtr = - _lookup>( - 'sec_identity_create'); - late final _sec_identity_create = _sec_identity_createPtr - .asFunction(); + late final _SecTrustCopyPoliciesPtr = _lookup< + ffi.NativeFunction< + OSStatus Function( + SecTrustRef, ffi.Pointer)>>('SecTrustCopyPolicies'); + late final _SecTrustCopyPolicies = _SecTrustCopyPoliciesPtr.asFunction< + int Function(SecTrustRef, ffi.Pointer)>(); - sec_identity_t sec_identity_create_with_certificates( - SecIdentityRef identity, - CFArrayRef certificates, + int SecTrustSetNetworkFetchAllowed( + SecTrustRef trust, + int allowFetch, ) { - return _sec_identity_create_with_certificates( - identity, - certificates, + return _SecTrustSetNetworkFetchAllowed( + trust, + allowFetch, ); } - 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 _SecTrustSetNetworkFetchAllowedPtr = + _lookup>( + 'SecTrustSetNetworkFetchAllowed'); + late final _SecTrustSetNetworkFetchAllowed = + _SecTrustSetNetworkFetchAllowedPtr.asFunction< + int Function(SecTrustRef, int)>(); - bool sec_identity_access_certificates( - sec_identity_t identity, - ffi.Pointer<_ObjCBlock> handler, + int SecTrustGetNetworkFetchAllowed( + SecTrustRef trust, + ffi.Pointer allowFetch, ) { - return _sec_identity_access_certificates( - identity, - handler, + return _SecTrustGetNetworkFetchAllowed( + trust, + allowFetch, ); } - late final _sec_identity_access_certificatesPtr = _lookup< + late final _SecTrustGetNetworkFetchAllowedPtr = _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)>(); + OSStatus Function(SecTrustRef, + ffi.Pointer)>>('SecTrustGetNetworkFetchAllowed'); + late final _SecTrustGetNetworkFetchAllowed = + _SecTrustGetNetworkFetchAllowedPtr.asFunction< + int Function(SecTrustRef, ffi.Pointer)>(); - SecIdentityRef sec_identity_copy_ref( - sec_identity_t identity, + int SecTrustSetAnchorCertificates( + SecTrustRef trust, + CFArrayRef anchorCertificates, ) { - return _sec_identity_copy_ref( - identity, + return _SecTrustSetAnchorCertificates( + trust, + anchorCertificates, ); } - late final _sec_identity_copy_refPtr = - _lookup>( - 'sec_identity_copy_ref'); - late final _sec_identity_copy_ref = _sec_identity_copy_refPtr - .asFunction(); + late final _SecTrustSetAnchorCertificatesPtr = + _lookup>( + 'SecTrustSetAnchorCertificates'); + late final _SecTrustSetAnchorCertificates = _SecTrustSetAnchorCertificatesPtr + .asFunction(); - CFArrayRef sec_identity_copy_certificates_ref( - sec_identity_t identity, + int SecTrustSetAnchorCertificatesOnly( + SecTrustRef trust, + int anchorCertificatesOnly, ) { - return _sec_identity_copy_certificates_ref( - identity, + return _SecTrustSetAnchorCertificatesOnly( + trust, + anchorCertificatesOnly, ); } - 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 _SecTrustSetAnchorCertificatesOnlyPtr = + _lookup>( + 'SecTrustSetAnchorCertificatesOnly'); + late final _SecTrustSetAnchorCertificatesOnly = + _SecTrustSetAnchorCertificatesOnlyPtr.asFunction< + int Function(SecTrustRef, int)>(); - sec_certificate_t sec_certificate_create( - SecCertificateRef certificate, + int SecTrustCopyCustomAnchorCertificates( + SecTrustRef trust, + ffi.Pointer anchors, ) { - return _sec_certificate_create( - certificate, + return _SecTrustCopyCustomAnchorCertificates( + trust, + anchors, ); } - late final _sec_certificate_createPtr = _lookup< - ffi.NativeFunction>( - 'sec_certificate_create'); - late final _sec_certificate_create = _sec_certificate_createPtr - .asFunction(); + late final _SecTrustCopyCustomAnchorCertificatesPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SecTrustRef, ffi.Pointer)>>( + 'SecTrustCopyCustomAnchorCertificates'); + late final _SecTrustCopyCustomAnchorCertificates = + _SecTrustCopyCustomAnchorCertificatesPtr.asFunction< + int Function(SecTrustRef, ffi.Pointer)>(); - SecCertificateRef sec_certificate_copy_ref( - sec_certificate_t certificate, + int SecTrustSetVerifyDate( + SecTrustRef trust, + CFDateRef verifyDate, ) { - return _sec_certificate_copy_ref( - certificate, + return _SecTrustSetVerifyDate( + trust, + verifyDate, ); } - 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 _SecTrustSetVerifyDatePtr = + _lookup>( + 'SecTrustSetVerifyDate'); + late final _SecTrustSetVerifyDate = _SecTrustSetVerifyDatePtr.asFunction< + int Function(SecTrustRef, CFDateRef)>(); - ffi.Pointer sec_protocol_metadata_get_negotiated_protocol( - sec_protocol_metadata_t metadata, + double SecTrustGetVerifyTime( + SecTrustRef trust, ) { - return _sec_protocol_metadata_get_negotiated_protocol( - metadata, + return _SecTrustGetVerifyTime( + 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 _SecTrustGetVerifyTimePtr = + _lookup>( + 'SecTrustGetVerifyTime'); + late final _SecTrustGetVerifyTime = + _SecTrustGetVerifyTimePtr.asFunction(); - dispatch_data_t sec_protocol_metadata_copy_peer_public_key( - sec_protocol_metadata_t metadata, + int SecTrustEvaluate( + SecTrustRef trust, + ffi.Pointer result, ) { - return _sec_protocol_metadata_copy_peer_public_key( - metadata, + return _SecTrustEvaluate( + trust, + result, ); } - 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 _SecTrustEvaluatePtr = _lookup< + ffi.NativeFunction< + OSStatus Function( + SecTrustRef, ffi.Pointer)>>('SecTrustEvaluate'); + late final _SecTrustEvaluate = _SecTrustEvaluatePtr.asFunction< + int Function(SecTrustRef, ffi.Pointer)>(); - int sec_protocol_metadata_get_negotiated_tls_protocol_version( - sec_protocol_metadata_t metadata, + int SecTrustEvaluateAsync( + SecTrustRef trust, + dispatch_queue_t queue, + SecTrustCallback result, ) { - return _sec_protocol_metadata_get_negotiated_tls_protocol_version( - metadata, + return _SecTrustEvaluateAsync( + trust, + queue, + result, ); } - 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 _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 sec_protocol_metadata_get_negotiated_protocol_version( - sec_protocol_metadata_t metadata, + bool SecTrustEvaluateWithError( + SecTrustRef trust, + ffi.Pointer error, ) { - return _sec_protocol_metadata_get_negotiated_protocol_version( - metadata, + return _SecTrustEvaluateWithError( + trust, + error, ); } - 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 _SecTrustEvaluateWithErrorPtr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(SecTrustRef, + ffi.Pointer)>>('SecTrustEvaluateWithError'); + late final _SecTrustEvaluateWithError = _SecTrustEvaluateWithErrorPtr + .asFunction)>(); - int sec_protocol_metadata_get_negotiated_tls_ciphersuite( - sec_protocol_metadata_t metadata, + int SecTrustEvaluateAsyncWithError( + SecTrustRef trust, + dispatch_queue_t queue, + SecTrustWithErrorCallback result, ) { - return _sec_protocol_metadata_get_negotiated_tls_ciphersuite( - metadata, + return _SecTrustEvaluateAsyncWithError( + trust, + queue, + result, ); } - 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 _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 sec_protocol_metadata_get_negotiated_ciphersuite( - sec_protocol_metadata_t metadata, + int SecTrustGetTrustResult( + SecTrustRef trust, + ffi.Pointer result, ) { - return _sec_protocol_metadata_get_negotiated_ciphersuite( - metadata, + return _SecTrustGetTrustResult( + trust, + result, ); } - 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 _SecTrustGetTrustResultPtr = _lookup< + ffi.NativeFunction< + OSStatus Function( + SecTrustRef, ffi.Pointer)>>('SecTrustGetTrustResult'); + late final _SecTrustGetTrustResult = _SecTrustGetTrustResultPtr.asFunction< + int Function(SecTrustRef, ffi.Pointer)>(); - bool sec_protocol_metadata_get_early_data_accepted( - sec_protocol_metadata_t metadata, + SecKeyRef SecTrustCopyPublicKey( + SecTrustRef trust, ) { - return _sec_protocol_metadata_get_early_data_accepted( - metadata, + return _SecTrustCopyPublicKey( + trust, ); } - 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 _SecTrustCopyPublicKeyPtr = + _lookup>( + 'SecTrustCopyPublicKey'); + late final _SecTrustCopyPublicKey = + _SecTrustCopyPublicKeyPtr.asFunction(); - bool sec_protocol_metadata_access_peer_certificate_chain( - sec_protocol_metadata_t metadata, - ffi.Pointer<_ObjCBlock> handler, + SecKeyRef SecTrustCopyKey( + SecTrustRef trust, ) { - return _sec_protocol_metadata_access_peer_certificate_chain( - metadata, - handler, + return _SecTrustCopyKey( + trust, ); } - 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, + late final _SecTrustCopyKeyPtr = + _lookup>( + 'SecTrustCopyKey'); + late final _SecTrustCopyKey = + _SecTrustCopyKeyPtr.asFunction(); + + int SecTrustGetCertificateCount( + SecTrustRef trust, ) { - return _sec_protocol_metadata_access_ocsp_response( - metadata, - handler, + return _SecTrustGetCertificateCount( + 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 _SecTrustGetCertificateCountPtr = + _lookup>( + 'SecTrustGetCertificateCount'); + late final _SecTrustGetCertificateCount = + _SecTrustGetCertificateCountPtr.asFunction(); - bool sec_protocol_metadata_access_supported_signature_algorithms( - sec_protocol_metadata_t metadata, - ffi.Pointer<_ObjCBlock> handler, + SecCertificateRef SecTrustGetCertificateAtIndex( + SecTrustRef trust, + int ix, ) { - return _sec_protocol_metadata_access_supported_signature_algorithms( - metadata, - handler, + return _SecTrustGetCertificateAtIndex( + trust, + ix, ); } - 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 _SecTrustGetCertificateAtIndexPtr = _lookup< + ffi.NativeFunction>( + 'SecTrustGetCertificateAtIndex'); + late final _SecTrustGetCertificateAtIndex = _SecTrustGetCertificateAtIndexPtr + .asFunction(); - bool sec_protocol_metadata_access_distinguished_names( - sec_protocol_metadata_t metadata, - ffi.Pointer<_ObjCBlock> handler, + CFDataRef SecTrustCopyExceptions( + SecTrustRef trust, ) { - return _sec_protocol_metadata_access_distinguished_names( - metadata, - handler, + return _SecTrustCopyExceptions( + trust, ); } - 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>)>(); + late final _SecTrustCopyExceptionsPtr = + _lookup>( + 'SecTrustCopyExceptions'); + late final _SecTrustCopyExceptions = + _SecTrustCopyExceptionsPtr.asFunction(); - bool sec_protocol_metadata_access_pre_shared_keys( - sec_protocol_metadata_t metadata, - ffi.Pointer<_ObjCBlock> handler, + bool SecTrustSetExceptions( + SecTrustRef trust, + CFDataRef exceptions, ) { - return _sec_protocol_metadata_access_pre_shared_keys( - metadata, - handler, + return _SecTrustSetExceptions( + trust, + exceptions, ); } - 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>)>(); + late final _SecTrustSetExceptionsPtr = + _lookup>( + 'SecTrustSetExceptions'); + late final _SecTrustSetExceptions = _SecTrustSetExceptionsPtr.asFunction< + bool Function(SecTrustRef, CFDataRef)>(); - ffi.Pointer sec_protocol_metadata_get_server_name( - sec_protocol_metadata_t metadata, + CFArrayRef SecTrustCopyProperties( + SecTrustRef trust, ) { - return _sec_protocol_metadata_get_server_name( - metadata, + return _SecTrustCopyProperties( + trust, ); } - 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 _SecTrustCopyPropertiesPtr = + _lookup>( + 'SecTrustCopyProperties'); + late final _SecTrustCopyProperties = + _SecTrustCopyPropertiesPtr.asFunction(); - bool sec_protocol_metadata_peers_are_equal( - sec_protocol_metadata_t metadataA, - sec_protocol_metadata_t metadataB, + CFDictionaryRef SecTrustCopyResult( + SecTrustRef trust, ) { - return _sec_protocol_metadata_peers_are_equal( - metadataA, - metadataB, + return _SecTrustCopyResult( + trust, ); } - 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 _SecTrustCopyResultPtr = + _lookup>( + 'SecTrustCopyResult'); + late final _SecTrustCopyResult = _SecTrustCopyResultPtr.asFunction< + CFDictionaryRef Function(SecTrustRef)>(); - bool sec_protocol_metadata_challenge_parameters_are_equal( - sec_protocol_metadata_t metadataA, - sec_protocol_metadata_t metadataB, + int SecTrustSetOCSPResponse( + SecTrustRef trust, + CFTypeRef responseData, ) { - return _sec_protocol_metadata_challenge_parameters_are_equal( - metadataA, - metadataB, + return _SecTrustSetOCSPResponse( + trust, + responseData, ); } - 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 _SecTrustSetOCSPResponsePtr = + _lookup>( + 'SecTrustSetOCSPResponse'); + late final _SecTrustSetOCSPResponse = _SecTrustSetOCSPResponsePtr.asFunction< + int Function(SecTrustRef, CFTypeRef)>(); - dispatch_data_t sec_protocol_metadata_create_secret( - sec_protocol_metadata_t metadata, - int label_len, - ffi.Pointer label, - int exporter_length, + int SecTrustSetSignedCertificateTimestamps( + SecTrustRef trust, + CFArrayRef sctArray, ) { - return _sec_protocol_metadata_create_secret( - metadata, - label_len, - label, - exporter_length, + return _SecTrustSetSignedCertificateTimestamps( + trust, + sctArray, ); } - 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)>(); + late final _SecTrustSetSignedCertificateTimestampsPtr = + _lookup>( + 'SecTrustSetSignedCertificateTimestamps'); + late final _SecTrustSetSignedCertificateTimestamps = + _SecTrustSetSignedCertificateTimestampsPtr.asFunction< + int Function(SecTrustRef, CFArrayRef)>(); - 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, + CFArrayRef SecTrustCopyCertificateChain( + SecTrustRef trust, ) { - return _sec_protocol_metadata_create_secret_with_context( - metadata, - label_len, - label, - context_len, - context, - exporter_length, + return _SecTrustCopyCertificateChain( + trust, ); } - 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 _SecTrustCopyCertificateChainPtr = + _lookup>( + 'SecTrustCopyCertificateChain'); + late final _SecTrustCopyCertificateChain = _SecTrustCopyCertificateChainPtr + .asFunction(); - bool sec_protocol_options_are_equal( - sec_protocol_options_t optionsA, - sec_protocol_options_t optionsB, + 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 _sec_protocol_options_are_equal( - optionsA, - optionsB, + return _cssmPerror( + how, + error, ); } - late final _sec_protocol_options_are_equalPtr = _lookup< + late final _cssmPerrorPtr = _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.Void Function(ffi.Pointer, CSSM_RETURN)>>('cssmPerror'); + late final _cssmPerror = + _cssmPerrorPtr.asFunction, int)>(); - void sec_protocol_options_set_local_identity( - sec_protocol_options_t options, - sec_identity_t identity, + bool cssmOidToAlg( + ffi.Pointer oid, + ffi.Pointer alg, ) { - return _sec_protocol_options_set_local_identity( - options, - identity, + return _cssmOidToAlg( + oid, + alg, ); } - late final _sec_protocol_options_set_local_identityPtr = _lookup< + late final _cssmOidToAlgPtr = _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.Bool Function(ffi.Pointer, + ffi.Pointer)>>('cssmOidToAlg'); + late final _cssmOidToAlg = _cssmOidToAlgPtr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer)>(); - void sec_protocol_options_append_tls_ciphersuite( - sec_protocol_options_t options, - int ciphersuite, + ffi.Pointer cssmAlgToOid( + int algId, ) { - return _sec_protocol_options_append_tls_ciphersuite( - options, - ciphersuite, + return _cssmAlgToOid( + algId, ); } - 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 _cssmAlgToOidPtr = _lookup< + ffi + .NativeFunction Function(CSSM_ALGORITHMS)>>( + 'cssmAlgToOid'); + late final _cssmAlgToOid = + _cssmAlgToOidPtr.asFunction Function(int)>(); - void sec_protocol_options_add_tls_ciphersuite( - sec_protocol_options_t options, - int ciphersuite, + int SecTrustSetOptions( + SecTrustRef trustRef, + int options, ) { - return _sec_protocol_options_add_tls_ciphersuite( + return _SecTrustSetOptions( + trustRef, 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(); + late final _SecTrustSetOptionsPtr = + _lookup>( + 'SecTrustSetOptions'); + late final _SecTrustSetOptions = + _SecTrustSetOptionsPtr.asFunction(); - void sec_protocol_options_append_tls_ciphersuite_group( - sec_protocol_options_t options, - int group, + int SecTrustSetParameters( + SecTrustRef trustRef, + int action, + CFDataRef actionData, ) { - return _sec_protocol_options_append_tls_ciphersuite_group( - options, - group, + return _SecTrustSetParameters( + trustRef, + action, + actionData, ); } - late final _sec_protocol_options_append_tls_ciphersuite_groupPtr = _lookup< + late final _SecTrustSetParametersPtr = _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(); + OSStatus Function(SecTrustRef, CSSM_TP_ACTION, + CFDataRef)>>('SecTrustSetParameters'); + late final _SecTrustSetParameters = _SecTrustSetParametersPtr.asFunction< + int Function(SecTrustRef, int, CFDataRef)>(); - void sec_protocol_options_add_tls_ciphersuite_group( - sec_protocol_options_t options, - int group, + int SecTrustSetKeychains( + SecTrustRef trust, + CFTypeRef keychainOrArray, ) { - return _sec_protocol_options_add_tls_ciphersuite_group( - options, - group, + return _SecTrustSetKeychains( + trust, + keychainOrArray, ); } - 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 _SecTrustSetKeychainsPtr = + _lookup>( + 'SecTrustSetKeychains'); + late final _SecTrustSetKeychains = _SecTrustSetKeychainsPtr.asFunction< + int Function(SecTrustRef, CFTypeRef)>(); - void sec_protocol_options_set_tls_min_version( - sec_protocol_options_t options, - int version, + int SecTrustGetResult( + SecTrustRef trustRef, + ffi.Pointer result, + ffi.Pointer certChain, + ffi.Pointer> statusChain, ) { - return _sec_protocol_options_set_tls_min_version( - options, - version, + return _SecTrustGetResult( + trustRef, + result, + certChain, + statusChain, ); } - 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 _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_min_tls_protocol_version( - sec_protocol_options_t options, - int version, + int SecTrustGetCssmResult( + SecTrustRef trust, + ffi.Pointer result, ) { - return _sec_protocol_options_set_min_tls_protocol_version( - options, - version, + return _SecTrustGetCssmResult( + trust, + result, ); } - 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(); + late final _SecTrustGetCssmResultPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SecTrustRef, + ffi.Pointer)>>( + 'SecTrustGetCssmResult'); + late final _SecTrustGetCssmResult = _SecTrustGetCssmResultPtr.asFunction< + int Function( + SecTrustRef, ffi.Pointer)>(); - int sec_protocol_options_get_default_min_tls_protocol_version() { - return _sec_protocol_options_get_default_min_tls_protocol_version(); + int SecTrustGetCssmResultCode( + SecTrustRef trust, + ffi.Pointer resultCode, + ) { + return _SecTrustGetCssmResultCode( + trust, + resultCode, + ); } - 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 _SecTrustGetCssmResultCodePtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SecTrustRef, + ffi.Pointer)>>('SecTrustGetCssmResultCode'); + late final _SecTrustGetCssmResultCode = _SecTrustGetCssmResultCodePtr + .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, + 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(); - - 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(); + late final _SecTrustCopyAnchorCertificatesPtr = + _lookup)>>( + 'SecTrustCopyAnchorCertificates'); + late final _SecTrustCopyAnchorCertificates = + _SecTrustCopyAnchorCertificatesPtr.asFunction< + int Function(ffi.Pointer)>(); - int sec_protocol_options_get_default_max_dtls_protocol_version() { - return _sec_protocol_options_get_default_max_dtls_protocol_version(); + int SecCertificateGetTypeID() { + return _SecCertificateGetTypeID(); } - 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 _SecCertificateGetTypeIDPtr = + _lookup>( + 'SecCertificateGetTypeID'); + late final _SecCertificateGetTypeID = + _SecCertificateGetTypeIDPtr.asFunction(); - bool sec_protocol_options_get_enable_encrypted_client_hello( - sec_protocol_options_t options, + SecCertificateRef SecCertificateCreateWithData( + CFAllocatorRef allocator, + CFDataRef data, ) { - return _sec_protocol_options_get_enable_encrypted_client_hello( - options, + return _SecCertificateCreateWithData( + allocator, + data, ); } - 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 _SecCertificateCreateWithDataPtr = _lookup< + ffi.NativeFunction< + SecCertificateRef Function( + CFAllocatorRef, CFDataRef)>>('SecCertificateCreateWithData'); + late final _SecCertificateCreateWithData = _SecCertificateCreateWithDataPtr + .asFunction(); - bool sec_protocol_options_get_quic_use_legacy_codepoint( - sec_protocol_options_t options, + CFDataRef SecCertificateCopyData( + SecCertificateRef certificate, ) { - return _sec_protocol_options_get_quic_use_legacy_codepoint( - options, + return _SecCertificateCopyData( + 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 _SecCertificateCopyDataPtr = + _lookup>( + 'SecCertificateCopyData'); + late final _SecCertificateCopyData = _SecCertificateCopyDataPtr.asFunction< + CFDataRef Function(SecCertificateRef)>(); - void sec_protocol_options_add_tls_application_protocol( - sec_protocol_options_t options, - ffi.Pointer application_protocol, + CFStringRef SecCertificateCopySubjectSummary( + SecCertificateRef certificate, ) { - return _sec_protocol_options_add_tls_application_protocol( - options, - application_protocol, + return _SecCertificateCopySubjectSummary( + certificate, ); } - 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 _SecCertificateCopySubjectSummaryPtr = + _lookup>( + 'SecCertificateCopySubjectSummary'); + late final _SecCertificateCopySubjectSummary = + _SecCertificateCopySubjectSummaryPtr.asFunction< + CFStringRef Function(SecCertificateRef)>(); - void sec_protocol_options_set_tls_server_name( - sec_protocol_options_t options, - ffi.Pointer server_name, + int SecCertificateCopyCommonName( + SecCertificateRef certificate, + ffi.Pointer commonName, ) { - return _sec_protocol_options_set_tls_server_name( - options, - server_name, + return _SecCertificateCopyCommonName( + certificate, + commonName, ); } - 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 _SecCertificateCopyCommonNamePtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SecCertificateRef, + ffi.Pointer)>>('SecCertificateCopyCommonName'); + late final _SecCertificateCopyCommonName = _SecCertificateCopyCommonNamePtr + .asFunction)>(); - void sec_protocol_options_set_tls_diffie_hellman_parameters( - sec_protocol_options_t options, - dispatch_data_t params, + int SecCertificateCopyEmailAddresses( + SecCertificateRef certificate, + ffi.Pointer emailAddresses, ) { - return _sec_protocol_options_set_tls_diffie_hellman_parameters( - options, - params, + return _SecCertificateCopyEmailAddresses( + certificate, + emailAddresses, ); } - 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 _SecCertificateCopyEmailAddressesPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SecCertificateRef, + ffi.Pointer)>>('SecCertificateCopyEmailAddresses'); + late final _SecCertificateCopyEmailAddresses = + _SecCertificateCopyEmailAddressesPtr.asFunction< + int Function(SecCertificateRef, ffi.Pointer)>(); - void sec_protocol_options_add_pre_shared_key( - sec_protocol_options_t options, - dispatch_data_t psk, - dispatch_data_t psk_identity, + CFDataRef SecCertificateCopyNormalizedIssuerSequence( + SecCertificateRef certificate, ) { - return _sec_protocol_options_add_pre_shared_key( - options, - psk, - psk_identity, + return _SecCertificateCopyNormalizedIssuerSequence( + 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 _SecCertificateCopyNormalizedIssuerSequencePtr = + _lookup>( + 'SecCertificateCopyNormalizedIssuerSequence'); + late final _SecCertificateCopyNormalizedIssuerSequence = + _SecCertificateCopyNormalizedIssuerSequencePtr.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, + CFDataRef SecCertificateCopyNormalizedSubjectSequence( + SecCertificateRef certificate, ) { - return _sec_protocol_options_set_tls_pre_shared_key_identity_hint( - options, - psk_identity_hint, + return _SecCertificateCopyNormalizedSubjectSequence( + 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 _SecCertificateCopyNormalizedSubjectSequencePtr = + _lookup>( + 'SecCertificateCopyNormalizedSubjectSequence'); + late final _SecCertificateCopyNormalizedSubjectSequence = + _SecCertificateCopyNormalizedSubjectSequencePtr.asFunction< + CFDataRef 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, + SecKeyRef SecCertificateCopyKey( + SecCertificateRef certificate, ) { - return _sec_protocol_options_set_pre_shared_key_selection_block( - options, - psk_selection_block, - psk_selection_queue, + return _SecCertificateCopyKey( + certificate, ); } - 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 _SecCertificateCopyKeyPtr = + _lookup>( + 'SecCertificateCopyKey'); + late final _SecCertificateCopyKey = _SecCertificateCopyKeyPtr.asFunction< + SecKeyRef Function(SecCertificateRef)>(); - void sec_protocol_options_set_tls_tickets_enabled( - sec_protocol_options_t options, - bool tickets_enabled, + int SecCertificateCopyPublicKey( + SecCertificateRef certificate, + ffi.Pointer key, ) { - return _sec_protocol_options_set_tls_tickets_enabled( - options, - tickets_enabled, + return _SecCertificateCopyPublicKey( + certificate, + key, ); } - late final _sec_protocol_options_set_tls_tickets_enabledPtr = _lookup< + late final _SecCertificateCopyPublicKeyPtr = _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(); + OSStatus Function(SecCertificateRef, + ffi.Pointer)>>('SecCertificateCopyPublicKey'); + late final _SecCertificateCopyPublicKey = _SecCertificateCopyPublicKeyPtr + .asFunction)>(); - void sec_protocol_options_set_tls_is_fallback_attempt( - sec_protocol_options_t options, - bool is_fallback_attempt, + CFDataRef SecCertificateCopySerialNumberData( + SecCertificateRef certificate, + ffi.Pointer error, ) { - return _sec_protocol_options_set_tls_is_fallback_attempt( - options, - is_fallback_attempt, + return _SecCertificateCopySerialNumberData( + certificate, + error, ); } - late final _sec_protocol_options_set_tls_is_fallback_attemptPtr = _lookup< + late final _SecCertificateCopySerialNumberDataPtr = _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)>>('SecCertificateCopySerialNumberData'); + late final _SecCertificateCopySerialNumberData = + _SecCertificateCopySerialNumberDataPtr.asFunction< + CFDataRef Function(SecCertificateRef, ffi.Pointer)>(); - void sec_protocol_options_set_tls_resumption_enabled( - sec_protocol_options_t options, - bool resumption_enabled, + CFDataRef SecCertificateCopySerialNumber( + SecCertificateRef certificate, + ffi.Pointer error, ) { - return _sec_protocol_options_set_tls_resumption_enabled( - options, - resumption_enabled, + return _SecCertificateCopySerialNumber( + certificate, + error, ); } - late final _sec_protocol_options_set_tls_resumption_enabledPtr = _lookup< + late final _SecCertificateCopySerialNumberPtr = _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(); + CFDataRef Function(SecCertificateRef, + ffi.Pointer)>>('SecCertificateCopySerialNumber'); + late final _SecCertificateCopySerialNumber = + _SecCertificateCopySerialNumberPtr.asFunction< + CFDataRef Function(SecCertificateRef, ffi.Pointer)>(); - void sec_protocol_options_set_tls_false_start_enabled( - sec_protocol_options_t options, - bool false_start_enabled, + int SecCertificateCreateFromData( + ffi.Pointer data, + int type, + int encoding, + ffi.Pointer certificate, ) { - return _sec_protocol_options_set_tls_false_start_enabled( - options, - false_start_enabled, + return _SecCertificateCreateFromData( + data, + type, + encoding, + certificate, ); } - late final _sec_protocol_options_set_tls_false_start_enabledPtr = _lookup< + late final _SecCertificateCreateFromDataPtr = _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( + 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_ocsp_enabled( - sec_protocol_options_t options, - bool ocsp_enabled, + int SecCertificateAddToKeychain( + SecCertificateRef certificate, + SecKeychainRef keychain, ) { - return _sec_protocol_options_set_tls_ocsp_enabled( - options, - ocsp_enabled, + return _SecCertificateAddToKeychain( + certificate, + keychain, ); } - late final _sec_protocol_options_set_tls_ocsp_enabledPtr = _lookup< + late final _SecCertificateAddToKeychainPtr = _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, + SecKeychainRef)>>('SecCertificateAddToKeychain'); + late final _SecCertificateAddToKeychain = _SecCertificateAddToKeychainPtr + .asFunction(); - void sec_protocol_options_set_tls_sct_enabled( - sec_protocol_options_t options, - bool sct_enabled, + int SecCertificateGetData( + SecCertificateRef certificate, + CSSM_DATA_PTR data, ) { - return _sec_protocol_options_set_tls_sct_enabled( - options, - sct_enabled, + return _SecCertificateGetData( + certificate, + data, ); } - 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 _SecCertificateGetDataPtr = _lookup< + ffi + .NativeFunction>( + 'SecCertificateGetData'); + late final _SecCertificateGetData = _SecCertificateGetDataPtr.asFunction< + int Function(SecCertificateRef, CSSM_DATA_PTR)>(); - void sec_protocol_options_set_tls_renegotiation_enabled( - sec_protocol_options_t options, - bool renegotiation_enabled, + int SecCertificateGetType( + SecCertificateRef certificate, + ffi.Pointer certificateType, ) { - return _sec_protocol_options_set_tls_renegotiation_enabled( - options, - renegotiation_enabled, + return _SecCertificateGetType( + certificate, + certificateType, ); } - late final _sec_protocol_options_set_tls_renegotiation_enabledPtr = _lookup< + late final _SecCertificateGetTypePtr = _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(); + OSStatus Function(SecCertificateRef, + ffi.Pointer)>>('SecCertificateGetType'); + late final _SecCertificateGetType = _SecCertificateGetTypePtr.asFunction< + int Function(SecCertificateRef, ffi.Pointer)>(); - void sec_protocol_options_set_peer_authentication_required( - sec_protocol_options_t options, - bool peer_authentication_required, + int SecCertificateGetSubject( + SecCertificateRef certificate, + ffi.Pointer> subject, ) { - return _sec_protocol_options_set_peer_authentication_required( - options, - peer_authentication_required, + return _SecCertificateGetSubject( + certificate, + subject, ); } - 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 _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_optional( - sec_protocol_options_t options, - bool peer_authentication_optional, + int SecCertificateGetIssuer( + SecCertificateRef certificate, + ffi.Pointer> issuer, ) { - return _sec_protocol_options_set_peer_authentication_optional( - options, - peer_authentication_optional, + return _SecCertificateGetIssuer( + certificate, + issuer, ); } - 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 _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_enable_encrypted_client_hello( - sec_protocol_options_t options, - bool enable_encrypted_client_hello, + int SecCertificateGetCLHandle( + SecCertificateRef certificate, + ffi.Pointer clHandle, ) { - return _sec_protocol_options_set_enable_encrypted_client_hello( - options, - enable_encrypted_client_hello, + return _SecCertificateGetCLHandle( + certificate, + clHandle, ); } - 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 _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_quic_use_legacy_codepoint( - sec_protocol_options_t options, - bool quic_use_legacy_codepoint, + int SecCertificateGetAlgorithmID( + SecCertificateRef certificate, + ffi.Pointer> algid, ) { - return _sec_protocol_options_set_quic_use_legacy_codepoint( - options, - quic_use_legacy_codepoint, + return _SecCertificateGetAlgorithmID( + certificate, + algid, ); } - 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(); + 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_key_update_block( - sec_protocol_options_t options, - sec_protocol_key_update_t key_update_block, - dispatch_queue_t key_update_queue, + int SecCertificateCopyPreference( + CFStringRef name, + int keyUsage, + ffi.Pointer certificate, ) { - return _sec_protocol_options_set_key_update_block( - options, - key_update_block, - key_update_queue, + return _SecCertificateCopyPreference( + name, + keyUsage, + certificate, ); } - late final _sec_protocol_options_set_key_update_blockPtr = _lookup< + late final _SecCertificateCopyPreferencePtr = _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)>(); + OSStatus Function(CFStringRef, uint32, + ffi.Pointer)>>('SecCertificateCopyPreference'); + late final _SecCertificateCopyPreference = + _SecCertificateCopyPreferencePtr.asFunction< + int Function(CFStringRef, int, ffi.Pointer)>(); - void sec_protocol_options_set_challenge_block( - sec_protocol_options_t options, - sec_protocol_challenge_t challenge_block, - dispatch_queue_t challenge_queue, + SecCertificateRef SecCertificateCopyPreferred( + CFStringRef name, + CFArrayRef keyUsage, ) { - return _sec_protocol_options_set_challenge_block( - options, - challenge_block, - challenge_queue, + return _SecCertificateCopyPreferred( + name, + keyUsage, ); } - late final _sec_protocol_options_set_challenge_blockPtr = _lookup< + late final _SecCertificateCopyPreferredPtr = _lookup< + ffi + .NativeFunction>( + '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< - 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'); + + 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 _SSLContextGetTypeIDPtr = - _lookup>('SSLContextGetTypeID'); - late final _SSLContextGetTypeID = - _SSLContextGetTypeIDPtr.asFunction(); + late final _SecCertificateCopyValuesPtr = _lookup< + ffi.NativeFunction< + CFDictionaryRef Function(SecCertificateRef, CFArrayRef, + ffi.Pointer)>>('SecCertificateCopyValues'); + late final _SecCertificateCopyValues = + _SecCertificateCopyValuesPtr.asFunction< + CFDictionaryRef Function( + SecCertificateRef, CFArrayRef, ffi.Pointer)>(); - SSLContextRef SSLCreateContext( + CFStringRef SecCertificateCopyLongDescription( CFAllocatorRef alloc, - int protocolSide, - int connectionType, + SecCertificateRef certificate, + ffi.Pointer error, ) { - return _SSLCreateContext( + return _SecCertificateCopyLongDescription( alloc, - protocolSide, - connectionType, + certificate, + error, ); } - late final _SSLCreateContextPtr = _lookup< + late final _SecCertificateCopyLongDescriptionPtr = _lookup< ffi.NativeFunction< - SSLContextRef Function( - CFAllocatorRef, ffi.Int32, ffi.Int32)>>('SSLCreateContext'); - late final _SSLCreateContext = _SSLCreateContextPtr.asFunction< - SSLContextRef Function(CFAllocatorRef, int, int)>(); + CFStringRef Function(CFAllocatorRef, SecCertificateRef, + ffi.Pointer)>>('SecCertificateCopyLongDescription'); + late final _SecCertificateCopyLongDescription = + _SecCertificateCopyLongDescriptionPtr.asFunction< + CFStringRef Function( + CFAllocatorRef, SecCertificateRef, ffi.Pointer)>(); - int SSLNewContext( - int isServer, - ffi.Pointer contextPtr, + CFStringRef SecCertificateCopyShortDescription( + CFAllocatorRef alloc, + SecCertificateRef certificate, + ffi.Pointer error, ) { - return _SSLNewContext( - isServer, - contextPtr, + return _SecCertificateCopyShortDescription( + alloc, + certificate, + error, ); } - late final _SSLNewContextPtr = _lookup< + late final _SecCertificateCopyShortDescriptionPtr = _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)>>('SecCertificateCopyShortDescription'); + late final _SecCertificateCopyShortDescription = + _SecCertificateCopyShortDescriptionPtr.asFunction< + CFStringRef Function( + CFAllocatorRef, SecCertificateRef, ffi.Pointer)>(); - int SSLDisposeContext( - SSLContextRef context, + CFDataRef SecCertificateCopyNormalizedIssuerContent( + SecCertificateRef certificate, + ffi.Pointer error, ) { - return _SSLDisposeContext( - context, + return _SecCertificateCopyNormalizedIssuerContent( + certificate, + error, ); } - late final _SSLDisposeContextPtr = - _lookup>( - 'SSLDisposeContext'); - late final _SSLDisposeContext = - _SSLDisposeContextPtr.asFunction(); + late final _SecCertificateCopyNormalizedIssuerContentPtr = _lookup< + ffi.NativeFunction< + CFDataRef Function(SecCertificateRef, ffi.Pointer)>>( + 'SecCertificateCopyNormalizedIssuerContent'); + late final _SecCertificateCopyNormalizedIssuerContent = + _SecCertificateCopyNormalizedIssuerContentPtr.asFunction< + CFDataRef Function(SecCertificateRef, ffi.Pointer)>(); - int SSLGetSessionState( - SSLContextRef context, - ffi.Pointer state, + CFDataRef SecCertificateCopyNormalizedSubjectContent( + SecCertificateRef certificate, + ffi.Pointer error, ) { - return _SSLGetSessionState( - context, - state, + return _SecCertificateCopyNormalizedSubjectContent( + 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 _SecCertificateCopyNormalizedSubjectContentPtr = _lookup< + ffi.NativeFunction< + CFDataRef Function(SecCertificateRef, ffi.Pointer)>>( + 'SecCertificateCopyNormalizedSubjectContent'); + late final _SecCertificateCopyNormalizedSubjectContent = + _SecCertificateCopyNormalizedSubjectContentPtr.asFunction< + CFDataRef Function(SecCertificateRef, ffi.Pointer)>(); - int SSLSetSessionOption( - SSLContextRef context, - int option, - int 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 _SSLSetSessionOption( - context, - option, - value, + return _SecIdentityCreateWithCertificate( + keychainOrArray, + certificateRef, + identityRef, ); } - 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 _SecIdentityCreateWithCertificatePtr = _lookup< + ffi.NativeFunction< + OSStatus Function( + CFTypeRef, SecCertificateRef, ffi.Pointer)>>( + 'SecIdentityCreateWithCertificate'); + late final _SecIdentityCreateWithCertificate = + _SecIdentityCreateWithCertificatePtr.asFunction< + int Function( + CFTypeRef, SecCertificateRef, ffi.Pointer)>(); - int SSLGetSessionOption( - SSLContextRef context, - int option, - ffi.Pointer value, + int SecIdentityCopyCertificate( + SecIdentityRef identityRef, + ffi.Pointer certificateRef, ) { - return _SSLGetSessionOption( - context, - option, - value, + return _SecIdentityCopyCertificate( + identityRef, + certificateRef, ); } - late final _SSLGetSessionOptionPtr = _lookup< + late final _SecIdentityCopyCertificatePtr = _lookup< ffi.NativeFunction< - OSStatus Function(SSLContextRef, ffi.Int32, - ffi.Pointer)>>('SSLGetSessionOption'); - late final _SSLGetSessionOption = _SSLGetSessionOptionPtr.asFunction< - int Function(SSLContextRef, int, ffi.Pointer)>(); + OSStatus Function(SecIdentityRef, + ffi.Pointer)>>('SecIdentityCopyCertificate'); + late final _SecIdentityCopyCertificate = + _SecIdentityCopyCertificatePtr.asFunction< + int Function(SecIdentityRef, ffi.Pointer)>(); - int SSLSetIOFuncs( - SSLContextRef context, - SSLReadFunc readFunc, - SSLWriteFunc writeFunc, + int SecIdentityCopyPrivateKey( + SecIdentityRef identityRef, + ffi.Pointer privateKeyRef, ) { - return _SSLSetIOFuncs( - context, - readFunc, - writeFunc, + return _SecIdentityCopyPrivateKey( + identityRef, + privateKeyRef, ); } - late final _SSLSetIOFuncsPtr = _lookup< + late final _SecIdentityCopyPrivateKeyPtr = _lookup< ffi.NativeFunction< - OSStatus Function( - SSLContextRef, SSLReadFunc, SSLWriteFunc)>>('SSLSetIOFuncs'); - late final _SSLSetIOFuncs = _SSLSetIOFuncsPtr.asFunction< - int Function(SSLContextRef, SSLReadFunc, SSLWriteFunc)>(); + OSStatus Function(SecIdentityRef, + ffi.Pointer)>>('SecIdentityCopyPrivateKey'); + late final _SecIdentityCopyPrivateKey = _SecIdentityCopyPrivateKeyPtr + .asFunction)>(); - int SSLSetSessionConfig( - SSLContextRef context, - CFStringRef config, + int SecIdentityCopyPreference( + CFStringRef name, + int keyUsage, + CFArrayRef validIssuers, + ffi.Pointer identity, ) { - return _SSLSetSessionConfig( - context, - config, + return _SecIdentityCopyPreference( + name, + keyUsage, + validIssuers, + identity, ); } - late final _SSLSetSessionConfigPtr = _lookup< - ffi.NativeFunction>( - 'SSLSetSessionConfig'); - late final _SSLSetSessionConfig = _SSLSetSessionConfigPtr.asFunction< - int Function(SSLContextRef, CFStringRef)>(); - - int SSLSetProtocolVersionMin( - SSLContextRef context, - int minVersion, + 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 _SSLSetProtocolVersionMin( - context, - minVersion, + return _SecIdentityCopyPreferred( + name, + keyUsage, + validIssuers, ); } - late final _SSLSetProtocolVersionMinPtr = - _lookup>( - 'SSLSetProtocolVersionMin'); - late final _SSLSetProtocolVersionMin = _SSLSetProtocolVersionMinPtr - .asFunction(); + late final _SecIdentityCopyPreferredPtr = _lookup< + ffi.NativeFunction< + SecIdentityRef Function(CFStringRef, CFArrayRef, + CFArrayRef)>>('SecIdentityCopyPreferred'); + late final _SecIdentityCopyPreferred = + _SecIdentityCopyPreferredPtr.asFunction< + SecIdentityRef Function(CFStringRef, CFArrayRef, CFArrayRef)>(); - int SSLGetProtocolVersionMin( - SSLContextRef context, - ffi.Pointer minVersion, + int SecIdentitySetPreference( + SecIdentityRef identity, + CFStringRef name, + int keyUsage, ) { - return _SSLGetProtocolVersionMin( - context, - minVersion, + return _SecIdentitySetPreference( + identity, + name, + keyUsage, ); } - late final _SSLGetProtocolVersionMinPtr = _lookup< + late final _SecIdentitySetPreferencePtr = _lookup< ffi.NativeFunction< - OSStatus Function(SSLContextRef, - ffi.Pointer)>>('SSLGetProtocolVersionMin'); - late final _SSLGetProtocolVersionMin = _SSLGetProtocolVersionMinPtr - .asFunction)>(); + OSStatus Function(SecIdentityRef, CFStringRef, + CSSM_KEYUSE)>>('SecIdentitySetPreference'); + late final _SecIdentitySetPreference = _SecIdentitySetPreferencePtr + .asFunction(); - int SSLSetProtocolVersionMax( - SSLContextRef context, - int maxVersion, + int SecIdentitySetPreferred( + SecIdentityRef identity, + CFStringRef name, + CFArrayRef keyUsage, ) { - return _SSLSetProtocolVersionMax( - context, - maxVersion, + return _SecIdentitySetPreferred( + identity, + name, + keyUsage, ); } - late final _SSLSetProtocolVersionMaxPtr = - _lookup>( - 'SSLSetProtocolVersionMax'); - late final _SSLSetProtocolVersionMax = _SSLSetProtocolVersionMaxPtr - .asFunction(); + late final _SecIdentitySetPreferredPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SecIdentityRef, CFStringRef, + CFArrayRef)>>('SecIdentitySetPreferred'); + late final _SecIdentitySetPreferred = _SecIdentitySetPreferredPtr.asFunction< + int Function(SecIdentityRef, CFStringRef, CFArrayRef)>(); - int SSLGetProtocolVersionMax( - SSLContextRef context, - ffi.Pointer maxVersion, + int SecIdentityCopySystemIdentity( + CFStringRef domain, + ffi.Pointer idRef, + ffi.Pointer actualDomain, ) { - return _SSLGetProtocolVersionMax( - context, - maxVersion, + return _SecIdentityCopySystemIdentity( + domain, + idRef, + actualDomain, ); } - late final _SSLGetProtocolVersionMaxPtr = _lookup< + late final _SecIdentityCopySystemIdentityPtr = _lookup< ffi.NativeFunction< - OSStatus Function(SSLContextRef, - ffi.Pointer)>>('SSLGetProtocolVersionMax'); - late final _SSLGetProtocolVersionMax = _SSLGetProtocolVersionMaxPtr - .asFunction)>(); + OSStatus Function(CFStringRef, ffi.Pointer, + ffi.Pointer)>>('SecIdentityCopySystemIdentity'); + late final _SecIdentityCopySystemIdentity = + _SecIdentityCopySystemIdentityPtr.asFunction< + int Function(CFStringRef, ffi.Pointer, + ffi.Pointer)>(); - int SSLSetProtocolVersionEnabled( - SSLContextRef context, - int protocol, - int enable, + int SecIdentitySetSystemIdentity( + CFStringRef domain, + SecIdentityRef idRef, ) { - return _SSLSetProtocolVersionEnabled( - context, - protocol, - enable, + return _SecIdentitySetSystemIdentity( + domain, + idRef, ); } - late final _SSLSetProtocolVersionEnabledPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, ffi.Int32, - Boolean)>>('SSLSetProtocolVersionEnabled'); - late final _SSLSetProtocolVersionEnabled = _SSLSetProtocolVersionEnabledPtr - .asFunction(); + late final _SecIdentitySetSystemIdentityPtr = _lookup< + ffi.NativeFunction>( + 'SecIdentitySetSystemIdentity'); + late final _SecIdentitySetSystemIdentity = _SecIdentitySetSystemIdentityPtr + .asFunction(); - int SSLGetProtocolVersionEnabled( - SSLContextRef context, - int protocol, - ffi.Pointer enable, + 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 _SSLGetProtocolVersionEnabled( - context, - protocol, - enable, + return _sec_trust_create( + trust, ); } - late final _SSLGetProtocolVersionEnabledPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, ffi.Int32, - ffi.Pointer)>>('SSLGetProtocolVersionEnabled'); - late final _SSLGetProtocolVersionEnabled = _SSLGetProtocolVersionEnabledPtr - .asFunction)>(); + late final _sec_trust_createPtr = + _lookup>( + 'sec_trust_create'); + late final _sec_trust_create = + _sec_trust_createPtr.asFunction(); - int SSLSetProtocolVersion( - SSLContextRef context, - int version, + SecTrustRef sec_trust_copy_ref( + sec_trust_t trust, ) { - return _SSLSetProtocolVersion( - context, - version, + return _sec_trust_copy_ref( + trust, ); } - late final _SSLSetProtocolVersionPtr = - _lookup>( - 'SSLSetProtocolVersion'); - late final _SSLSetProtocolVersion = - _SSLSetProtocolVersionPtr.asFunction(); + late final _sec_trust_copy_refPtr = + _lookup>( + 'sec_trust_copy_ref'); + late final _sec_trust_copy_ref = + _sec_trust_copy_refPtr.asFunction(); - int SSLGetProtocolVersion( - SSLContextRef context, - ffi.Pointer protocol, + sec_identity_t sec_identity_create( + SecIdentityRef identity, ) { - return _SSLGetProtocolVersion( - context, - protocol, + return _sec_identity_create( + identity, ); } - 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_identity_createPtr = + _lookup>( + 'sec_identity_create'); + late final _sec_identity_create = _sec_identity_createPtr + .asFunction(); - int SSLSetCertificate( - SSLContextRef context, - CFArrayRef certRefs, + sec_identity_t sec_identity_create_with_certificates( + SecIdentityRef identity, + CFArrayRef certificates, ) { - return _SSLSetCertificate( - context, - certRefs, + return _sec_identity_create_with_certificates( + identity, + certificates, ); } - late final _SSLSetCertificatePtr = - _lookup>( - 'SSLSetCertificate'); - late final _SSLSetCertificate = _SSLSetCertificatePtr.asFunction< - int Function(SSLContextRef, CFArrayRef)>(); + 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(); - int SSLSetConnection( - SSLContextRef context, - SSLConnectionRef connection, + bool sec_identity_access_certificates( + sec_identity_t identity, + ffi.Pointer<_ObjCBlock> handler, ) { - return _SSLSetConnection( - context, - connection, + return _sec_identity_access_certificates( + identity, + handler, ); } - late final _SSLSetConnectionPtr = _lookup< + late final _sec_identity_access_certificatesPtr = _lookup< ffi.NativeFunction< - OSStatus Function( - SSLContextRef, SSLConnectionRef)>>('SSLSetConnection'); - late final _SSLSetConnection = _SSLSetConnectionPtr.asFunction< - int Function(SSLContextRef, SSLConnectionRef)>(); + 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 SSLGetConnection( - SSLContextRef context, - ffi.Pointer connection, + SecIdentityRef sec_identity_copy_ref( + sec_identity_t identity, ) { - return _SSLGetConnection( - context, - connection, + return _sec_identity_copy_ref( + identity, ); } - 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_identity_copy_refPtr = + _lookup>( + 'sec_identity_copy_ref'); + late final _sec_identity_copy_ref = _sec_identity_copy_refPtr + .asFunction(); - int SSLSetPeerDomainName( - SSLContextRef context, - ffi.Pointer peerName, - int peerNameLen, + CFArrayRef sec_identity_copy_certificates_ref( + sec_identity_t identity, ) { - return _SSLSetPeerDomainName( - context, - peerName, - peerNameLen, + return _sec_identity_copy_certificates_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_certificates_refPtr = + _lookup>( + 'sec_identity_copy_certificates_ref'); + late final _sec_identity_copy_certificates_ref = + _sec_identity_copy_certificates_refPtr + .asFunction(); - int SSLGetPeerDomainNameLength( - SSLContextRef context, - ffi.Pointer peerNameLen, + sec_certificate_t sec_certificate_create( + SecCertificateRef certificate, ) { - return _SSLGetPeerDomainNameLength( - context, - peerNameLen, + return _sec_certificate_create( + certificate, ); } - late final _SSLGetPeerDomainNameLengthPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, - ffi.Pointer)>>('SSLGetPeerDomainNameLength'); - late final _SSLGetPeerDomainNameLength = _SSLGetPeerDomainNameLengthPtr - .asFunction)>(); + late final _sec_certificate_createPtr = _lookup< + ffi.NativeFunction>( + 'sec_certificate_create'); + late final _sec_certificate_create = _sec_certificate_createPtr + .asFunction(); - int SSLGetPeerDomainName( - SSLContextRef context, - ffi.Pointer peerName, - ffi.Pointer peerNameLen, + SecCertificateRef sec_certificate_copy_ref( + sec_certificate_t certificate, ) { - return _SSLGetPeerDomainName( - context, - peerName, - peerNameLen, + return _sec_certificate_copy_ref( + 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_copy_refPtr = _lookup< + ffi.NativeFunction>( + 'sec_certificate_copy_ref'); + late final _sec_certificate_copy_ref = _sec_certificate_copy_refPtr + .asFunction(); - int SSLCopyRequestedPeerNameLength( - SSLContextRef ctx, - ffi.Pointer peerNameLen, + ffi.Pointer sec_protocol_metadata_get_negotiated_protocol( + sec_protocol_metadata_t metadata, ) { - return _SSLCopyRequestedPeerNameLength( - ctx, - peerNameLen, + return _sec_protocol_metadata_get_negotiated_protocol( + metadata, ); } - 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_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 SSLCopyRequestedPeerName( - SSLContextRef context, - ffi.Pointer peerName, - ffi.Pointer peerNameLen, + dispatch_data_t sec_protocol_metadata_copy_peer_public_key( + sec_protocol_metadata_t metadata, ) { - return _SSLCopyRequestedPeerName( - context, - peerName, - peerNameLen, + return _sec_protocol_metadata_copy_peer_public_key( + 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_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 SSLSetDatagramHelloCookie( - SSLContextRef dtlsContext, - ffi.Pointer cookie, - int cookieLen, + int sec_protocol_metadata_get_negotiated_tls_protocol_version( + sec_protocol_metadata_t metadata, ) { - return _SSLSetDatagramHelloCookie( - dtlsContext, - cookie, - cookieLen, + return _sec_protocol_metadata_get_negotiated_tls_protocol_version( + 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_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 SSLSetMaxDatagramRecordSize( - SSLContextRef dtlsContext, - int maxSize, + int sec_protocol_metadata_get_negotiated_protocol_version( + sec_protocol_metadata_t metadata, ) { - return _SSLSetMaxDatagramRecordSize( - dtlsContext, - maxSize, + return _sec_protocol_metadata_get_negotiated_protocol_version( + metadata, ); } - late final _SSLSetMaxDatagramRecordSizePtr = - _lookup>( - 'SSLSetMaxDatagramRecordSize'); - late final _SSLSetMaxDatagramRecordSize = _SSLSetMaxDatagramRecordSizePtr - .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 SSLGetMaxDatagramRecordSize( - SSLContextRef dtlsContext, - ffi.Pointer maxSize, + int sec_protocol_metadata_get_negotiated_tls_ciphersuite( + sec_protocol_metadata_t metadata, ) { - return _SSLGetMaxDatagramRecordSize( - dtlsContext, - maxSize, + return _sec_protocol_metadata_get_negotiated_tls_ciphersuite( + 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_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 SSLGetNegotiatedProtocolVersion( - SSLContextRef context, - ffi.Pointer protocol, + int sec_protocol_metadata_get_negotiated_ciphersuite( + sec_protocol_metadata_t metadata, ) { - return _SSLGetNegotiatedProtocolVersion( - context, - protocol, + return _sec_protocol_metadata_get_negotiated_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_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 SSLGetNumberSupportedCiphers( - SSLContextRef context, - ffi.Pointer numCiphers, + bool sec_protocol_metadata_get_early_data_accepted( + sec_protocol_metadata_t metadata, ) { - return _SSLGetNumberSupportedCiphers( - context, - numCiphers, + return _sec_protocol_metadata_get_early_data_accepted( + metadata, ); } - late final _SSLGetNumberSupportedCiphersPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, - ffi.Pointer)>>('SSLGetNumberSupportedCiphers'); - late final _SSLGetNumberSupportedCiphers = _SSLGetNumberSupportedCiphersPtr - .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 SSLGetSupportedCiphers( - SSLContextRef context, - ffi.Pointer ciphers, - ffi.Pointer numCiphers, + bool sec_protocol_metadata_access_peer_certificate_chain( + sec_protocol_metadata_t metadata, + ffi.Pointer<_ObjCBlock> handler, ) { - return _SSLGetSupportedCiphers( - context, - ciphers, - numCiphers, + return _sec_protocol_metadata_access_peer_certificate_chain( + metadata, + handler, ); } - 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_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 SSLGetNumberEnabledCiphers( - SSLContextRef context, - ffi.Pointer numCiphers, + bool sec_protocol_metadata_access_ocsp_response( + sec_protocol_metadata_t metadata, + ffi.Pointer<_ObjCBlock> handler, ) { - return _SSLGetNumberEnabledCiphers( - context, - numCiphers, + return _sec_protocol_metadata_access_ocsp_response( + 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_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 SSLSetEnabledCiphers( - SSLContextRef context, - ffi.Pointer ciphers, - int numCiphers, + bool sec_protocol_metadata_access_supported_signature_algorithms( + sec_protocol_metadata_t metadata, + ffi.Pointer<_ObjCBlock> handler, ) { - return _SSLSetEnabledCiphers( - context, - ciphers, - numCiphers, + return _sec_protocol_metadata_access_supported_signature_algorithms( + 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_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 SSLGetEnabledCiphers( - SSLContextRef context, - ffi.Pointer ciphers, - ffi.Pointer numCiphers, + bool sec_protocol_metadata_access_distinguished_names( + sec_protocol_metadata_t metadata, + ffi.Pointer<_ObjCBlock> handler, ) { - return _SSLGetEnabledCiphers( - context, - ciphers, - numCiphers, + return _sec_protocol_metadata_access_distinguished_names( + 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_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 SSLSetSessionTicketsEnabled( - SSLContextRef context, - int enabled, + bool sec_protocol_metadata_access_pre_shared_keys( + sec_protocol_metadata_t metadata, + ffi.Pointer<_ObjCBlock> handler, ) { - return _SSLSetSessionTicketsEnabled( - context, - enabled, + return _sec_protocol_metadata_access_pre_shared_keys( + metadata, + handler, ); } - late final _SSLSetSessionTicketsEnabledPtr = - _lookup>( - 'SSLSetSessionTicketsEnabled'); - late final _SSLSetSessionTicketsEnabled = _SSLSetSessionTicketsEnabledPtr - .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 SSLSetEnableCertVerify( - SSLContextRef context, - int enableVerify, + ffi.Pointer sec_protocol_metadata_get_server_name( + sec_protocol_metadata_t metadata, ) { - return _SSLSetEnableCertVerify( - context, - enableVerify, + return _sec_protocol_metadata_get_server_name( + metadata, ); } - late final _SSLSetEnableCertVerifyPtr = - _lookup>( - 'SSLSetEnableCertVerify'); - late final _SSLSetEnableCertVerify = - _SSLSetEnableCertVerifyPtr.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 SSLGetEnableCertVerify( - SSLContextRef context, - ffi.Pointer enableVerify, + bool sec_protocol_metadata_peers_are_equal( + sec_protocol_metadata_t metadataA, + sec_protocol_metadata_t metadataB, ) { - return _SSLGetEnableCertVerify( - context, - enableVerify, + return _sec_protocol_metadata_peers_are_equal( + metadataA, + metadataB, ); } - 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_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 SSLSetAllowsExpiredCerts( - SSLContextRef context, - int allowsExpired, + bool sec_protocol_metadata_challenge_parameters_are_equal( + sec_protocol_metadata_t metadataA, + sec_protocol_metadata_t metadataB, ) { - return _SSLSetAllowsExpiredCerts( - context, - allowsExpired, + return _sec_protocol_metadata_challenge_parameters_are_equal( + metadataA, + metadataB, ); } - late final _SSLSetAllowsExpiredCertsPtr = - _lookup>( - 'SSLSetAllowsExpiredCerts'); - late final _SSLSetAllowsExpiredCerts = _SSLSetAllowsExpiredCertsPtr - .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 SSLGetAllowsExpiredCerts( - SSLContextRef context, - ffi.Pointer allowsExpired, + dispatch_data_t sec_protocol_metadata_create_secret( + sec_protocol_metadata_t metadata, + int label_len, + ffi.Pointer label, + int exporter_length, ) { - return _SSLGetAllowsExpiredCerts( - context, - allowsExpired, + return _sec_protocol_metadata_create_secret( + metadata, + label_len, + label, + exporter_length, ); } - late final _SSLGetAllowsExpiredCertsPtr = _lookup< + late final _sec_protocol_metadata_create_secretPtr = _lookup< ffi.NativeFunction< - OSStatus Function(SSLContextRef, - ffi.Pointer)>>('SSLGetAllowsExpiredCerts'); - late final _SSLGetAllowsExpiredCerts = _SSLGetAllowsExpiredCertsPtr - .asFunction)>(); + 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 SSLSetAllowsExpiredRoots( - SSLContextRef context, - int 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 _SSLSetAllowsExpiredRoots( + return _sec_protocol_metadata_create_secret_with_context( + metadata, + label_len, + label, + context_len, context, - allowsExpired, + exporter_length, ); } - late final _SSLSetAllowsExpiredRootsPtr = - _lookup>( - 'SSLSetAllowsExpiredRoots'); - late final _SSLSetAllowsExpiredRoots = _SSLSetAllowsExpiredRootsPtr - .asFunction(); + 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)>(); - int SSLGetAllowsExpiredRoots( - SSLContextRef context, - ffi.Pointer allowsExpired, + bool sec_protocol_options_are_equal( + sec_protocol_options_t optionsA, + sec_protocol_options_t optionsB, ) { - return _SSLGetAllowsExpiredRoots( - context, - allowsExpired, + return _sec_protocol_options_are_equal( + optionsA, + optionsB, ); } - late final _SSLGetAllowsExpiredRootsPtr = _lookup< + late final _sec_protocol_options_are_equalPtr = _lookup< ffi.NativeFunction< - OSStatus Function(SSLContextRef, - ffi.Pointer)>>('SSLGetAllowsExpiredRoots'); - late final _SSLGetAllowsExpiredRoots = _SSLGetAllowsExpiredRootsPtr - .asFunction)>(); + 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 SSLSetAllowsAnyRoot( - SSLContextRef context, - int anyRoot, + void sec_protocol_options_set_local_identity( + sec_protocol_options_t options, + sec_identity_t identity, ) { - return _SSLSetAllowsAnyRoot( - context, - anyRoot, + return _sec_protocol_options_set_local_identity( + options, + identity, ); } - late final _SSLSetAllowsAnyRootPtr = - _lookup>( - 'SSLSetAllowsAnyRoot'); - late final _SSLSetAllowsAnyRoot = - _SSLSetAllowsAnyRootPtr.asFunction(); + 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(); - int SSLGetAllowsAnyRoot( - SSLContextRef context, - ffi.Pointer anyRoot, + void sec_protocol_options_append_tls_ciphersuite( + sec_protocol_options_t options, + int ciphersuite, ) { - return _SSLGetAllowsAnyRoot( - context, - anyRoot, + return _sec_protocol_options_append_tls_ciphersuite( + options, + ciphersuite, ); } - late final _SSLGetAllowsAnyRootPtr = _lookup< + late final _sec_protocol_options_append_tls_ciphersuitePtr = _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, + ffi.Int32)>>('sec_protocol_options_append_tls_ciphersuite'); + late final _sec_protocol_options_append_tls_ciphersuite = + _sec_protocol_options_append_tls_ciphersuitePtr + .asFunction(); - int SSLSetTrustedRoots( - SSLContextRef context, - CFArrayRef trustedRoots, - int replaceExisting, + void sec_protocol_options_add_tls_ciphersuite( + sec_protocol_options_t options, + int ciphersuite, ) { - return _SSLSetTrustedRoots( - context, - trustedRoots, - replaceExisting, + return _sec_protocol_options_add_tls_ciphersuite( + options, + ciphersuite, ); } - late final _SSLSetTrustedRootsPtr = _lookup< + late final _sec_protocol_options_add_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, + SSLCipherSuite)>>('sec_protocol_options_add_tls_ciphersuite'); + late final _sec_protocol_options_add_tls_ciphersuite = + _sec_protocol_options_add_tls_ciphersuitePtr + .asFunction(); - int SSLCopyTrustedRoots( - SSLContextRef context, - ffi.Pointer trustedRoots, + void sec_protocol_options_append_tls_ciphersuite_group( + sec_protocol_options_t options, + int group, ) { - return _SSLCopyTrustedRoots( - context, - trustedRoots, + return _sec_protocol_options_append_tls_ciphersuite_group( + options, + group, ); } - late final _SSLCopyTrustedRootsPtr = _lookup< + late final _sec_protocol_options_append_tls_ciphersuite_groupPtr = _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, + 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 SSLCopyPeerCertificates( - SSLContextRef context, - ffi.Pointer certs, + void sec_protocol_options_add_tls_ciphersuite_group( + sec_protocol_options_t options, + int group, ) { - return _SSLCopyPeerCertificates( - context, - certs, + return _sec_protocol_options_add_tls_ciphersuite_group( + options, + group, ); } - late final _SSLCopyPeerCertificatesPtr = _lookup< + late final _sec_protocol_options_add_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_add_tls_ciphersuite_group'); + late final _sec_protocol_options_add_tls_ciphersuite_group = + _sec_protocol_options_add_tls_ciphersuite_groupPtr + .asFunction(); - int SSLCopyPeerTrust( - SSLContextRef context, - ffi.Pointer trust, + void sec_protocol_options_set_tls_min_version( + sec_protocol_options_t options, + int version, ) { - return _SSLCopyPeerTrust( - context, - trust, + return _sec_protocol_options_set_tls_min_version( + options, + version, ); } - late final _SSLCopyPeerTrustPtr = _lookup< + late final _sec_protocol_options_set_tls_min_versionPtr = _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_set_tls_min_version'); + late final _sec_protocol_options_set_tls_min_version = + _sec_protocol_options_set_tls_min_versionPtr + .asFunction(); - int SSLSetPeerID( - SSLContextRef context, - ffi.Pointer peerID, - int peerIDLen, + void sec_protocol_options_set_min_tls_protocol_version( + sec_protocol_options_t options, + int version, ) { - return _SSLSetPeerID( - context, - peerID, - peerIDLen, + return _sec_protocol_options_set_min_tls_protocol_version( + options, + version, ); } - late final _SSLSetPeerIDPtr = _lookup< + late final _sec_protocol_options_set_min_tls_protocol_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_min_tls_protocol_version'); + late final _sec_protocol_options_set_min_tls_protocol_version = + _sec_protocol_options_set_min_tls_protocol_versionPtr + .asFunction(); - int SSLGetPeerID( - SSLContextRef context, - ffi.Pointer> peerID, - ffi.Pointer peerIDLen, - ) { - return _SSLGetPeerID( - context, - peerID, - peerIDLen, - ); + int sec_protocol_options_get_default_min_tls_protocol_version() { + return _sec_protocol_options_get_default_min_tls_protocol_version(); } - 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)>(); + 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 SSLGetNegotiatedCipher( - SSLContextRef context, - ffi.Pointer cipherSuite, - ) { - return _SSLGetNegotiatedCipher( - context, - cipherSuite, - ); + int sec_protocol_options_get_default_min_dtls_protocol_version() { + return _sec_protocol_options_get_default_min_dtls_protocol_version(); } - 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, + 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 _SSLSetALPNProtocols( - context, - protocols, + return _sec_protocol_options_set_tls_max_version( + options, + version, ); } - late final _SSLSetALPNProtocolsPtr = - _lookup>( - 'SSLSetALPNProtocols'); - late final _SSLSetALPNProtocols = _SSLSetALPNProtocolsPtr.asFunction< - int Function(SSLContextRef, CFArrayRef)>(); + 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 SSLCopyALPNProtocols( - SSLContextRef context, - ffi.Pointer protocols, + void sec_protocol_options_set_max_tls_protocol_version( + sec_protocol_options_t options, + int version, ) { - return _SSLCopyALPNProtocols( - context, - protocols, + return _sec_protocol_options_set_max_tls_protocol_version( + options, + version, ); } - late final _SSLCopyALPNProtocolsPtr = _lookup< + late final _sec_protocol_options_set_max_tls_protocol_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_max_tls_protocol_version'); + late final _sec_protocol_options_set_max_tls_protocol_version = + _sec_protocol_options_set_max_tls_protocol_versionPtr + .asFunction(); - int SSLSetOCSPResponse( - SSLContextRef context, - CFDataRef response, - ) { - return _SSLSetOCSPResponse( - context, - response, - ); + int sec_protocol_options_get_default_max_tls_protocol_version() { + return _sec_protocol_options_get_default_max_tls_protocol_version(); } - late final _SSLSetOCSPResponsePtr = - _lookup>( - 'SSLSetOCSPResponse'); - late final _SSLSetOCSPResponse = _SSLSetOCSPResponsePtr.asFunction< - int Function(SSLContextRef, CFDataRef)>(); + 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 SSLSetEncryptionCertificate( - SSLContextRef context, - CFArrayRef certRefs, - ) { - return _SSLSetEncryptionCertificate( - context, - certRefs, - ); + int sec_protocol_options_get_default_max_dtls_protocol_version() { + return _sec_protocol_options_get_default_max_dtls_protocol_version(); } - late final _SSLSetEncryptionCertificatePtr = - _lookup>( - 'SSLSetEncryptionCertificate'); - late final _SSLSetEncryptionCertificate = _SSLSetEncryptionCertificatePtr - .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 SSLSetClientSideAuthenticate( - SSLContextRef context, - int auth, + bool sec_protocol_options_get_enable_encrypted_client_hello( + sec_protocol_options_t options, ) { - return _SSLSetClientSideAuthenticate( - context, - auth, + return _sec_protocol_options_get_enable_encrypted_client_hello( + options, ); } - late final _SSLSetClientSideAuthenticatePtr = - _lookup>( - 'SSLSetClientSideAuthenticate'); - late final _SSLSetClientSideAuthenticate = _SSLSetClientSideAuthenticatePtr - .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 SSLAddDistinguishedName( - SSLContextRef context, - ffi.Pointer derDN, - int derDNLen, + bool sec_protocol_options_get_quic_use_legacy_codepoint( + sec_protocol_options_t options, ) { - return _SSLAddDistinguishedName( - context, - derDN, - derDNLen, + return _sec_protocol_options_get_quic_use_legacy_codepoint( + 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_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 SSLSetCertificateAuthorities( - SSLContextRef context, - CFTypeRef certificateOrArray, - int replaceExisting, + void sec_protocol_options_add_tls_application_protocol( + sec_protocol_options_t options, + ffi.Pointer application_protocol, ) { - return _SSLSetCertificateAuthorities( - context, - certificateOrArray, - replaceExisting, + return _sec_protocol_options_add_tls_application_protocol( + options, + application_protocol, ); } - late final _SSLSetCertificateAuthoritiesPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, CFTypeRef, - Boolean)>>('SSLSetCertificateAuthorities'); - late final _SSLSetCertificateAuthorities = _SSLSetCertificateAuthoritiesPtr - .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 SSLCopyCertificateAuthorities( - SSLContextRef context, - ffi.Pointer certificates, + void sec_protocol_options_set_tls_server_name( + sec_protocol_options_t options, + ffi.Pointer server_name, ) { - return _SSLCopyCertificateAuthorities( - context, - certificates, + return _sec_protocol_options_set_tls_server_name( + options, + server_name, ); } - late final _SSLCopyCertificateAuthoritiesPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, - ffi.Pointer)>>('SSLCopyCertificateAuthorities'); - late final _SSLCopyCertificateAuthorities = _SSLCopyCertificateAuthoritiesPtr - .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 SSLCopyDistinguishedNames( - SSLContextRef context, - ffi.Pointer names, + void sec_protocol_options_set_tls_diffie_hellman_parameters( + sec_protocol_options_t options, + dispatch_data_t params, ) { - return _SSLCopyDistinguishedNames( - context, - names, + return _sec_protocol_options_set_tls_diffie_hellman_parameters( + options, + params, ); } - late final _SSLCopyDistinguishedNamesPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, - ffi.Pointer)>>('SSLCopyDistinguishedNames'); - late final _SSLCopyDistinguishedNames = _SSLCopyDistinguishedNamesPtr - .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 SSLGetClientCertificateState( - SSLContextRef context, - ffi.Pointer clientState, + void sec_protocol_options_add_pre_shared_key( + sec_protocol_options_t options, + dispatch_data_t psk, + dispatch_data_t psk_identity, ) { - return _SSLGetClientCertificateState( - context, - clientState, + return _sec_protocol_options_add_pre_shared_key( + options, + psk, + psk_identity, ); } - late final _SSLGetClientCertificateStatePtr = _lookup< + late final _sec_protocol_options_add_pre_shared_keyPtr = _lookup< ffi.NativeFunction< - OSStatus Function(SSLContextRef, - ffi.Pointer)>>('SSLGetClientCertificateState'); - late final _SSLGetClientCertificateState = _SSLGetClientCertificateStatePtr - .asFunction)>(); + 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 SSLSetDiffieHellmanParams( - SSLContextRef context, - ffi.Pointer dhParams, - int dhParamsLen, + void sec_protocol_options_set_tls_pre_shared_key_identity_hint( + sec_protocol_options_t options, + dispatch_data_t psk_identity_hint, ) { - return _SSLSetDiffieHellmanParams( - context, - dhParams, - dhParamsLen, + return _sec_protocol_options_set_tls_pre_shared_key_identity_hint( + options, + psk_identity_hint, ); } - late final _SSLSetDiffieHellmanParamsPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, ffi.Pointer, - ffi.Size)>>('SSLSetDiffieHellmanParams'); - late final _SSLSetDiffieHellmanParams = _SSLSetDiffieHellmanParamsPtr - .asFunction, 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 SSLGetDiffieHellmanParams( - SSLContextRef context, - ffi.Pointer> dhParams, - ffi.Pointer dhParamsLen, + 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 _SSLGetDiffieHellmanParams( - context, - dhParams, - dhParamsLen, + return _sec_protocol_options_set_pre_shared_key_selection_block( + options, + psk_selection_block, + psk_selection_queue, ); } - 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_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 SSLSetRsaBlinding( - SSLContextRef context, - int blinding, + void sec_protocol_options_set_tls_tickets_enabled( + sec_protocol_options_t options, + bool tickets_enabled, ) { - return _SSLSetRsaBlinding( - context, - blinding, + return _sec_protocol_options_set_tls_tickets_enabled( + options, + tickets_enabled, ); } - late final _SSLSetRsaBlindingPtr = - _lookup>( - 'SSLSetRsaBlinding'); - late final _SSLSetRsaBlinding = - _SSLSetRsaBlindingPtr.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(); - int SSLGetRsaBlinding( - SSLContextRef context, - ffi.Pointer blinding, + void sec_protocol_options_set_tls_is_fallback_attempt( + sec_protocol_options_t options, + bool is_fallback_attempt, ) { - return _SSLGetRsaBlinding( - context, - blinding, + return _sec_protocol_options_set_tls_is_fallback_attempt( + options, + is_fallback_attempt, ); } - late final _SSLGetRsaBlindingPtr = _lookup< - ffi.NativeFunction< - OSStatus Function( - SSLContextRef, ffi.Pointer)>>('SSLGetRsaBlinding'); - late final _SSLGetRsaBlinding = _SSLGetRsaBlindingPtr.asFunction< - int Function(SSLContextRef, ffi.Pointer)>(); + 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(); - int SSLHandshake( - SSLContextRef context, + void sec_protocol_options_set_tls_resumption_enabled( + sec_protocol_options_t options, + bool resumption_enabled, ) { - return _SSLHandshake( - context, + return _sec_protocol_options_set_tls_resumption_enabled( + options, + resumption_enabled, ); } - late final _SSLHandshakePtr = - _lookup>( - 'SSLHandshake'); - late final _SSLHandshake = - _SSLHandshakePtr.asFunction(); + 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(); - int SSLReHandshake( - SSLContextRef context, + void sec_protocol_options_set_tls_false_start_enabled( + sec_protocol_options_t options, + bool false_start_enabled, ) { - return _SSLReHandshake( - context, + return _sec_protocol_options_set_tls_false_start_enabled( + options, + false_start_enabled, ); } - late final _SSLReHandshakePtr = - _lookup>( - 'SSLReHandshake'); - late final _SSLReHandshake = - _SSLReHandshakePtr.asFunction(); + 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(); - int SSLWrite( - 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 _SSLWrite( - context, - data, - dataLength, - processed, + return _sec_protocol_options_set_tls_ocsp_enabled( + options, + ocsp_enabled, ); } - 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 _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(); - int SSLRead( - SSLContextRef context, - ffi.Pointer data, - int dataLength, - ffi.Pointer processed, + void sec_protocol_options_set_tls_sct_enabled( + sec_protocol_options_t options, + bool sct_enabled, ) { - return _SSLRead( - context, - data, - dataLength, - processed, + return _sec_protocol_options_set_tls_sct_enabled( + options, + sct_enabled, ); } - 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 _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(); - int SSLGetBufferedReadSize( - SSLContextRef context, - ffi.Pointer bufferSize, + void sec_protocol_options_set_tls_renegotiation_enabled( + sec_protocol_options_t options, + bool renegotiation_enabled, ) { - return _SSLGetBufferedReadSize( - context, - bufferSize, + return _sec_protocol_options_set_tls_renegotiation_enabled( + options, + renegotiation_enabled, ); } - late final _SSLGetBufferedReadSizePtr = _lookup< - ffi.NativeFunction< - OSStatus Function( - SSLContextRef, ffi.Pointer)>>('SSLGetBufferedReadSize'); - late final _SSLGetBufferedReadSize = _SSLGetBufferedReadSizePtr.asFunction< - int Function(SSLContextRef, ffi.Pointer)>(); + 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(); - int SSLGetDatagramWriteSize( - SSLContextRef dtlsContext, - ffi.Pointer bufSize, + void sec_protocol_options_set_peer_authentication_required( + sec_protocol_options_t options, + bool peer_authentication_required, ) { - return _SSLGetDatagramWriteSize( - dtlsContext, - bufSize, + return _sec_protocol_options_set_peer_authentication_required( + options, + peer_authentication_required, ); } - late final _SSLGetDatagramWriteSizePtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, - ffi.Pointer)>>('SSLGetDatagramWriteSize'); - late final _SSLGetDatagramWriteSize = _SSLGetDatagramWriteSizePtr.asFunction< - int Function(SSLContextRef, ffi.Pointer)>(); + 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 SSLClose( - SSLContextRef context, + void sec_protocol_options_set_peer_authentication_optional( + sec_protocol_options_t options, + bool peer_authentication_optional, ) { - return _SSLClose( - context, + return _sec_protocol_options_set_peer_authentication_optional( + options, + peer_authentication_optional, ); } - late final _SSLClosePtr = - _lookup>('SSLClose'); - late final _SSLClose = _SSLClosePtr.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 SSLSetError( - SSLContextRef context, - int status, + void sec_protocol_options_set_enable_encrypted_client_hello( + sec_protocol_options_t options, + bool enable_encrypted_client_hello, ) { - return _SSLSetError( - context, - status, + return _sec_protocol_options_set_enable_encrypted_client_hello( + options, + enable_encrypted_client_hello, ); } - late final _SSLSetErrorPtr = - _lookup>( - 'SSLSetError'); - late final _SSLSetError = - _SSLSetErrorPtr.asFunction(); - - /// -1LL - late final ffi.Pointer _NSURLSessionTransferSizeUnknown = - _lookup('NSURLSessionTransferSizeUnknown'); + 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 get NSURLSessionTransferSizeUnknown => - _NSURLSessionTransferSizeUnknown.value; + 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, + ); + } - set NSURLSessionTransferSizeUnknown(int value) => - _NSURLSessionTransferSizeUnknown.value = value; + 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(); - 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_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_380( - obj, - sel, + return _sec_protocol_options_set_key_update_block( + options, + key_update_block, + key_update_queue, ); } - late final __objc_msgSend_380Ptr = _lookup< + late final _sec_protocol_options_set_key_update_blockPtr = _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)>(); + 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 _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_challenge_block( + sec_protocol_options_t options, + sec_protocol_challenge_t challenge_block, + dispatch_queue_t challenge_queue, ) { - return __objc_msgSend_381( - obj, - sel, + return _sec_protocol_options_set_challenge_block( + options, + challenge_block, + challenge_queue, ); } - late final __objc_msgSend_381Ptr = _lookup< + late final _sec_protocol_options_set_challenge_blockPtr = _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, 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_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_verify_block( + sec_protocol_options_t options, + sec_protocol_verify_t verify_block, + dispatch_queue_t verify_block_queue, ) { - return __objc_msgSend_382( - obj, - sel, - identifier, + return _sec_protocol_options_set_verify_block( + options, + verify_block, + verify_block_queue, ); } - late final __objc_msgSend_382Ptr = _lookup< + late final _sec_protocol_options_set_verify_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_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_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, + 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 __objc_msgSend_383( - obj, - sel, + return _SSLCreateContext( + alloc, + protocolSide, + connectionType, ); } - late final __objc_msgSend_383Ptr = _lookup< + late final _SSLCreateContextPtr = _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)>(); + SSLContextRef Function( + CFAllocatorRef, ffi.Int32, ffi.Int32)>>('SSLCreateContext'); + late final _SSLCreateContext = _SSLCreateContextPtr.asFunction< + SSLContextRef Function(CFAllocatorRef, int, int)>(); - late final _sel_setTLSMinimumSupportedProtocol_1 = - _registerName1("setTLSMinimumSupportedProtocol:"); - void _objc_msgSend_384( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + int SSLNewContext( + int isServer, + ffi.Pointer contextPtr, ) { - return __objc_msgSend_384( - obj, - sel, - value, + return _SSLNewContext( + isServer, + contextPtr, ); } - late final __objc_msgSend_384Ptr = _lookup< + late final _SSLNewContextPtr = _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)>(); + OSStatus Function( + Boolean, ffi.Pointer)>>('SSLNewContext'); + late final _SSLNewContext = _SSLNewContextPtr.asFunction< + int Function(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_385( - ffi.Pointer obj, - ffi.Pointer sel, + int SSLDisposeContext( + SSLContextRef context, ) { - return __objc_msgSend_385( - obj, - sel, + return _SSLDisposeContext( + context, ); } - late final __objc_msgSend_385Ptr = _lookup< + 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< - 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, ffi.Pointer)>>('SSLGetSessionState'); + late final _SSLGetSessionState = _SSLGetSessionStatePtr.asFunction< + int Function(SSLContextRef, ffi.Pointer)>(); - late final _sel_setTLSMinimumSupportedProtocolVersion_1 = - _registerName1("setTLSMinimumSupportedProtocolVersion:"); - void _objc_msgSend_386( - ffi.Pointer obj, - ffi.Pointer sel, + int SSLSetSessionOption( + SSLContextRef context, + int option, int value, ) { - return __objc_msgSend_386( - obj, - sel, + return _SSLSetSessionOption( + context, + option, value, ); } - late final __objc_msgSend_386Ptr = _lookup< + late final _SSLSetSessionOptionPtr = _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.Int32, Boolean)>>('SSLSetSessionOption'); + late final _SSLSetSessionOption = _SSLSetSessionOptionPtr.asFunction< + int Function(SSLContextRef, int, 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, + int SSLGetSessionOption( + SSLContextRef context, + int option, + ffi.Pointer value, ) { - return __objc_msgSend_387( - obj, - sel, + return _SSLGetSessionOption( + context, + option, value, ); } - late final __objc_msgSend_387Ptr = _lookup< + late final _SSLGetSessionOptionPtr = _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.Int32, + ffi.Pointer)>>('SSLGetSessionOption'); + late final _SSLGetSessionOption = _SSLGetSessionOptionPtr.asFunction< + int Function(SSLContextRef, int, 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, + int SSLSetIOFuncs( + SSLContextRef context, + SSLReadFunc readFunc, + SSLWriteFunc writeFunc, ) { - return __objc_msgSend_388( - obj, - sel, + return _SSLSetIOFuncs( + context, + readFunc, + writeFunc, ); } - late final __objc_msgSend_388Ptr = _lookup< + late final _SSLSetIOFuncsPtr = _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, SSLReadFunc, SSLWriteFunc)>>('SSLSetIOFuncs'); + late final _SSLSetIOFuncs = _SSLSetIOFuncsPtr.asFunction< + int Function(SSLContextRef, SSLReadFunc, SSLWriteFunc)>(); - late final _sel_setURLCredentialStorage_1 = - _registerName1("setURLCredentialStorage:"); - void _objc_msgSend_389( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, + int SSLSetSessionConfig( + SSLContextRef context, + CFStringRef config, ) { - return __objc_msgSend_389( - obj, - sel, - value, + return _SSLSetSessionConfig( + context, + config, ); } - 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 _SSLSetSessionConfigPtr = _lookup< + ffi.NativeFunction>( + 'SSLSetSessionConfig'); + late final _SSLSetSessionConfig = _SSLSetSessionConfigPtr.asFunction< + int Function(SSLContextRef, CFStringRef)>(); - late final _class_NSURLCache1 = _getClass1("NSURLCache"); - late final _sel_URLCache1 = _registerName1("URLCache"); - ffi.Pointer _objc_msgSend_390( - ffi.Pointer obj, - ffi.Pointer sel, + int SSLSetProtocolVersionMin( + SSLContextRef context, + int minVersion, ) { - return __objc_msgSend_390( - obj, - sel, + return _SSLSetProtocolVersionMin( + context, + minVersion, ); } - 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 _SSLSetProtocolVersionMinPtr = + _lookup>( + 'SSLSetProtocolVersionMin'); + late final _SSLSetProtocolVersionMin = _SSLSetProtocolVersionMinPtr + .asFunction(); - late final _sel_setURLCache_1 = _registerName1("setURLCache:"); - void _objc_msgSend_391( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, + int SSLGetProtocolVersionMin( + SSLContextRef context, + ffi.Pointer minVersion, ) { - return __objc_msgSend_391( - obj, - sel, - value, + return _SSLGetProtocolVersionMin( + context, + minVersion, ); } - late final __objc_msgSend_391Ptr = _lookup< + late final _SSLGetProtocolVersionMinPtr = _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)>>('SSLGetProtocolVersionMin'); + late final _SSLGetProtocolVersionMin = _SSLGetProtocolVersionMinPtr + .asFunction)>(); - 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 SSLSetProtocolVersionMax( + SSLContextRef context, + int maxVersion, ) { - return __objc_msgSend_392( - obj, - sel, - value, + return _SSLSetProtocolVersionMax( + context, + maxVersion, ); } - 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 _SSLSetProtocolVersionMaxPtr = + _lookup>( + 'SSLSetProtocolVersionMax'); + late final _SSLSetProtocolVersionMax = _SSLSetProtocolVersionMaxPtr + .asFunction(); - late final _sel_multipathServiceType1 = - _registerName1("multipathServiceType"); - int _objc_msgSend_393( - ffi.Pointer obj, - ffi.Pointer sel, + int SSLGetProtocolVersionMax( + SSLContextRef context, + ffi.Pointer maxVersion, ) { - return __objc_msgSend_393( - obj, - sel, + return _SSLGetProtocolVersionMax( + context, + maxVersion, ); } - late final __objc_msgSend_393Ptr = _lookup< + late final _SSLGetProtocolVersionMaxPtr = _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)>>('SSLGetProtocolVersionMax'); + late final _SSLGetProtocolVersionMax = _SSLGetProtocolVersionMaxPtr + .asFunction)>(); - late final _sel_setMultipathServiceType_1 = - _registerName1("setMultipathServiceType:"); - void _objc_msgSend_394( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + int SSLSetProtocolVersionEnabled( + SSLContextRef context, + int protocol, + int enable, ) { - return __objc_msgSend_394( - obj, - sel, - value, + return _SSLSetProtocolVersionEnabled( + context, + protocol, + enable, ); } - late final __objc_msgSend_394Ptr = _lookup< + late final _SSLSetProtocolVersionEnabledPtr = _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)>>('SSLSetProtocolVersionEnabled'); + late final _SSLSetProtocolVersionEnabled = _SSLSetProtocolVersionEnabledPtr + .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 SSLGetProtocolVersionEnabled( + SSLContextRef context, + int protocol, + ffi.Pointer enable, ) { - return __objc_msgSend_395( - obj, - sel, - configuration, + return _SSLGetProtocolVersionEnabled( + context, + protocol, + enable, ); } - late final __objc_msgSend_395Ptr = _lookup< + late final _SSLGetProtocolVersionEnabledPtr = _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)>>('SSLGetProtocolVersionEnabled'); + late final _SSLGetProtocolVersionEnabled = _SSLGetProtocolVersionEnabledPtr + .asFunction)>(); - 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 SSLSetProtocolVersion( + SSLContextRef context, + int version, ) { - return __objc_msgSend_396( - obj, - sel, - configuration, - delegate, - queue, + return _SSLSetProtocolVersion( + context, + version, ); } - 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 _SSLSetProtocolVersionPtr = + _lookup>( + 'SSLSetProtocolVersion'); + late final _SSLSetProtocolVersion = + _SSLSetProtocolVersionPtr.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 SSLGetProtocolVersion( + SSLContextRef context, + ffi.Pointer protocol, ) { - return __objc_msgSend_397( - obj, - sel, - completionHandler, + return _SSLGetProtocolVersion( + context, + protocol, ); } - late final __objc_msgSend_397Ptr = _lookup< + late final _SSLGetProtocolVersionPtr = _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)>>('SSLGetProtocolVersion'); + late final _SSLGetProtocolVersion = _SSLGetProtocolVersionPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer)>(); - late final _sel_getAllTasksWithCompletionHandler_1 = - _registerName1("getAllTasksWithCompletionHandler:"); - void _objc_msgSend_398( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> completionHandler, + int SSLSetCertificate( + SSLContextRef context, + CFArrayRef certRefs, ) { - return __objc_msgSend_398( - obj, - sel, - completionHandler, + return _SSLSetCertificate( + context, + certRefs, ); } - 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 _SSLSetCertificatePtr = + _lookup>( + 'SSLSetCertificate'); + late final _SSLSetCertificate = _SSLSetCertificatePtr.asFunction< + int Function(SSLContextRef, CFArrayRef)>(); - 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 SSLSetConnection( + SSLContextRef context, + SSLConnectionRef connection, ) { - return __objc_msgSend_399( - obj, - sel, - request, + return _SSLSetConnection( + context, + connection, ); } - 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 _SSLSetConnectionPtr = _lookup< + ffi + .NativeFunction>( + 'SSLSetConnection'); + late final _SSLSetConnection = _SSLSetConnectionPtr.asFunction< + int Function(SSLContextRef, SSLConnectionRef)>(); - late final _sel_dataTaskWithURL_1 = _registerName1("dataTaskWithURL:"); - ffi.Pointer _objc_msgSend_400( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, + int SSLGetConnection( + SSLContextRef context, + ffi.Pointer connection, ) { - return __objc_msgSend_400( - obj, - sel, - url, + return _SSLGetConnection( + context, + connection, ); } - late final __objc_msgSend_400Ptr = _lookup< + late final _SSLGetConnectionPtr = _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)>>('SSLGetConnection'); + late final _SSLGetConnection = _SSLGetConnectionPtr.asFunction< + int Function(SSLContextRef, 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 SSLSetPeerDomainName( + SSLContextRef context, + ffi.Pointer peerName, + int peerNameLen, ) { - return __objc_msgSend_401( - obj, - sel, - request, - fileURL, + return _SSLSetPeerDomainName( + context, + peerName, + peerNameLen, ); } - late final __objc_msgSend_401Ptr = _lookup< + late final _SSLSetPeerDomainNamePtr = _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, + ffi.Size)>>('SSLSetPeerDomainName'); + late final _SSLSetPeerDomainName = _SSLSetPeerDomainNamePtr.asFunction< + int Function(SSLContextRef, ffi.Pointer, int)>(); - 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 SSLGetPeerDomainNameLength( + SSLContextRef context, + ffi.Pointer peerNameLen, ) { - return __objc_msgSend_402( - obj, - sel, - request, - bodyData, + return _SSLGetPeerDomainNameLength( + context, + peerNameLen, ); } - late final __objc_msgSend_402Ptr = _lookup< + late final _SSLGetPeerDomainNameLengthPtr = _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.Pointer)>>('SSLGetPeerDomainNameLength'); + late final _SSLGetPeerDomainNameLength = _SSLGetPeerDomainNameLengthPtr + .asFunction)>(); - late final _sel_uploadTaskWithStreamedRequest_1 = - _registerName1("uploadTaskWithStreamedRequest:"); - ffi.Pointer _objc_msgSend_403( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, + int SSLGetPeerDomainName( + SSLContextRef context, + ffi.Pointer peerName, + ffi.Pointer peerNameLen, ) { - return __objc_msgSend_403( - obj, - sel, - request, + return _SSLGetPeerDomainName( + context, + peerName, + peerNameLen, ); } - late final __objc_msgSend_403Ptr = _lookup< + late final _SSLGetPeerDomainNamePtr = _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, + ffi.Pointer)>>('SSLGetPeerDomainName'); + late final _SSLGetPeerDomainName = _SSLGetPeerDomainNamePtr.asFunction< + int Function( + SSLContextRef, 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, + int SSLCopyRequestedPeerNameLength( + SSLContextRef ctx, + ffi.Pointer peerNameLen, ) { - return __objc_msgSend_404( - obj, - sel, - completionHandler, + return _SSLCopyRequestedPeerNameLength( + ctx, + peerNameLen, ); } - late final __objc_msgSend_404Ptr = _lookup< + late final _SSLCopyRequestedPeerNameLengthPtr = _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>)>(); + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLCopyRequestedPeerNameLength'); + late final _SSLCopyRequestedPeerNameLength = + _SSLCopyRequestedPeerNameLengthPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer)>(); - late final _sel_downloadTaskWithRequest_1 = - _registerName1("downloadTaskWithRequest:"); - ffi.Pointer _objc_msgSend_405( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, + int SSLCopyRequestedPeerName( + SSLContextRef context, + ffi.Pointer peerName, + ffi.Pointer peerNameLen, ) { - return __objc_msgSend_405( - obj, - sel, - request, + return _SSLCopyRequestedPeerName( + context, + peerName, + peerNameLen, ); } - late final __objc_msgSend_405Ptr = _lookup< + late final _SSLCopyRequestedPeerNamePtr = _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, + ffi.Pointer)>>('SSLCopyRequestedPeerName'); + late final _SSLCopyRequestedPeerName = + _SSLCopyRequestedPeerNamePtr.asFunction< + int Function( + SSLContextRef, 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, + int SSLSetDatagramHelloCookie( + SSLContextRef dtlsContext, + ffi.Pointer cookie, + int cookieLen, ) { - return __objc_msgSend_406( - obj, - sel, - url, + return _SSLSetDatagramHelloCookie( + dtlsContext, + cookie, + cookieLen, ); } - late final __objc_msgSend_406Ptr = _lookup< + late final _SSLSetDatagramHelloCookiePtr = _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)>(); + OSStatus Function(SSLContextRef, ffi.Pointer, + ffi.Size)>>('SSLSetDatagramHelloCookie'); + late final _SSLSetDatagramHelloCookie = _SSLSetDatagramHelloCookiePtr + .asFunction, int)>(); - late final _sel_downloadTaskWithResumeData_1 = - _registerName1("downloadTaskWithResumeData:"); - ffi.Pointer _objc_msgSend_407( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer resumeData, + int SSLSetMaxDatagramRecordSize( + SSLContextRef dtlsContext, + int maxSize, ) { - return __objc_msgSend_407( - obj, - sel, - resumeData, + return _SSLSetMaxDatagramRecordSize( + dtlsContext, + maxSize, ); } - 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 _SSLSetMaxDatagramRecordSizePtr = + _lookup>( + 'SSLSetMaxDatagramRecordSize'); + late final _SSLSetMaxDatagramRecordSize = _SSLSetMaxDatagramRecordSizePtr + .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 SSLGetMaxDatagramRecordSize( + SSLContextRef dtlsContext, + ffi.Pointer maxSize, ) { - return __objc_msgSend_408( - obj, - sel, - minBytes, - maxBytes, - timeout, - completionHandler, + return _SSLGetMaxDatagramRecordSize( + dtlsContext, + maxSize, ); } - late final __objc_msgSend_408Ptr = _lookup< + late final _SSLGetMaxDatagramRecordSizePtr = _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)>>('SSLGetMaxDatagramRecordSize'); + late final _SSLGetMaxDatagramRecordSize = _SSLGetMaxDatagramRecordSizePtr + .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 SSLGetNegotiatedProtocolVersion( + SSLContextRef context, + ffi.Pointer protocol, ) { - return __objc_msgSend_409( - obj, - sel, - data, - timeout, - completionHandler, + return _SSLGetNegotiatedProtocolVersion( + context, + protocol, ); } - late final __objc_msgSend_409Ptr = _lookup< + late final _SSLGetNegotiatedProtocolVersionPtr = _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)>>('SSLGetNegotiatedProtocolVersion'); + late final _SSLGetNegotiatedProtocolVersion = + _SSLGetNegotiatedProtocolVersionPtr.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 SSLGetNumberSupportedCiphers( + SSLContextRef context, + ffi.Pointer numCiphers, ) { - return __objc_msgSend_410( - obj, - sel, - hostname, - port, + return _SSLGetNumberSupportedCiphers( + context, + numCiphers, ); } - late final __objc_msgSend_410Ptr = _lookup< + late final _SSLGetNumberSupportedCiphersPtr = _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)>>('SSLGetNumberSupportedCiphers'); + late final _SSLGetNumberSupportedCiphers = _SSLGetNumberSupportedCiphersPtr + .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 SSLGetSupportedCiphers( + SSLContextRef context, + ffi.Pointer ciphers, + ffi.Pointer numCiphers, ) { - return __objc_msgSend_411( - obj, - sel, - service, + return _SSLGetSupportedCiphers( + context, + ciphers, + numCiphers, ); } - late final __objc_msgSend_411Ptr = _lookup< + late final _SSLGetSupportedCiphersPtr = _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)>>('SSLGetSupportedCiphers'); + late final _SSLGetSupportedCiphers = _SSLGetSupportedCiphersPtr.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 SSLGetNumberEnabledCiphers( + SSLContextRef context, + ffi.Pointer numCiphers, ) { - return __objc_msgSend_412( - obj, - sel, + return _SSLGetNumberEnabledCiphers( + context, + numCiphers, ); } - late final __objc_msgSend_412Ptr = _lookup< + late final _SSLGetNumberEnabledCiphersPtr = _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)>>('SSLGetNumberEnabledCiphers'); + late final _SSLGetNumberEnabledCiphers = _SSLGetNumberEnabledCiphersPtr + .asFunction)>(); - 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 SSLSetEnabledCiphers( + SSLContextRef context, + ffi.Pointer ciphers, + int numCiphers, ) { - return __objc_msgSend_413( - obj, - sel, - message, - completionHandler, + return _SSLSetEnabledCiphers( + context, + ciphers, + numCiphers, ); } - late final __objc_msgSend_413Ptr = _lookup< + late final _SSLSetEnabledCiphersPtr = _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.Size)>>('SSLSetEnabledCiphers'); + late final _SSLSetEnabledCiphers = _SSLSetEnabledCiphersPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer, int)>(); - late final _sel_receiveMessageWithCompletionHandler_1 = - _registerName1("receiveMessageWithCompletionHandler:"); - void _objc_msgSend_414( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> completionHandler, + int SSLGetEnabledCiphers( + SSLContextRef context, + ffi.Pointer ciphers, + ffi.Pointer numCiphers, ) { - return __objc_msgSend_414( - obj, - sel, - completionHandler, + return _SSLGetEnabledCiphers( + context, + ciphers, + numCiphers, ); } - late final __objc_msgSend_414Ptr = _lookup< + late final _SSLGetEnabledCiphersPtr = _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.Pointer)>>('SSLGetEnabledCiphers'); + late final _SSLGetEnabledCiphers = _SSLGetEnabledCiphersPtr.asFunction< + int Function( + SSLContextRef, ffi.Pointer, ffi.Pointer)>(); - late final _sel_sendPingWithPongReceiveHandler_1 = - _registerName1("sendPingWithPongReceiveHandler:"); - void _objc_msgSend_415( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> pongReceiveHandler, + int SSLSetSessionTicketsEnabled( + SSLContextRef context, + int enabled, ) { - return __objc_msgSend_415( - obj, - sel, - pongReceiveHandler, + return _SSLSetSessionTicketsEnabled( + context, + enabled, ); } - 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 _SSLSetSessionTicketsEnabledPtr = + _lookup>( + 'SSLSetSessionTicketsEnabled'); + late final _SSLSetSessionTicketsEnabled = _SSLSetSessionTicketsEnabledPtr + .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 SSLSetEnableCertVerify( + SSLContextRef context, + int enableVerify, ) { - return __objc_msgSend_416( - obj, - sel, - closeCode, - reason, + return _SSLSetEnableCertVerify( + context, + enableVerify, ); } - 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 _SSLSetEnableCertVerifyPtr = + _lookup>( + 'SSLSetEnableCertVerify'); + late final _SSLSetEnableCertVerify = + _SSLSetEnableCertVerifyPtr.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 SSLGetEnableCertVerify( + SSLContextRef context, + ffi.Pointer enableVerify, ) { - return __objc_msgSend_417( - obj, - sel, + return _SSLGetEnableCertVerify( + context, + enableVerify, ); } - late final __objc_msgSend_417Ptr = _lookup< + late final _SSLGetEnableCertVerifyPtr = _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)>>('SSLGetEnableCertVerify'); + late final _SSLGetEnableCertVerify = _SSLGetEnableCertVerifyPtr.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 SSLSetAllowsExpiredCerts( + SSLContextRef context, + int allowsExpired, ) { - return __objc_msgSend_418( - obj, - sel, - url, + return _SSLSetAllowsExpiredCerts( + context, + allowsExpired, ); } - 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 _SSLSetAllowsExpiredCertsPtr = + _lookup>( + 'SSLSetAllowsExpiredCerts'); + late final _SSLSetAllowsExpiredCerts = _SSLSetAllowsExpiredCertsPtr + .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 SSLGetAllowsExpiredCerts( + SSLContextRef context, + ffi.Pointer allowsExpired, ) { - return __objc_msgSend_419( - obj, - sel, - url, - protocols, + return _SSLGetAllowsExpiredCerts( + context, + allowsExpired, ); } - late final __objc_msgSend_419Ptr = _lookup< + late final _SSLGetAllowsExpiredCertsPtr = _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)>>('SSLGetAllowsExpiredCerts'); + late final _SSLGetAllowsExpiredCerts = _SSLGetAllowsExpiredCertsPtr + .asFunction)>(); - late final _sel_webSocketTaskWithRequest_1 = - _registerName1("webSocketTaskWithRequest:"); - ffi.Pointer _objc_msgSend_420( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, + int SSLSetAllowsExpiredRoots( + SSLContextRef context, + int allowsExpired, ) { - return __objc_msgSend_420( - obj, - sel, - request, + return _SSLSetAllowsExpiredRoots( + context, + allowsExpired, ); } - 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 _SSLSetAllowsExpiredRootsPtr = + _lookup>( + 'SSLSetAllowsExpiredRoots'); + late final _SSLSetAllowsExpiredRoots = _SSLSetAllowsExpiredRootsPtr + .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 SSLGetAllowsExpiredRoots( + SSLContextRef context, + ffi.Pointer allowsExpired, ) { - return __objc_msgSend_421( - obj, - sel, - request, - completionHandler, + return _SSLGetAllowsExpiredRoots( + context, + allowsExpired, ); } - late final __objc_msgSend_421Ptr = _lookup< + late final _SSLGetAllowsExpiredRootsPtr = _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)>>('SSLGetAllowsExpiredRoots'); + late final _SSLGetAllowsExpiredRoots = _SSLGetAllowsExpiredRootsPtr + .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 SSLSetAllowsAnyRoot( + SSLContextRef context, + int anyRoot, ) { - return __objc_msgSend_422( - obj, - sel, - url, - completionHandler, + return _SSLSetAllowsAnyRoot( + context, + anyRoot, ); } - 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 _SSLSetAllowsAnyRootPtr = + _lookup>( + 'SSLSetAllowsAnyRoot'); + late final _SSLSetAllowsAnyRoot = + _SSLSetAllowsAnyRootPtr.asFunction(); - 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 SSLGetAllowsAnyRoot( + SSLContextRef context, + ffi.Pointer anyRoot, ) { - return __objc_msgSend_423( - obj, - sel, - request, - fileURL, - completionHandler, + return _SSLGetAllowsAnyRoot( + context, + anyRoot, ); } - late final __objc_msgSend_423Ptr = _lookup< + late final _SSLGetAllowsAnyRootPtr = _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, ffi.Pointer)>>('SSLGetAllowsAnyRoot'); + late final _SSLGetAllowsAnyRoot = _SSLGetAllowsAnyRootPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer)>(); - 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 SSLSetTrustedRoots( + SSLContextRef context, + CFArrayRef trustedRoots, + int replaceExisting, ) { - return __objc_msgSend_424( - obj, - sel, - request, - bodyData, - completionHandler, + return _SSLSetTrustedRoots( + context, + trustedRoots, + replaceExisting, ); } - late final __objc_msgSend_424Ptr = _lookup< + late final _SSLSetTrustedRootsPtr = _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, CFArrayRef, Boolean)>>('SSLSetTrustedRoots'); + late final _SSLSetTrustedRoots = _SSLSetTrustedRootsPtr.asFunction< + int Function(SSLContextRef, CFArrayRef, int)>(); - 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 SSLCopyTrustedRoots( + SSLContextRef context, + ffi.Pointer trustedRoots, ) { - return __objc_msgSend_425( - obj, - sel, - request, - completionHandler, + return _SSLCopyTrustedRoots( + context, + trustedRoots, ); } - late final __objc_msgSend_425Ptr = _lookup< + late final _SSLCopyTrustedRootsPtr = _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)>>('SSLCopyTrustedRoots'); + late final _SSLCopyTrustedRoots = _SSLCopyTrustedRootsPtr.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 SSLCopyPeerCertificates( + SSLContextRef context, + ffi.Pointer certs, ) { - return __objc_msgSend_426( - obj, - sel, - url, - completionHandler, + return _SSLCopyPeerCertificates( + context, + certs, ); } - late final __objc_msgSend_426Ptr = _lookup< + late final _SSLCopyPeerCertificatesPtr = _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)>>('SSLCopyPeerCertificates'); + late final _SSLCopyPeerCertificates = _SSLCopyPeerCertificatesPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer)>(); - 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 SSLCopyPeerTrust( + SSLContextRef context, + ffi.Pointer trust, ) { - return __objc_msgSend_427( - obj, - sel, - resumeData, - completionHandler, + return _SSLCopyPeerTrust( + context, + trust, ); } - late final __objc_msgSend_427Ptr = _lookup< + late final _SSLCopyPeerTrustPtr = _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; + OSStatus Function( + SSLContextRef, ffi.Pointer)>>('SSLCopyPeerTrust'); + late final _SSLCopyPeerTrust = _SSLCopyPeerTrustPtr.asFunction< + int Function(SSLContextRef, 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 SSLSetPeerID( + SSLContextRef context, + ffi.Pointer peerID, + int peerIDLen, ) { - return __objc_msgSend_428( - obj, - sel, + return _SSLSetPeerID( + context, + peerID, + peerIDLen, ); } - late final __objc_msgSend_428Ptr = _lookup< + late final _SSLSetPeerIDPtr = _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)>>('SSLSetPeerID'); + late final _SSLSetPeerID = _SSLSetPeerIDPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer, int)>(); - 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 SSLGetPeerID( + SSLContextRef context, + ffi.Pointer> peerID, + ffi.Pointer peerIDLen, ) { - return __objc_msgSend_429( - obj, - sel, + return _SSLGetPeerID( + context, + peerID, + peerIDLen, ); } - late final __objc_msgSend_429Ptr = _lookup< + late final _SSLGetPeerIDPtr = _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>, + ffi.Pointer)>>('SSLGetPeerID'); + late final _SSLGetPeerID = _SSLGetPeerIDPtr.asFunction< + int Function(SSLContextRef, 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, + int SSLGetNegotiatedCipher( + SSLContextRef context, + ffi.Pointer cipherSuite, ) { - return __objc_msgSend_430( - obj, - sel, + return _SSLGetNegotiatedCipher( + context, + cipherSuite, ); } - late final __objc_msgSend_430Ptr = _lookup< + late final _SSLGetNegotiatedCipherPtr = _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)>>('SSLGetNegotiatedCipher'); + late final _SSLGetNegotiatedCipher = _SSLGetNegotiatedCipherPtr.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 SSLSetALPNProtocols( + SSLContextRef context, + CFArrayRef protocols, ) { - return __objc_msgSend_431( - obj, - sel, - typeIdentifier, - visibility, - loadHandler, + return _SSLSetALPNProtocols( + context, + protocols, ); } - 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 _SSLSetALPNProtocolsPtr = + _lookup>( + 'SSLSetALPNProtocols'); + late final _SSLSetALPNProtocols = _SSLSetALPNProtocolsPtr.asFunction< + int Function(SSLContextRef, CFArrayRef)>(); - 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 SSLCopyALPNProtocols( + SSLContextRef context, + ffi.Pointer protocols, ) { - return __objc_msgSend_432( - obj, - sel, - typeIdentifier, - fileOptions, - visibility, - loadHandler, + return _SSLCopyALPNProtocols( + context, + protocols, ); } - late final __objc_msgSend_432Ptr = _lookup< + late final _SSLCopyALPNProtocolsPtr = _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)>>('SSLCopyALPNProtocols'); + late final _SSLCopyALPNProtocols = _SSLCopyALPNProtocolsPtr.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 SSLSetOCSPResponse( + SSLContextRef context, + CFDataRef response, ) { - return __objc_msgSend_433( - obj, - sel, - fileOptions, + return _SSLSetOCSPResponse( + context, + response, ); } - 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 _SSLSetOCSPResponsePtr = + _lookup>( + 'SSLSetOCSPResponse'); + late final _SSLSetOCSPResponse = _SSLSetOCSPResponsePtr.asFunction< + int Function(SSLContextRef, CFDataRef)>(); - 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 SSLSetEncryptionCertificate( + SSLContextRef context, + CFArrayRef certRefs, ) { - return __objc_msgSend_434( - obj, - sel, - typeIdentifier, - fileOptions, + return _SSLSetEncryptionCertificate( + context, + certRefs, ); } - 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 _SSLSetEncryptionCertificatePtr = + _lookup>( + 'SSLSetEncryptionCertificate'); + late final _SSLSetEncryptionCertificate = _SSLSetEncryptionCertificatePtr + .asFunction(); - 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 SSLSetClientSideAuthenticate( + SSLContextRef context, + int auth, ) { - return __objc_msgSend_435( - obj, - sel, - typeIdentifier, - completionHandler, + return _SSLSetClientSideAuthenticate( + context, + auth, ); } - 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 _SSLSetClientSideAuthenticatePtr = + _lookup>( + 'SSLSetClientSideAuthenticate'); + late final _SSLSetClientSideAuthenticate = _SSLSetClientSideAuthenticatePtr + .asFunction(); - 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 SSLAddDistinguishedName( + SSLContextRef context, + ffi.Pointer derDN, + int derDNLen, ) { - return __objc_msgSend_436( - obj, - sel, - typeIdentifier, - completionHandler, + return _SSLAddDistinguishedName( + context, + derDN, + derDNLen, ); } - late final __objc_msgSend_436Ptr = _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_436 = __objc_msgSend_436Ptr.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_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 SSLSetCertificateAuthorities( + SSLContextRef context, + CFTypeRef certificateOrArray, + int replaceExisting, ) { - return __objc_msgSend_437( - obj, - sel, - typeIdentifier, - completionHandler, + return _SSLSetCertificateAuthorities( + context, + certificateOrArray, + replaceExisting, ); } - late final __objc_msgSend_437Ptr = _lookup< + late final _SSLSetCertificateAuthoritiesPtr = _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, CFTypeRef, + Boolean)>>('SSLSetCertificateAuthorities'); + late final _SSLSetCertificateAuthorities = _SSLSetCertificateAuthoritiesPtr + .asFunction(); - 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 SSLCopyCertificateAuthorities( + SSLContextRef context, + ffi.Pointer certificates, ) { - return __objc_msgSend_438( - obj, - sel, - object, - visibility, + return _SSLCopyCertificateAuthorities( + context, + certificates, ); } - late final __objc_msgSend_438Ptr = _lookup< + late final _SSLCopyCertificateAuthoritiesPtr = _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)>(); + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLCopyCertificateAuthorities'); + late final _SSLCopyCertificateAuthorities = _SSLCopyCertificateAuthoritiesPtr + .asFunction)>(); - 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 SSLCopyDistinguishedNames( + SSLContextRef context, + ffi.Pointer names, ) { - return __objc_msgSend_439( - obj, - sel, - aClass, - visibility, - loadHandler, + return _SSLCopyDistinguishedNames( + context, + names, ); } - late final __objc_msgSend_439Ptr = _lookup< + late final _SSLCopyDistinguishedNamesPtr = _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>)>(); + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLCopyDistinguishedNames'); + late final _SSLCopyDistinguishedNames = _SSLCopyDistinguishedNamesPtr + .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 SSLGetClientCertificateState( + SSLContextRef context, + ffi.Pointer clientState, ) { - return __objc_msgSend_440( - obj, - sel, - aClass, - completionHandler, + return _SSLGetClientCertificateState( + context, + clientState, ); } - late final __objc_msgSend_440Ptr = _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_440 = __objc_msgSend_440Ptr.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_initWithItem_typeIdentifier_1 = - _registerName1("initWithItem:typeIdentifier:"); - instancetype _objc_msgSend_441( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer item, - ffi.Pointer typeIdentifier, + int SSLSetDiffieHellmanParams( + SSLContextRef context, + ffi.Pointer dhParams, + int dhParamsLen, ) { - return __objc_msgSend_441( - obj, - sel, - item, - typeIdentifier, + return _SSLSetDiffieHellmanParams( + context, + dhParams, + dhParamsLen, ); } - late final __objc_msgSend_441Ptr = _lookup< + late final _SSLSetDiffieHellmanParamsPtr = _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)>>('SSLSetDiffieHellmanParams'); + late final _SSLSetDiffieHellmanParams = _SSLSetDiffieHellmanParamsPtr + .asFunction, 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 SSLGetDiffieHellmanParams( + SSLContextRef context, + ffi.Pointer> dhParams, + ffi.Pointer dhParamsLen, ) { - return __objc_msgSend_442( - obj, - sel, - typeIdentifier, - loadHandler, + return _SSLGetDiffieHellmanParams( + context, + dhParams, + dhParamsLen, ); } - late final __objc_msgSend_442Ptr = _lookup< + late final _SSLGetDiffieHellmanParamsPtr = _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, ffi.Pointer>, + ffi.Pointer)>>('SSLGetDiffieHellmanParams'); + late final _SSLGetDiffieHellmanParams = + _SSLGetDiffieHellmanParamsPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer>, + ffi.Pointer)>(); - 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 SSLSetRsaBlinding( + SSLContextRef context, + int blinding, ) { - return __objc_msgSend_443( - obj, - sel, - typeIdentifier, - options, - completionHandler, + return _SSLSetRsaBlinding( + context, + blinding, ); } - 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 _SSLSetRsaBlindingPtr = + _lookup>( + 'SSLSetRsaBlinding'); + late final _SSLSetRsaBlinding = + _SSLSetRsaBlindingPtr.asFunction(); - late final _sel_previewImageHandler1 = _registerName1("previewImageHandler"); - NSItemProviderLoadHandler _objc_msgSend_444( - ffi.Pointer obj, - ffi.Pointer sel, + int SSLGetRsaBlinding( + SSLContextRef context, + ffi.Pointer blinding, ) { - return __objc_msgSend_444( - obj, - sel, + return _SSLGetRsaBlinding( + context, + blinding, ); } - late final __objc_msgSend_444Ptr = _lookup< + late final _SSLGetRsaBlindingPtr = _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)>>('SSLGetRsaBlinding'); + late final _SSLGetRsaBlinding = _SSLGetRsaBlindingPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer)>(); - late final _sel_setPreviewImageHandler_1 = - _registerName1("setPreviewImageHandler:"); - void _objc_msgSend_445( - ffi.Pointer obj, - ffi.Pointer sel, - NSItemProviderLoadHandler value, + int SSLHandshake( + SSLContextRef context, ) { - return __objc_msgSend_445( - obj, - sel, - value, + return _SSLHandshake( + context, ); } - 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 _SSLHandshakePtr = + _lookup>( + 'SSLHandshake'); + late final _SSLHandshake = + _SSLHandshakePtr.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 SSLReHandshake( + SSLContextRef context, ) { - return __objc_msgSend_446( - obj, - sel, - options, - completionHandler, + return _SSLReHandshake( + context, ); } - 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'); + late final _SSLReHandshakePtr = + _lookup>( + 'SSLReHandshake'); + late final _SSLReHandshake = + _SSLReHandshakePtr.asFunction(); - ffi.Pointer get NSExtensionJavaScriptPreprocessingResultsKey => - _NSExtensionJavaScriptPreprocessingResultsKey.value; + int SSLWrite( + SSLContextRef context, + ffi.Pointer data, + int dataLength, + ffi.Pointer processed, + ) { + return _SSLWrite( + context, + data, + dataLength, + processed, + ); + } - set NSExtensionJavaScriptPreprocessingResultsKey( - ffi.Pointer value) => - _NSExtensionJavaScriptPreprocessingResultsKey.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 ffi.Pointer> - _NSExtensionJavaScriptFinalizeArgumentKey = - _lookup>( - 'NSExtensionJavaScriptFinalizeArgumentKey'); + int SSLRead( + SSLContextRef context, + ffi.Pointer data, + int dataLength, + ffi.Pointer processed, + ) { + return _SSLRead( + context, + data, + dataLength, + processed, + ); + } - ffi.Pointer get NSExtensionJavaScriptFinalizeArgumentKey => - _NSExtensionJavaScriptFinalizeArgumentKey.value; + 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)>(); - set NSExtensionJavaScriptFinalizeArgumentKey(ffi.Pointer value) => - _NSExtensionJavaScriptFinalizeArgumentKey.value = value; + int SSLGetBufferedReadSize( + SSLContextRef context, + ffi.Pointer bufferSize, + ) { + return _SSLGetBufferedReadSize( + context, + bufferSize, + ); + } - late final ffi.Pointer> _NSItemProviderErrorDomain = - _lookup>('NSItemProviderErrorDomain'); + late final _SSLGetBufferedReadSizePtr = _lookup< + ffi.NativeFunction< + OSStatus Function( + SSLContextRef, ffi.Pointer)>>('SSLGetBufferedReadSize'); + late final _SSLGetBufferedReadSize = _SSLGetBufferedReadSizePtr.asFunction< + int Function(SSLContextRef, ffi.Pointer)>(); - ffi.Pointer get NSItemProviderErrorDomain => - _NSItemProviderErrorDomain.value; + int SSLGetDatagramWriteSize( + SSLContextRef dtlsContext, + ffi.Pointer bufSize, + ) { + return _SSLGetDatagramWriteSize( + dtlsContext, + bufSize, + ); + } - set NSItemProviderErrorDomain(ffi.Pointer value) => - _NSItemProviderErrorDomain.value = value; + late final _SSLGetDatagramWriteSizePtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLGetDatagramWriteSize'); + late final _SSLGetDatagramWriteSize = _SSLGetDatagramWriteSizePtr.asFunction< + int Function(SSLContextRef, ffi.Pointer)>(); - late final ffi.Pointer _NSStringTransformLatinToKatakana = - _lookup('NSStringTransformLatinToKatakana'); + int SSLClose( + SSLContextRef context, + ) { + return _SSLClose( + context, + ); + } - NSStringTransform get NSStringTransformLatinToKatakana => - _NSStringTransformLatinToKatakana.value; + late final _SSLClosePtr = + _lookup>('SSLClose'); + late final _SSLClose = _SSLClosePtr.asFunction(); - set NSStringTransformLatinToKatakana(NSStringTransform value) => - _NSStringTransformLatinToKatakana.value = value; + int SSLSetError( + SSLContextRef context, + int status, + ) { + return _SSLSetError( + context, + status, + ); + } - late final ffi.Pointer _NSStringTransformLatinToHiragana = - _lookup('NSStringTransformLatinToHiragana'); + late final _SSLSetErrorPtr = + _lookup>( + 'SSLSetError'); + late final _SSLSetError = + _SSLSetErrorPtr.asFunction(); - NSStringTransform get NSStringTransformLatinToHiragana => - _NSStringTransformLatinToHiragana.value; + /// -1LL + late final ffi.Pointer _NSURLSessionTransferSizeUnknown = + _lookup('NSURLSessionTransferSizeUnknown'); - set NSStringTransformLatinToHiragana(NSStringTransform value) => - _NSStringTransformLatinToHiragana.value = value; + int get NSURLSessionTransferSizeUnknown => + _NSURLSessionTransferSizeUnknown.value; - late final ffi.Pointer _NSStringTransformLatinToHangul = - _lookup('NSStringTransformLatinToHangul'); + set NSURLSessionTransferSizeUnknown(int value) => + _NSURLSessionTransferSizeUnknown.value = value; - NSStringTransform get NSStringTransformLatinToHangul => - _NSStringTransformLatinToHangul.value; + late final _class_NSURLSession1 = _getClass1("NSURLSession"); + late final _sel_sharedSession1 = _registerName1("sharedSession"); + ffi.Pointer _objc_msgSend_408( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_408( + obj, + sel, + ); + } - set NSStringTransformLatinToHangul(NSStringTransform value) => - _NSStringTransformLatinToHangul.value = value; + late final __objc_msgSend_408Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_408 = __objc_msgSend_408Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - 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( + late final _class_NSURLSessionConfiguration1 = + _getClass1("NSURLSessionConfiguration"); + late final _sel_defaultSessionConfiguration1 = + _registerName1("defaultSessionConfiguration"); + ffi.Pointer _objc_msgSend_409( ffi.Pointer obj, ffi.Pointer sel, - NSRange range, - ffi.Pointer aString, ) { - return __objc_msgSend_447( + return __objc_msgSend_409( obj, sel, - range, - aString, ); } - late final __objc_msgSend_447Ptr = _lookup< + late final __objc_msgSend_409Ptr = _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_409 = __objc_msgSend_409Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - late final _sel_insertString_atIndex_1 = - _registerName1("insertString:atIndex:"); - void _objc_msgSend_448( + late final _sel_ephemeralSessionConfiguration1 = + _registerName1("ephemeralSessionConfiguration"); + late final _sel_backgroundSessionConfigurationWithIdentifier_1 = + _registerName1("backgroundSessionConfigurationWithIdentifier:"); + ffi.Pointer _objc_msgSend_410( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer aString, - int loc, + ffi.Pointer identifier, ) { - return __objc_msgSend_448( + return __objc_msgSend_410( obj, sel, - aString, - loc, + identifier, ); } - late final __objc_msgSend_448Ptr = _lookup< + late final __objc_msgSend_410Ptr = _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, 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_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_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_411( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer target, - ffi.Pointer replacement, - int options, - NSRange searchRange, ) { - return __objc_msgSend_449( + return __objc_msgSend_411( obj, sel, - target, - replacement, - options, - searchRange, ); } - late final __objc_msgSend_449Ptr = _lookup< + late final __objc_msgSend_411Ptr = _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)>(); + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_411 = __objc_msgSend_411Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - late final _sel_applyTransform_reverse_range_updatedRange_1 = - _registerName1("applyTransform:reverse:range:updatedRange:"); - bool _objc_msgSend_450( + late final _sel_setTLSMinimumSupportedProtocol_1 = + _registerName1("setTLSMinimumSupportedProtocol:"); + void _objc_msgSend_412( ffi.Pointer obj, ffi.Pointer sel, - NSStringTransform transform, - bool reverse, - NSRange range, - NSRangePointer resultingRange, + int value, ) { - return __objc_msgSend_450( + return __objc_msgSend_412( obj, sel, - transform, - reverse, - range, - resultingRange, + value, ); } - late final __objc_msgSend_450Ptr = _lookup< + late final __objc_msgSend_412Ptr = _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.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_412 = __objc_msgSend_412Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - ffi.Pointer _objc_msgSend_451( + late final _sel_TLSMaximumSupportedProtocol1 = + _registerName1("TLSMaximumSupportedProtocol"); + late final _sel_setTLSMaximumSupportedProtocol_1 = + _registerName1("setTLSMaximumSupportedProtocol:"); + late final _sel_TLSMinimumSupportedProtocolVersion1 = + _registerName1("TLSMinimumSupportedProtocolVersion"); + int _objc_msgSend_413( ffi.Pointer obj, ffi.Pointer sel, - int capacity, ) { - return __objc_msgSend_451( + return __objc_msgSend_413( obj, sel, - capacity, ); } - late final __objc_msgSend_451Ptr = _lookup< + late final __objc_msgSend_413Ptr = _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.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_413 = __objc_msgSend_413Ptr.asFunction< + int Function(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 _sel_setTLSMinimumSupportedProtocolVersion_1 = + _registerName1("setTLSMinimumSupportedProtocolVersion:"); + void _objc_msgSend_414( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer otherSet, + int value, ) { - return __objc_msgSend_452( + return __objc_msgSend_414( obj, sel, - otherSet, + value, ); } - late final __objc_msgSend_452Ptr = _lookup< + late final __objc_msgSend_414Ptr = _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)>>('objc_msgSend'); + late final __objc_msgSend_414 = __objc_msgSend_414Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_formIntersectionWithCharacterSet_1 = - _registerName1("formIntersectionWithCharacterSet:"); - late final _sel_invert1 = _registerName1("invert"); - ffi.Pointer _objc_msgSend_453( + 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_415( ffi.Pointer obj, ffi.Pointer sel, - NSRange aRange, + ffi.Pointer value, ) { - return __objc_msgSend_453( + return __objc_msgSend_415( obj, sel, - aRange, + value, ); } - late final __objc_msgSend_453Ptr = _lookup< + late final __objc_msgSend_415Ptr = _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)>>('objc_msgSend'); + late final __objc_msgSend_415 = __objc_msgSend_415Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - ffi.Pointer _objc_msgSend_454( + late final _class_NSURLCredentialStorage1 = + _getClass1("NSURLCredentialStorage"); + late final _sel_URLCredentialStorage1 = + _registerName1("URLCredentialStorage"); + ffi.Pointer _objc_msgSend_416( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer aString, ) { - return __objc_msgSend_454( + return __objc_msgSend_416( obj, sel, - aString, ); } - late final __objc_msgSend_454Ptr = _lookup< + late final __objc_msgSend_416Ptr = _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 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_416 = __objc_msgSend_416Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer _objc_msgSend_455( + late final _sel_setURLCredentialStorage_1 = + _registerName1("setURLCredentialStorage:"); + void _objc_msgSend_417( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer data, + ffi.Pointer value, ) { - return __objc_msgSend_455( + return __objc_msgSend_417( obj, sel, - data, + value, ); } - late final __objc_msgSend_455Ptr = _lookup< + late final __objc_msgSend_417Ptr = _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; + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_417 = __objc_msgSend_417Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final ffi.Pointer> - _NSHTTPPropertyStatusReasonKey = - _lookup>('NSHTTPPropertyStatusReasonKey'); + late final _sel_URLCache1 = _registerName1("URLCache"); + late final _sel_setURLCache_1 = _registerName1("setURLCache:"); + 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( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ) { + return __objc_msgSend_418( + obj, + sel, + value, + ); + } - ffi.Pointer get NSHTTPPropertyStatusReasonKey => - _NSHTTPPropertyStatusReasonKey.value; + late final __objc_msgSend_418Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_418 = __objc_msgSend_418Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - set NSHTTPPropertyStatusReasonKey(ffi.Pointer value) => - _NSHTTPPropertyStatusReasonKey.value = value; + late final _sel_multipathServiceType1 = + _registerName1("multipathServiceType"); + int _objc_msgSend_419( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_419( + obj, + sel, + ); + } - late final ffi.Pointer> - _NSHTTPPropertyServerHTTPVersionKey = - _lookup>('NSHTTPPropertyServerHTTPVersionKey'); + 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)>(); - ffi.Pointer get NSHTTPPropertyServerHTTPVersionKey => - _NSHTTPPropertyServerHTTPVersionKey.value; + late final _sel_setMultipathServiceType_1 = + _registerName1("setMultipathServiceType:"); + void _objc_msgSend_420( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_420( + obj, + sel, + value, + ); + } - set NSHTTPPropertyServerHTTPVersionKey(ffi.Pointer value) => - _NSHTTPPropertyServerHTTPVersionKey.value = value; + late final __objc_msgSend_420Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_420 = __objc_msgSend_420Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - late final ffi.Pointer> - _NSHTTPPropertyRedirectionHeadersKey = - _lookup>('NSHTTPPropertyRedirectionHeadersKey'); + late final _sel_backgroundSessionConfiguration_1 = + _registerName1("backgroundSessionConfiguration:"); + late final _sel_sessionWithConfiguration_1 = + _registerName1("sessionWithConfiguration:"); + ffi.Pointer _objc_msgSend_421( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer configuration, + ) { + return __objc_msgSend_421( + obj, + sel, + configuration, + ); + } - ffi.Pointer get NSHTTPPropertyRedirectionHeadersKey => - _NSHTTPPropertyRedirectionHeadersKey.value; + late final __objc_msgSend_421Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_421 = __objc_msgSend_421Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - set NSHTTPPropertyRedirectionHeadersKey(ffi.Pointer value) => - _NSHTTPPropertyRedirectionHeadersKey.value = value; + late final _sel_sessionWithConfiguration_delegate_delegateQueue_1 = + _registerName1("sessionWithConfiguration:delegate:delegateQueue:"); + ffi.Pointer _objc_msgSend_422( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer configuration, + ffi.Pointer delegate, + ffi.Pointer queue, + ) { + return __objc_msgSend_422( + obj, + sel, + configuration, + delegate, + queue, + ); + } - late final ffi.Pointer> - _NSHTTPPropertyErrorPageDataKey = - _lookup>('NSHTTPPropertyErrorPageDataKey'); + late final __objc_msgSend_422Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_422 = __objc_msgSend_422Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - ffi.Pointer get NSHTTPPropertyErrorPageDataKey => - _NSHTTPPropertyErrorPageDataKey.value; + 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_423( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_423( + obj, + sel, + completionHandler, + ); + } - set NSHTTPPropertyErrorPageDataKey(ffi.Pointer value) => - _NSHTTPPropertyErrorPageDataKey.value = value; + late final __objc_msgSend_423Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_423 = __objc_msgSend_423Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - late final ffi.Pointer> _NSHTTPPropertyHTTPProxy = - _lookup>('NSHTTPPropertyHTTPProxy'); + late final _sel_getAllTasksWithCompletionHandler_1 = + _registerName1("getAllTasksWithCompletionHandler:"); + void _objc_msgSend_424( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_424( + obj, + sel, + completionHandler, + ); + } - ffi.Pointer get NSHTTPPropertyHTTPProxy => - _NSHTTPPropertyHTTPProxy.value; + late final __objc_msgSend_424Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_424 = __objc_msgSend_424Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - set NSHTTPPropertyHTTPProxy(ffi.Pointer value) => - _NSHTTPPropertyHTTPProxy.value = value; + late final _sel_dataTaskWithRequest_1 = + _registerName1("dataTaskWithRequest:"); + ffi.Pointer _objc_msgSend_425( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer request, + ) { + return __objc_msgSend_425( + obj, + sel, + request, + ); + } - late final ffi.Pointer> _NSFTPPropertyUserLoginKey = - _lookup>('NSFTPPropertyUserLoginKey'); + 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 NSFTPPropertyUserLoginKey => - _NSFTPPropertyUserLoginKey.value; + late final _sel_dataTaskWithURL_1 = _registerName1("dataTaskWithURL:"); + ffi.Pointer _objc_msgSend_426( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + ) { + return __objc_msgSend_426( + obj, + sel, + url, + ); + } - set NSFTPPropertyUserLoginKey(ffi.Pointer value) => - _NSFTPPropertyUserLoginKey.value = value; + late final __objc_msgSend_426Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(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)>(); - late final ffi.Pointer> - _NSFTPPropertyUserPasswordKey = - _lookup>('NSFTPPropertyUserPasswordKey'); + late final _class_NSURLSessionUploadTask1 = + _getClass1("NSURLSessionUploadTask"); + late final _sel_uploadTaskWithRequest_fromFile_1 = + _registerName1("uploadTaskWithRequest:fromFile:"); + ffi.Pointer _objc_msgSend_427( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer request, + ffi.Pointer fileURL, + ) { + return __objc_msgSend_427( + obj, + sel, + request, + fileURL, + ); + } - ffi.Pointer get NSFTPPropertyUserPasswordKey => - _NSFTPPropertyUserPasswordKey.value; + 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_427 = __objc_msgSend_427Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - set NSFTPPropertyUserPasswordKey(ffi.Pointer value) => - _NSFTPPropertyUserPasswordKey.value = value; + late final _sel_uploadTaskWithRequest_fromData_1 = + _registerName1("uploadTaskWithRequest:fromData:"); + ffi.Pointer _objc_msgSend_428( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer request, + ffi.Pointer bodyData, + ) { + return __objc_msgSend_428( + obj, + sel, + request, + bodyData, + ); + } - late final ffi.Pointer> - _NSFTPPropertyActiveTransferModeKey = - _lookup>('NSFTPPropertyActiveTransferModeKey'); + 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_428 = __objc_msgSend_428Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - ffi.Pointer get NSFTPPropertyActiveTransferModeKey => - _NSFTPPropertyActiveTransferModeKey.value; + late final _sel_uploadTaskWithStreamedRequest_1 = + _registerName1("uploadTaskWithStreamedRequest:"); + ffi.Pointer _objc_msgSend_429( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer request, + ) { + return __objc_msgSend_429( + obj, + sel, + request, + ); + } - set NSFTPPropertyActiveTransferModeKey(ffi.Pointer value) => - _NSFTPPropertyActiveTransferModeKey.value = value; + late final __objc_msgSend_429Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_429 = __objc_msgSend_429Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final ffi.Pointer> _NSFTPPropertyFileOffsetKey = - _lookup>('NSFTPPropertyFileOffsetKey'); + late final _class_NSURLSessionDownloadTask1 = + _getClass1("NSURLSessionDownloadTask"); + late final _sel_cancelByProducingResumeData_1 = + _registerName1("cancelByProducingResumeData:"); + void _objc_msgSend_430( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_430( + obj, + sel, + completionHandler, + ); + } - ffi.Pointer get NSFTPPropertyFileOffsetKey => - _NSFTPPropertyFileOffsetKey.value; + late final __objc_msgSend_430Ptr = _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>)>(); - set NSFTPPropertyFileOffsetKey(ffi.Pointer value) => - _NSFTPPropertyFileOffsetKey.value = value; + late final _sel_downloadTaskWithRequest_1 = + _registerName1("downloadTaskWithRequest:"); + ffi.Pointer _objc_msgSend_431( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer request, + ) { + return __objc_msgSend_431( + obj, + sel, + request, + ); + } - late final ffi.Pointer> _NSFTPPropertyFTPProxy = - _lookup>('NSFTPPropertyFTPProxy'); + 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)>(); - ffi.Pointer get NSFTPPropertyFTPProxy => - _NSFTPPropertyFTPProxy.value; + late final _sel_downloadTaskWithURL_1 = + _registerName1("downloadTaskWithURL:"); + ffi.Pointer _objc_msgSend_432( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + ) { + return __objc_msgSend_432( + obj, + sel, + url, + ); + } - set NSFTPPropertyFTPProxy(ffi.Pointer value) => - _NSFTPPropertyFTPProxy.value = value; + late final __objc_msgSend_432Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_432 = __objc_msgSend_432Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - /// 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 _sel_downloadTaskWithResumeData_1 = + _registerName1("downloadTaskWithResumeData:"); + ffi.Pointer _objc_msgSend_433( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer resumeData, + ) { + return __objc_msgSend_433( + obj, + sel, + resumeData, + ); + } - ffi.Pointer get NSURLFileScheme => _NSURLFileScheme.value; + late final __objc_msgSend_433Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_433 = __objc_msgSend_433Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - set NSURLFileScheme(ffi.Pointer value) => - _NSURLFileScheme.value = value; + late final _class_NSURLSessionStreamTask1 = + _getClass1("NSURLSessionStreamTask"); + late final _sel_readDataOfMinLength_maxLength_timeout_completionHandler_1 = + _registerName1( + "readDataOfMinLength:maxLength:timeout:completionHandler:"); + void _objc_msgSend_434( + ffi.Pointer obj, + ffi.Pointer sel, + int minBytes, + int maxBytes, + double timeout, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_434( + obj, + sel, + minBytes, + maxBytes, + timeout, + completionHandler, + ); + } - /// 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 __objc_msgSend_434Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + NSUInteger, + NSUInteger, + NSTimeInterval, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_434 = __objc_msgSend_434Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, int, + double, ffi.Pointer<_ObjCBlock>)>(); - NSURLResourceKey get NSURLKeysOfUnsetValuesKey => - _NSURLKeysOfUnsetValuesKey.value; + late final _sel_writeData_timeout_completionHandler_1 = + _registerName1("writeData:timeout:completionHandler:"); + void _objc_msgSend_435( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer data, + double timeout, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_435( + obj, + sel, + data, + timeout, + completionHandler, + ); + } - set NSURLKeysOfUnsetValuesKey(NSURLResourceKey value) => - _NSURLKeysOfUnsetValuesKey.value = value; + late final __objc_msgSend_435Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSTimeInterval, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_435 = __objc_msgSend_435Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, double, ffi.Pointer<_ObjCBlock>)>(); - /// The resource name provided by the file system (Read-write, value type NSString) - late final ffi.Pointer _NSURLNameKey = - _lookup('NSURLNameKey'); + 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_436( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer hostname, + int port, + ) { + return __objc_msgSend_436( + obj, + sel, + hostname, + port, + ); + } - NSURLResourceKey get NSURLNameKey => _NSURLNameKey.value; + late final __objc_msgSend_436Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSInteger)>>('objc_msgSend'); + late final __objc_msgSend_436 = __objc_msgSend_436Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, int)>(); - set NSURLNameKey(NSURLResourceKey value) => _NSURLNameKey.value = value; + late final _class_NSNetService1 = _getClass1("NSNetService"); + late final _sel_streamTaskWithNetService_1 = + _registerName1("streamTaskWithNetService:"); + ffi.Pointer _objc_msgSend_437( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer service, + ) { + return __objc_msgSend_437( + obj, + sel, + service, + ); + } - /// 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, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_437 = __objc_msgSend_437Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - NSURLResourceKey get NSURLLocalizedNameKey => _NSURLLocalizedNameKey.value; + late final _class_NSURLSessionWebSocketTask1 = + _getClass1("NSURLSessionWebSocketTask"); + late final _class_NSURLSessionWebSocketMessage1 = + _getClass1("NSURLSessionWebSocketMessage"); + late final _sel_type1 = _registerName1("type"); + int _objc_msgSend_438( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_438( + obj, + sel, + ); + } - set NSURLLocalizedNameKey(NSURLResourceKey value) => - _NSURLLocalizedNameKey.value = value; + late final __objc_msgSend_438Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_438 = __objc_msgSend_438Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - /// True for regular files (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLIsRegularFileKey = - _lookup('NSURLIsRegularFileKey'); + late final _sel_sendMessage_completionHandler_1 = + _registerName1("sendMessage:completionHandler:"); + void _objc_msgSend_439( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer message, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_439( + obj, + sel, + message, + completionHandler, + ); + } - NSURLResourceKey get NSURLIsRegularFileKey => _NSURLIsRegularFileKey.value; + 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_439 = __objc_msgSend_439Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); - set NSURLIsRegularFileKey(NSURLResourceKey value) => - _NSURLIsRegularFileKey.value = value; + late final _sel_receiveMessageWithCompletionHandler_1 = + _registerName1("receiveMessageWithCompletionHandler:"); + void _objc_msgSend_440( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_440( + obj, + sel, + completionHandler, + ); + } - /// 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.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_440 = __objc_msgSend_440Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - NSURLResourceKey get NSURLIsDirectoryKey => _NSURLIsDirectoryKey.value; + late final _sel_sendPingWithPongReceiveHandler_1 = + _registerName1("sendPingWithPongReceiveHandler:"); + void _objc_msgSend_441( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> pongReceiveHandler, + ) { + return __objc_msgSend_441( + obj, + sel, + pongReceiveHandler, + ); + } - set NSURLIsDirectoryKey(NSURLResourceKey value) => - _NSURLIsDirectoryKey.value = value; + late final __objc_msgSend_441Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_441 = __objc_msgSend_441Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - /// True for symlinks (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLIsSymbolicLinkKey = - _lookup('NSURLIsSymbolicLinkKey'); + late final _sel_cancelWithCloseCode_reason_1 = + _registerName1("cancelWithCloseCode:reason:"); + void _objc_msgSend_442( + ffi.Pointer obj, + ffi.Pointer sel, + int closeCode, + ffi.Pointer reason, + ) { + return __objc_msgSend_442( + obj, + sel, + closeCode, + reason, + ); + } - NSURLResourceKey get NSURLIsSymbolicLinkKey => _NSURLIsSymbolicLinkKey.value; + 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_442 = __objc_msgSend_442Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer)>(); - set NSURLIsSymbolicLinkKey(NSURLResourceKey value) => - _NSURLIsSymbolicLinkKey.value = value; + late final _sel_maximumMessageSize1 = _registerName1("maximumMessageSize"); + late final _sel_setMaximumMessageSize_1 = + _registerName1("setMaximumMessageSize:"); + late final _sel_closeCode1 = _registerName1("closeCode"); + int _objc_msgSend_443( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_443( + obj, + sel, + ); + } - /// 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.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_443 = __objc_msgSend_443Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - NSURLResourceKey get NSURLIsVolumeKey => _NSURLIsVolumeKey.value; + late final _sel_closeReason1 = _registerName1("closeReason"); + late final _sel_webSocketTaskWithURL_1 = + _registerName1("webSocketTaskWithURL:"); + ffi.Pointer _objc_msgSend_444( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + ) { + return __objc_msgSend_444( + obj, + sel, + url, + ); + } - set NSURLIsVolumeKey(NSURLResourceKey value) => - _NSURLIsVolumeKey.value = value; + late final __objc_msgSend_444Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_444 = __objc_msgSend_444Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - /// 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_webSocketTaskWithURL_protocols_1 = + _registerName1("webSocketTaskWithURL:protocols:"); + ffi.Pointer _objc_msgSend_445( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + ffi.Pointer protocols, + ) { + return __objc_msgSend_445( + obj, + sel, + url, + protocols, + ); + } - NSURLResourceKey get NSURLIsPackageKey => _NSURLIsPackageKey.value; + 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_445 = __objc_msgSend_445Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - set NSURLIsPackageKey(NSURLResourceKey value) => - _NSURLIsPackageKey.value = value; + late final _sel_webSocketTaskWithRequest_1 = + _registerName1("webSocketTaskWithRequest:"); + ffi.Pointer _objc_msgSend_446( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer request, + ) { + return __objc_msgSend_446( + obj, + sel, + request, + ); + } - /// 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.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_446 = __objc_msgSend_446Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - NSURLResourceKey get NSURLIsApplicationKey => _NSURLIsApplicationKey.value; + late final _sel_dataTaskWithRequest_completionHandler_1 = + _registerName1("dataTaskWithRequest:completionHandler:"); + ffi.Pointer _objc_msgSend_447( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer request, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_447( + obj, + sel, + request, + 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_dataTaskWithURL_completionHandler_1 = + _registerName1("dataTaskWithURL:completionHandler:"); + ffi.Pointer _objc_msgSend_448( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_448( + obj, + sel, + url, + completionHandler, + ); + } - NSURLResourceKey get NSURLApplicationIsScriptableKey => - _NSURLApplicationIsScriptableKey.value; + 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_448 = __objc_msgSend_448Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - set NSURLApplicationIsScriptableKey(NSURLResourceKey value) => - _NSURLApplicationIsScriptableKey.value = value; + late final _sel_uploadTaskWithRequest_fromFile_completionHandler_1 = + _registerName1("uploadTaskWithRequest:fromFile:completionHandler:"); + ffi.Pointer _objc_msgSend_449( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer request, + ffi.Pointer fileURL, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_449( + obj, + sel, + request, + fileURL, + completionHandler, + ); + } - /// 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.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_449 = __objc_msgSend_449Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - NSURLResourceKey get NSURLIsSystemImmutableKey => - _NSURLIsSystemImmutableKey.value; + late final _sel_uploadTaskWithRequest_fromData_completionHandler_1 = + _registerName1("uploadTaskWithRequest:fromData:completionHandler:"); + ffi.Pointer _objc_msgSend_450( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer request, + ffi.Pointer bodyData, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_450( + obj, + sel, + request, + bodyData, + completionHandler, + ); + } - set NSURLIsSystemImmutableKey(NSURLResourceKey value) => - _NSURLIsSystemImmutableKey.value = value; + late final __objc_msgSend_450Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_450 = __objc_msgSend_450Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - /// True for user-immutable resources (Read-write, value type boolean NSNumber) - late final ffi.Pointer _NSURLIsUserImmutableKey = - _lookup('NSURLIsUserImmutableKey'); + late final _sel_downloadTaskWithRequest_completionHandler_1 = + _registerName1("downloadTaskWithRequest:completionHandler:"); + ffi.Pointer _objc_msgSend_451( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer request, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_451( + obj, + sel, + request, + completionHandler, + ); + } - NSURLResourceKey get NSURLIsUserImmutableKey => - _NSURLIsUserImmutableKey.value; + 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_451 = __objc_msgSend_451Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - set NSURLIsUserImmutableKey(NSURLResourceKey value) => - _NSURLIsUserImmutableKey.value = value; + late final _sel_downloadTaskWithURL_completionHandler_1 = + _registerName1("downloadTaskWithURL:completionHandler:"); + ffi.Pointer _objc_msgSend_452( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_452( + obj, + sel, + url, + completionHandler, + ); + } - /// 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 __objc_msgSend_452Ptr = _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< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - NSURLResourceKey get NSURLIsHiddenKey => _NSURLIsHiddenKey.value; + late final _sel_downloadTaskWithResumeData_completionHandler_1 = + _registerName1("downloadTaskWithResumeData:completionHandler:"); + ffi.Pointer _objc_msgSend_453( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer resumeData, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_453( + obj, + sel, + resumeData, + completionHandler, + ); + } - set NSURLIsHiddenKey(NSURLResourceKey value) => - _NSURLIsHiddenKey.value = value; + 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_453 = __objc_msgSend_453Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - /// 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; + late final ffi.Pointer _NSURLSessionTaskPriorityDefault = + _lookup('NSURLSessionTaskPriorityDefault'); - /// The date the resource was created (Read-write, value type NSDate) - late final ffi.Pointer _NSURLCreationDateKey = - _lookup('NSURLCreationDateKey'); + double get NSURLSessionTaskPriorityDefault => + _NSURLSessionTaskPriorityDefault.value; - NSURLResourceKey get NSURLCreationDateKey => _NSURLCreationDateKey.value; + set NSURLSessionTaskPriorityDefault(double value) => + _NSURLSessionTaskPriorityDefault.value = value; - set NSURLCreationDateKey(NSURLResourceKey value) => - _NSURLCreationDateKey.value = value; + late final ffi.Pointer _NSURLSessionTaskPriorityLow = + _lookup('NSURLSessionTaskPriorityLow'); - /// The date the resource was last accessed (Read-write, value type NSDate) - late final ffi.Pointer _NSURLContentAccessDateKey = - _lookup('NSURLContentAccessDateKey'); + double get NSURLSessionTaskPriorityLow => _NSURLSessionTaskPriorityLow.value; - NSURLResourceKey get NSURLContentAccessDateKey => - _NSURLContentAccessDateKey.value; + set NSURLSessionTaskPriorityLow(double value) => + _NSURLSessionTaskPriorityLow.value = value; - set NSURLContentAccessDateKey(NSURLResourceKey value) => - _NSURLContentAccessDateKey.value = value; + late final ffi.Pointer _NSURLSessionTaskPriorityHigh = + _lookup('NSURLSessionTaskPriorityHigh'); - /// The time the resource content was last modified (Read-write, value type NSDate) - late final ffi.Pointer _NSURLContentModificationDateKey = - _lookup('NSURLContentModificationDateKey'); + double get NSURLSessionTaskPriorityHigh => + _NSURLSessionTaskPriorityHigh.value; - NSURLResourceKey get NSURLContentModificationDateKey => - _NSURLContentModificationDateKey.value; + set NSURLSessionTaskPriorityHigh(double value) => + _NSURLSessionTaskPriorityHigh.value = value; - set NSURLContentModificationDateKey(NSURLResourceKey value) => - _NSURLContentModificationDateKey.value = value; + /// Key in the userInfo dictionary of an NSError received during a failed download. + late final ffi.Pointer> + _NSURLSessionDownloadTaskResumeData = + _lookup>('NSURLSessionDownloadTaskResumeData'); - /// The time the resource's attributes were last modified (Read-only, value type NSDate) - late final ffi.Pointer _NSURLAttributeModificationDateKey = - _lookup('NSURLAttributeModificationDateKey'); + ffi.Pointer get NSURLSessionDownloadTaskResumeData => + _NSURLSessionDownloadTaskResumeData.value; - NSURLResourceKey get NSURLAttributeModificationDateKey => - _NSURLAttributeModificationDateKey.value; + set NSURLSessionDownloadTaskResumeData(ffi.Pointer value) => + _NSURLSessionDownloadTaskResumeData.value = value; - set NSURLAttributeModificationDateKey(NSURLResourceKey value) => - _NSURLAttributeModificationDateKey.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_454( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_454( + obj, + sel, + ); + } - /// Number of hard links to the resource (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLLinkCountKey = - _lookup('NSURLLinkCountKey'); + late final __objc_msgSend_454Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_454 = __objc_msgSend_454Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - NSURLResourceKey get NSURLLinkCountKey => _NSURLLinkCountKey.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_455( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_455( + obj, + sel, + ); + } - set NSURLLinkCountKey(NSURLResourceKey value) => - _NSURLLinkCountKey.value = value; + late final __objc_msgSend_455Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_455 = __objc_msgSend_455Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - /// The resource's parent directory, if any (Read-only, value type NSURL) - late final ffi.Pointer _NSURLParentDirectoryURLKey = - _lookup('NSURLParentDirectoryURLKey'); + 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_456( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_456( + obj, + sel, + ); + } - NSURLResourceKey get NSURLParentDirectoryURLKey => - _NSURLParentDirectoryURLKey.value; + late final __objc_msgSend_456Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_456 = __objc_msgSend_456Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - set NSURLParentDirectoryURLKey(NSURLResourceKey value) => - _NSURLParentDirectoryURLKey.value = 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_457( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer typeIdentifier, + int visibility, + ffi.Pointer<_ObjCBlock> loadHandler, + ) { + return __objc_msgSend_457( + obj, + sel, + typeIdentifier, + visibility, + loadHandler, + ); + } - /// URL of the volume on which the resource is stored (Read-only, value type NSURL) - late final ffi.Pointer _NSURLVolumeURLKey = - _lookup('NSURLVolumeURLKey'); + late final __objc_msgSend_457Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_457 = __objc_msgSend_457Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); - NSURLResourceKey get NSURLVolumeURLKey => _NSURLVolumeURLKey.value; + late final _sel_registerFileRepresentationForTypeIdentifier_fileOptions_visibility_loadHandler_1 = + _registerName1( + "registerFileRepresentationForTypeIdentifier:fileOptions:visibility:loadHandler:"); + void _objc_msgSend_458( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer typeIdentifier, + int fileOptions, + int visibility, + ffi.Pointer<_ObjCBlock> loadHandler, + ) { + return __objc_msgSend_458( + obj, + sel, + typeIdentifier, + fileOptions, + visibility, + loadHandler, + ); + } - set NSURLVolumeURLKey(NSURLResourceKey value) => - _NSURLVolumeURLKey.value = value; + late final __objc_msgSend_458Ptr = _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_458 = __objc_msgSend_458Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, int, ffi.Pointer<_ObjCBlock>)>(); - /// Uniform type identifier (UTI) for the resource (Read-only, value type NSString) - late final ffi.Pointer _NSURLTypeIdentifierKey = - _lookup('NSURLTypeIdentifierKey'); + late final _sel_registeredTypeIdentifiers1 = + _registerName1("registeredTypeIdentifiers"); + late final _sel_registeredTypeIdentifiersWithFileOptions_1 = + _registerName1("registeredTypeIdentifiersWithFileOptions:"); + ffi.Pointer _objc_msgSend_459( + ffi.Pointer obj, + ffi.Pointer sel, + int fileOptions, + ) { + return __objc_msgSend_459( + obj, + sel, + fileOptions, + ); + } - NSURLResourceKey get NSURLTypeIdentifierKey => _NSURLTypeIdentifierKey.value; + late final __objc_msgSend_459Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_459 = __objc_msgSend_459Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - set NSURLTypeIdentifierKey(NSURLResourceKey value) => - _NSURLTypeIdentifierKey.value = value; + late final _sel_hasItemConformingToTypeIdentifier_1 = + _registerName1("hasItemConformingToTypeIdentifier:"); + late final _sel_hasRepresentationConformingToTypeIdentifier_fileOptions_1 = + _registerName1( + "hasRepresentationConformingToTypeIdentifier:fileOptions:"); + bool _objc_msgSend_460( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer typeIdentifier, + int fileOptions, + ) { + return __objc_msgSend_460( + obj, + sel, + typeIdentifier, + fileOptions, + ); + } - /// File type (UTType) for the resource (Read-only, value type UTType) - late final ffi.Pointer _NSURLContentTypeKey = - _lookup('NSURLContentTypeKey'); + 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_460 = __objc_msgSend_460Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); - NSURLResourceKey get NSURLContentTypeKey => _NSURLContentTypeKey.value; + late final _sel_loadDataRepresentationForTypeIdentifier_completionHandler_1 = + _registerName1( + "loadDataRepresentationForTypeIdentifier:completionHandler:"); + ffi.Pointer _objc_msgSend_461( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer typeIdentifier, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_461( + obj, + sel, + typeIdentifier, + completionHandler, + ); + } - set NSURLContentTypeKey(NSURLResourceKey value) => - _NSURLContentTypeKey.value = value; + 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_461 = __objc_msgSend_461Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - /// User-visible type or "kind" description (Read-only, value type NSString) - late final ffi.Pointer _NSURLLocalizedTypeDescriptionKey = - _lookup('NSURLLocalizedTypeDescriptionKey'); + late final _sel_loadFileRepresentationForTypeIdentifier_completionHandler_1 = + _registerName1( + "loadFileRepresentationForTypeIdentifier:completionHandler:"); + ffi.Pointer _objc_msgSend_462( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer typeIdentifier, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_462( + obj, + sel, + typeIdentifier, + completionHandler, + ); + } - NSURLResourceKey get NSURLLocalizedTypeDescriptionKey => - _NSURLLocalizedTypeDescriptionKey.value; + 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_462 = __objc_msgSend_462Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - set NSURLLocalizedTypeDescriptionKey(NSURLResourceKey value) => - _NSURLLocalizedTypeDescriptionKey.value = value; + late final _sel_loadInPlaceFileRepresentationForTypeIdentifier_completionHandler_1 = + _registerName1( + "loadInPlaceFileRepresentationForTypeIdentifier:completionHandler:"); + ffi.Pointer _objc_msgSend_463( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer typeIdentifier, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_463( + 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_463Ptr = _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< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - NSURLResourceKey get NSURLLabelNumberKey => _NSURLLabelNumberKey.value; + 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_464( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer object, + int visibility, + ) { + return __objc_msgSend_464( + obj, + sel, + object, + visibility, + ); + } - set NSURLLabelNumberKey(NSURLResourceKey value) => - _NSURLLabelNumberKey.value = value; + 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_464 = __objc_msgSend_464Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); - /// The color of the assigned label (Read-only, value type NSColor) - late final ffi.Pointer _NSURLLabelColorKey = - _lookup('NSURLLabelColorKey'); + late final _sel_registerObjectOfClass_visibility_loadHandler_1 = + _registerName1("registerObjectOfClass:visibility:loadHandler:"); + void _objc_msgSend_465( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer aClass, + int visibility, + ffi.Pointer<_ObjCBlock> loadHandler, + ) { + return __objc_msgSend_465( + obj, + sel, + aClass, + visibility, + loadHandler, + ); + } - NSURLResourceKey get NSURLLabelColorKey => _NSURLLabelColorKey.value; + late final __objc_msgSend_465Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_465 = __objc_msgSend_465Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); - set NSURLLabelColorKey(NSURLResourceKey value) => - _NSURLLabelColorKey.value = value; + late final _sel_canLoadObjectOfClass_1 = + _registerName1("canLoadObjectOfClass:"); + late final _sel_loadObjectOfClass_completionHandler_1 = + _registerName1("loadObjectOfClass:completionHandler:"); + ffi.Pointer _objc_msgSend_466( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer aClass, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_466( + obj, + sel, + aClass, + completionHandler, + ); + } - /// The user-visible label text (Read-only, value type NSString) - late final ffi.Pointer _NSURLLocalizedLabelKey = - _lookup('NSURLLocalizedLabelKey'); + 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_466 = __objc_msgSend_466Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - NSURLResourceKey get NSURLLocalizedLabelKey => _NSURLLocalizedLabelKey.value; + late final _sel_initWithItem_typeIdentifier_1 = + _registerName1("initWithItem:typeIdentifier:"); + instancetype _objc_msgSend_467( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer item, + ffi.Pointer typeIdentifier, + ) { + return __objc_msgSend_467( + obj, + sel, + item, + typeIdentifier, + ); + } - set NSURLLocalizedLabelKey(NSURLResourceKey value) => - _NSURLLocalizedLabelKey.value = value; + late final __objc_msgSend_467Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + 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)>(); - /// The icon normally displayed for the resource (Read-only, value type NSImage) - late final ffi.Pointer _NSURLEffectiveIconKey = - _lookup('NSURLEffectiveIconKey'); + late final _sel_registerItemForTypeIdentifier_loadHandler_1 = + _registerName1("registerItemForTypeIdentifier:loadHandler:"); + void _objc_msgSend_468( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer typeIdentifier, + NSItemProviderLoadHandler loadHandler, + ) { + return __objc_msgSend_468( + obj, + sel, + typeIdentifier, + loadHandler, + ); + } - NSURLResourceKey get NSURLEffectiveIconKey => _NSURLEffectiveIconKey.value; + late final __objc_msgSend_468Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSItemProviderLoadHandler)>>('objc_msgSend'); + late final __objc_msgSend_468 = __objc_msgSend_468Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSItemProviderLoadHandler)>(); - set NSURLEffectiveIconKey(NSURLResourceKey value) => - _NSURLEffectiveIconKey.value = value; + late final _sel_loadItemForTypeIdentifier_options_completionHandler_1 = + _registerName1("loadItemForTypeIdentifier:options:completionHandler:"); + void _objc_msgSend_469( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer typeIdentifier, + ffi.Pointer options, + NSItemProviderCompletionHandler completionHandler, + ) { + return __objc_msgSend_469( + obj, + sel, + typeIdentifier, + options, + completionHandler, + ); + } - /// 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_469Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSItemProviderCompletionHandler)>>('objc_msgSend'); + late final __objc_msgSend_469 = __objc_msgSend_469Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSItemProviderCompletionHandler)>(); - NSURLResourceKey get NSURLCustomIconKey => _NSURLCustomIconKey.value; + late final _sel_previewImageHandler1 = _registerName1("previewImageHandler"); + NSItemProviderLoadHandler _objc_msgSend_470( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_470( + obj, + sel, + ); + } - set NSURLCustomIconKey(NSURLResourceKey value) => - _NSURLCustomIconKey.value = value; + late final __objc_msgSend_470Ptr = _lookup< + ffi.NativeFunction< + NSItemProviderLoadHandler Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_470 = __objc_msgSend_470Ptr.asFunction< + NSItemProviderLoadHandler Function( + ffi.Pointer, ffi.Pointer)>(); - /// 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_setPreviewImageHandler_1 = + _registerName1("setPreviewImageHandler:"); + void _objc_msgSend_471( + ffi.Pointer obj, + ffi.Pointer sel, + NSItemProviderLoadHandler value, + ) { + return __objc_msgSend_471( + obj, + sel, + value, + ); + } - NSURLResourceKey get NSURLFileResourceIdentifierKey => - _NSURLFileResourceIdentifierKey.value; + late final __objc_msgSend_471Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSItemProviderLoadHandler)>>('objc_msgSend'); + late final __objc_msgSend_471 = __objc_msgSend_471Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + NSItemProviderLoadHandler)>(); - set NSURLFileResourceIdentifierKey(NSURLResourceKey value) => - _NSURLFileResourceIdentifierKey.value = value; + late final _sel_loadPreviewImageWithOptions_completionHandler_1 = + _registerName1("loadPreviewImageWithOptions:completionHandler:"); + void _objc_msgSend_472( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer options, + NSItemProviderCompletionHandler completionHandler, + ) { + return __objc_msgSend_472( + obj, + sel, + options, + completionHandler, + ); + } - /// 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_472Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSItemProviderCompletionHandler)>>('objc_msgSend'); + late final __objc_msgSend_472 = __objc_msgSend_472Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSItemProviderCompletionHandler)>(); - NSURLResourceKey get NSURLVolumeIdentifierKey => - _NSURLVolumeIdentifierKey.value; + late final ffi.Pointer> + _NSItemProviderPreferredImageSizeKey = + _lookup>('NSItemProviderPreferredImageSizeKey'); - set NSURLVolumeIdentifierKey(NSURLResourceKey value) => - _NSURLVolumeIdentifierKey.value = value; + ffi.Pointer get NSItemProviderPreferredImageSizeKey => + _NSItemProviderPreferredImageSizeKey.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 NSItemProviderPreferredImageSizeKey(ffi.Pointer value) => + _NSItemProviderPreferredImageSizeKey.value = value; - NSURLResourceKey get NSURLPreferredIOBlockSizeKey => - _NSURLPreferredIOBlockSizeKey.value; + late final ffi.Pointer> + _NSExtensionJavaScriptPreprocessingResultsKey = + _lookup>( + 'NSExtensionJavaScriptPreprocessingResultsKey'); - set NSURLPreferredIOBlockSizeKey(NSURLResourceKey value) => - _NSURLPreferredIOBlockSizeKey.value = value; + ffi.Pointer get NSExtensionJavaScriptPreprocessingResultsKey => + _NSExtensionJavaScriptPreprocessingResultsKey.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 NSExtensionJavaScriptPreprocessingResultsKey( + ffi.Pointer value) => + _NSExtensionJavaScriptPreprocessingResultsKey.value = value; - NSURLResourceKey get NSURLIsReadableKey => _NSURLIsReadableKey.value; + late final ffi.Pointer> + _NSExtensionJavaScriptFinalizeArgumentKey = + _lookup>( + 'NSExtensionJavaScriptFinalizeArgumentKey'); - set NSURLIsReadableKey(NSURLResourceKey value) => - _NSURLIsReadableKey.value = value; + ffi.Pointer get NSExtensionJavaScriptFinalizeArgumentKey => + _NSExtensionJavaScriptFinalizeArgumentKey.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 NSExtensionJavaScriptFinalizeArgumentKey(ffi.Pointer value) => + _NSExtensionJavaScriptFinalizeArgumentKey.value = value; - NSURLResourceKey get NSURLIsWritableKey => _NSURLIsWritableKey.value; + late final ffi.Pointer> _NSItemProviderErrorDomain = + _lookup>('NSItemProviderErrorDomain'); - set NSURLIsWritableKey(NSURLResourceKey value) => - _NSURLIsWritableKey.value = value; + ffi.Pointer get NSItemProviderErrorDomain => + _NSItemProviderErrorDomain.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 NSItemProviderErrorDomain(ffi.Pointer value) => + _NSItemProviderErrorDomain.value = value; - NSURLResourceKey get NSURLIsExecutableKey => _NSURLIsExecutableKey.value; + late final ffi.Pointer _NSStringTransformLatinToKatakana = + _lookup('NSStringTransformLatinToKatakana'); - set NSURLIsExecutableKey(NSURLResourceKey value) => - _NSURLIsExecutableKey.value = value; + NSStringTransform get NSStringTransformLatinToKatakana => + _NSStringTransformLatinToKatakana.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 NSStringTransformLatinToKatakana(NSStringTransform value) => + _NSStringTransformLatinToKatakana.value = value; - NSURLResourceKey get NSURLFileSecurityKey => _NSURLFileSecurityKey.value; + late final ffi.Pointer _NSStringTransformLatinToHiragana = + _lookup('NSStringTransformLatinToHiragana'); - set NSURLFileSecurityKey(NSURLResourceKey value) => - _NSURLFileSecurityKey.value = value; + NSStringTransform get NSStringTransformLatinToHiragana => + _NSStringTransformLatinToHiragana.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 NSStringTransformLatinToHiragana(NSStringTransform value) => + _NSStringTransformLatinToHiragana.value = value; - NSURLResourceKey get NSURLIsExcludedFromBackupKey => - _NSURLIsExcludedFromBackupKey.value; + late final ffi.Pointer _NSStringTransformLatinToHangul = + _lookup('NSStringTransformLatinToHangul'); - set NSURLIsExcludedFromBackupKey(NSURLResourceKey value) => - _NSURLIsExcludedFromBackupKey.value = value; + NSStringTransform get NSStringTransformLatinToHangul => + _NSStringTransformLatinToHangul.value; - /// The array of Tag names (Read-write, value type NSArray of NSString) - late final ffi.Pointer _NSURLTagNamesKey = - _lookup('NSURLTagNamesKey'); + set NSStringTransformLatinToHangul(NSStringTransform value) => + _NSStringTransformLatinToHangul.value = value; - NSURLResourceKey get NSURLTagNamesKey => _NSURLTagNamesKey.value; + late final ffi.Pointer _NSStringTransformLatinToArabic = + _lookup('NSStringTransformLatinToArabic'); - set NSURLTagNamesKey(NSURLResourceKey value) => - _NSURLTagNamesKey.value = value; + NSStringTransform get NSStringTransformLatinToArabic => + _NSStringTransformLatinToArabic.value; - /// the URL's path as a file system path (Read-only, value type NSString) - late final ffi.Pointer _NSURLPathKey = - _lookup('NSURLPathKey'); + set NSStringTransformLatinToArabic(NSStringTransform value) => + _NSStringTransformLatinToArabic.value = value; - NSURLResourceKey get NSURLPathKey => _NSURLPathKey.value; + late final ffi.Pointer _NSStringTransformLatinToHebrew = + _lookup('NSStringTransformLatinToHebrew'); - set NSURLPathKey(NSURLResourceKey value) => _NSURLPathKey.value = value; + NSStringTransform get NSStringTransformLatinToHebrew => + _NSStringTransformLatinToHebrew.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 NSStringTransformLatinToHebrew(NSStringTransform value) => + _NSStringTransformLatinToHebrew.value = value; - NSURLResourceKey get NSURLCanonicalPathKey => _NSURLCanonicalPathKey.value; + late final ffi.Pointer _NSStringTransformLatinToThai = + _lookup('NSStringTransformLatinToThai'); - set NSURLCanonicalPathKey(NSURLResourceKey value) => - _NSURLCanonicalPathKey.value = value; + NSStringTransform get NSStringTransformLatinToThai => + _NSStringTransformLatinToThai.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 NSStringTransformLatinToThai(NSStringTransform value) => + _NSStringTransformLatinToThai.value = value; - NSURLResourceKey get NSURLIsMountTriggerKey => _NSURLIsMountTriggerKey.value; + late final ffi.Pointer _NSStringTransformLatinToCyrillic = + _lookup('NSStringTransformLatinToCyrillic'); - set NSURLIsMountTriggerKey(NSURLResourceKey value) => - _NSURLIsMountTriggerKey.value = value; + NSStringTransform get NSStringTransformLatinToCyrillic => + _NSStringTransformLatinToCyrillic.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 NSStringTransformLatinToCyrillic(NSStringTransform value) => + _NSStringTransformLatinToCyrillic.value = value; - NSURLResourceKey get NSURLGenerationIdentifierKey => - _NSURLGenerationIdentifierKey.value; + late final ffi.Pointer _NSStringTransformLatinToGreek = + _lookup('NSStringTransformLatinToGreek'); - set NSURLGenerationIdentifierKey(NSURLResourceKey value) => - _NSURLGenerationIdentifierKey.value = value; + NSStringTransform get NSStringTransformLatinToGreek => + _NSStringTransformLatinToGreek.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 NSStringTransformLatinToGreek(NSStringTransform value) => + _NSStringTransformLatinToGreek.value = value; - NSURLResourceKey get NSURLDocumentIdentifierKey => - _NSURLDocumentIdentifierKey.value; + late final ffi.Pointer _NSStringTransformToLatin = + _lookup('NSStringTransformToLatin'); - set NSURLDocumentIdentifierKey(NSURLResourceKey value) => - _NSURLDocumentIdentifierKey.value = value; + NSStringTransform get NSStringTransformToLatin => + _NSStringTransformToLatin.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 NSStringTransformToLatin(NSStringTransform value) => + _NSStringTransformToLatin.value = value; - NSURLResourceKey get NSURLAddedToDirectoryDateKey => - _NSURLAddedToDirectoryDateKey.value; + late final ffi.Pointer _NSStringTransformMandarinToLatin = + _lookup('NSStringTransformMandarinToLatin'); - set NSURLAddedToDirectoryDateKey(NSURLResourceKey value) => - _NSURLAddedToDirectoryDateKey.value = value; + NSStringTransform get NSStringTransformMandarinToLatin => + _NSStringTransformMandarinToLatin.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 NSStringTransformMandarinToLatin(NSStringTransform value) => + _NSStringTransformMandarinToLatin.value = value; - NSURLResourceKey get NSURLQuarantinePropertiesKey => - _NSURLQuarantinePropertiesKey.value; + late final ffi.Pointer + _NSStringTransformHiraganaToKatakana = + _lookup('NSStringTransformHiraganaToKatakana'); - set NSURLQuarantinePropertiesKey(NSURLResourceKey value) => - _NSURLQuarantinePropertiesKey.value = value; + NSStringTransform get NSStringTransformHiraganaToKatakana => + _NSStringTransformHiraganaToKatakana.value; - /// Returns the file system object type. (Read-only, value type NSString) - late final ffi.Pointer _NSURLFileResourceTypeKey = - _lookup('NSURLFileResourceTypeKey'); + set NSStringTransformHiraganaToKatakana(NSStringTransform value) => + _NSStringTransformHiraganaToKatakana.value = value; - NSURLResourceKey get NSURLFileResourceTypeKey => - _NSURLFileResourceTypeKey.value; + late final ffi.Pointer + _NSStringTransformFullwidthToHalfwidth = + _lookup('NSStringTransformFullwidthToHalfwidth'); - set NSURLFileResourceTypeKey(NSURLResourceKey value) => - _NSURLFileResourceTypeKey.value = value; + NSStringTransform get NSStringTransformFullwidthToHalfwidth => + _NSStringTransformFullwidthToHalfwidth.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 NSStringTransformFullwidthToHalfwidth(NSStringTransform value) => + _NSStringTransformFullwidthToHalfwidth.value = value; - NSURLResourceKey get NSURLFileContentIdentifierKey => - _NSURLFileContentIdentifierKey.value; + late final ffi.Pointer _NSStringTransformToXMLHex = + _lookup('NSStringTransformToXMLHex'); - set NSURLFileContentIdentifierKey(NSURLResourceKey value) => - _NSURLFileContentIdentifierKey.value = value; + NSStringTransform get NSStringTransformToXMLHex => + _NSStringTransformToXMLHex.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 NSStringTransformToXMLHex(NSStringTransform value) => + _NSStringTransformToXMLHex.value = value; - NSURLResourceKey get NSURLMayShareFileContentKey => - _NSURLMayShareFileContentKey.value; + late final ffi.Pointer _NSStringTransformToUnicodeName = + _lookup('NSStringTransformToUnicodeName'); - set NSURLMayShareFileContentKey(NSURLResourceKey value) => - _NSURLMayShareFileContentKey.value = value; + NSStringTransform get NSStringTransformToUnicodeName => + _NSStringTransformToUnicodeName.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 NSStringTransformToUnicodeName(NSStringTransform value) => + _NSStringTransformToUnicodeName.value = value; - NSURLResourceKey get NSURLMayHaveExtendedAttributesKey => - _NSURLMayHaveExtendedAttributesKey.value; + late final ffi.Pointer + _NSStringTransformStripCombiningMarks = + _lookup('NSStringTransformStripCombiningMarks'); - set NSURLMayHaveExtendedAttributesKey(NSURLResourceKey value) => - _NSURLMayHaveExtendedAttributesKey.value = value; + NSStringTransform get NSStringTransformStripCombiningMarks => + _NSStringTransformStripCombiningMarks.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 NSStringTransformStripCombiningMarks(NSStringTransform value) => + _NSStringTransformStripCombiningMarks.value = value; - NSURLResourceKey get NSURLIsPurgeableKey => _NSURLIsPurgeableKey.value; + late final ffi.Pointer _NSStringTransformStripDiacritics = + _lookup('NSStringTransformStripDiacritics'); - set NSURLIsPurgeableKey(NSURLResourceKey value) => - _NSURLIsPurgeableKey.value = value; + NSStringTransform get NSStringTransformStripDiacritics => + _NSStringTransformStripDiacritics.value; - /// True if the file has sparse regions. (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLIsSparseKey = - _lookup('NSURLIsSparseKey'); + set NSStringTransformStripDiacritics(NSStringTransform value) => + _NSStringTransformStripDiacritics.value = value; - NSURLResourceKey get NSURLIsSparseKey => _NSURLIsSparseKey.value; + late final ffi.Pointer + _NSStringEncodingDetectionSuggestedEncodingsKey = + _lookup( + 'NSStringEncodingDetectionSuggestedEncodingsKey'); - set NSURLIsSparseKey(NSURLResourceKey value) => - _NSURLIsSparseKey.value = value; + NSStringEncodingDetectionOptionsKey + get NSStringEncodingDetectionSuggestedEncodingsKey => + _NSStringEncodingDetectionSuggestedEncodingsKey.value; - /// The file system object type values returned for the NSURLFileResourceTypeKey - late final ffi.Pointer - _NSURLFileResourceTypeNamedPipe = - _lookup('NSURLFileResourceTypeNamedPipe'); + set NSStringEncodingDetectionSuggestedEncodingsKey( + NSStringEncodingDetectionOptionsKey value) => + _NSStringEncodingDetectionSuggestedEncodingsKey.value = value; - NSURLFileResourceType get NSURLFileResourceTypeNamedPipe => - _NSURLFileResourceTypeNamedPipe.value; + late final ffi.Pointer + _NSStringEncodingDetectionDisallowedEncodingsKey = + _lookup( + 'NSStringEncodingDetectionDisallowedEncodingsKey'); - set NSURLFileResourceTypeNamedPipe(NSURLFileResourceType value) => - _NSURLFileResourceTypeNamedPipe.value = value; + NSStringEncodingDetectionOptionsKey + get NSStringEncodingDetectionDisallowedEncodingsKey => + _NSStringEncodingDetectionDisallowedEncodingsKey.value; - late final ffi.Pointer - _NSURLFileResourceTypeCharacterSpecial = - _lookup('NSURLFileResourceTypeCharacterSpecial'); + set NSStringEncodingDetectionDisallowedEncodingsKey( + NSStringEncodingDetectionOptionsKey value) => + _NSStringEncodingDetectionDisallowedEncodingsKey.value = value; - NSURLFileResourceType get NSURLFileResourceTypeCharacterSpecial => - _NSURLFileResourceTypeCharacterSpecial.value; + late final ffi.Pointer + _NSStringEncodingDetectionUseOnlySuggestedEncodingsKey = + _lookup( + 'NSStringEncodingDetectionUseOnlySuggestedEncodingsKey'); - set NSURLFileResourceTypeCharacterSpecial(NSURLFileResourceType value) => - _NSURLFileResourceTypeCharacterSpecial.value = value; + NSStringEncodingDetectionOptionsKey + get NSStringEncodingDetectionUseOnlySuggestedEncodingsKey => + _NSStringEncodingDetectionUseOnlySuggestedEncodingsKey.value; - late final ffi.Pointer - _NSURLFileResourceTypeDirectory = - _lookup('NSURLFileResourceTypeDirectory'); + set NSStringEncodingDetectionUseOnlySuggestedEncodingsKey( + NSStringEncodingDetectionOptionsKey value) => + _NSStringEncodingDetectionUseOnlySuggestedEncodingsKey.value = value; - NSURLFileResourceType get NSURLFileResourceTypeDirectory => - _NSURLFileResourceTypeDirectory.value; + late final ffi.Pointer + _NSStringEncodingDetectionAllowLossyKey = + _lookup( + 'NSStringEncodingDetectionAllowLossyKey'); - set NSURLFileResourceTypeDirectory(NSURLFileResourceType value) => - _NSURLFileResourceTypeDirectory.value = value; + NSStringEncodingDetectionOptionsKey + get NSStringEncodingDetectionAllowLossyKey => + _NSStringEncodingDetectionAllowLossyKey.value; - late final ffi.Pointer - _NSURLFileResourceTypeBlockSpecial = - _lookup('NSURLFileResourceTypeBlockSpecial'); + set NSStringEncodingDetectionAllowLossyKey( + NSStringEncodingDetectionOptionsKey value) => + _NSStringEncodingDetectionAllowLossyKey.value = value; - NSURLFileResourceType get NSURLFileResourceTypeBlockSpecial => - _NSURLFileResourceTypeBlockSpecial.value; + late final ffi.Pointer + _NSStringEncodingDetectionFromWindowsKey = + _lookup( + 'NSStringEncodingDetectionFromWindowsKey'); - set NSURLFileResourceTypeBlockSpecial(NSURLFileResourceType value) => - _NSURLFileResourceTypeBlockSpecial.value = value; + NSStringEncodingDetectionOptionsKey + get NSStringEncodingDetectionFromWindowsKey => + _NSStringEncodingDetectionFromWindowsKey.value; - late final ffi.Pointer _NSURLFileResourceTypeRegular = - _lookup('NSURLFileResourceTypeRegular'); + set NSStringEncodingDetectionFromWindowsKey( + NSStringEncodingDetectionOptionsKey value) => + _NSStringEncodingDetectionFromWindowsKey.value = value; - NSURLFileResourceType get NSURLFileResourceTypeRegular => - _NSURLFileResourceTypeRegular.value; + late final ffi.Pointer + _NSStringEncodingDetectionLossySubstitutionKey = + _lookup( + 'NSStringEncodingDetectionLossySubstitutionKey'); - set NSURLFileResourceTypeRegular(NSURLFileResourceType value) => - _NSURLFileResourceTypeRegular.value = value; + NSStringEncodingDetectionOptionsKey + get NSStringEncodingDetectionLossySubstitutionKey => + _NSStringEncodingDetectionLossySubstitutionKey.value; - late final ffi.Pointer - _NSURLFileResourceTypeSymbolicLink = - _lookup('NSURLFileResourceTypeSymbolicLink'); + set NSStringEncodingDetectionLossySubstitutionKey( + NSStringEncodingDetectionOptionsKey value) => + _NSStringEncodingDetectionLossySubstitutionKey.value = value; - NSURLFileResourceType get NSURLFileResourceTypeSymbolicLink => - _NSURLFileResourceTypeSymbolicLink.value; + late final ffi.Pointer + _NSStringEncodingDetectionLikelyLanguageKey = + _lookup( + 'NSStringEncodingDetectionLikelyLanguageKey'); - set NSURLFileResourceTypeSymbolicLink(NSURLFileResourceType value) => - _NSURLFileResourceTypeSymbolicLink.value = value; + NSStringEncodingDetectionOptionsKey + get NSStringEncodingDetectionLikelyLanguageKey => + _NSStringEncodingDetectionLikelyLanguageKey.value; - late final ffi.Pointer _NSURLFileResourceTypeSocket = - _lookup('NSURLFileResourceTypeSocket'); + set NSStringEncodingDetectionLikelyLanguageKey( + NSStringEncodingDetectionOptionsKey value) => + _NSStringEncodingDetectionLikelyLanguageKey.value = value; - NSURLFileResourceType get NSURLFileResourceTypeSocket => - _NSURLFileResourceTypeSocket.value; - - set NSURLFileResourceTypeSocket(NSURLFileResourceType value) => - _NSURLFileResourceTypeSocket.value = value; + late final _class_NSMutableString1 = _getClass1("NSMutableString"); + late final _sel_replaceCharactersInRange_withString_1 = + _registerName1("replaceCharactersInRange:withString:"); + void _objc_msgSend_473( + ffi.Pointer obj, + ffi.Pointer sel, + NSRange range, + ffi.Pointer aString, + ) { + return __objc_msgSend_473( + obj, + sel, + range, + aString, + ); + } - late final ffi.Pointer _NSURLFileResourceTypeUnknown = - _lookup('NSURLFileResourceTypeUnknown'); + late final __objc_msgSend_473Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSRange, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_473 = __objc_msgSend_473Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, NSRange, + ffi.Pointer)>(); - NSURLFileResourceType get NSURLFileResourceTypeUnknown => - _NSURLFileResourceTypeUnknown.value; + late final _sel_insertString_atIndex_1 = + _registerName1("insertString:atIndex:"); + void _objc_msgSend_474( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer aString, + int loc, + ) { + return __objc_msgSend_474( + obj, + sel, + aString, + loc, + ); + } - set NSURLFileResourceTypeUnknown(NSURLFileResourceType value) => - _NSURLFileResourceTypeUnknown.value = value; + late final __objc_msgSend_474Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_474 = __objc_msgSend_474Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); - /// dictionary of NSImage/UIImage objects keyed by size - late final ffi.Pointer _NSURLThumbnailDictionaryKey = - _lookup('NSURLThumbnailDictionaryKey'); + 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_475( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer target, + ffi.Pointer replacement, + int options, + NSRange searchRange, + ) { + return __objc_msgSend_475( + obj, + sel, + target, + replacement, + options, + searchRange, + ); + } - NSURLResourceKey get NSURLThumbnailDictionaryKey => - _NSURLThumbnailDictionaryKey.value; + late final __objc_msgSend_475Ptr = _lookup< + ffi.NativeFunction< + NSUInteger Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + NSRange)>>('objc_msgSend'); + late final __objc_msgSend_475 = __objc_msgSend_475Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer, int, NSRange)>(); - set NSURLThumbnailDictionaryKey(NSURLResourceKey value) => - _NSURLThumbnailDictionaryKey.value = value; + late final _sel_applyTransform_reverse_range_updatedRange_1 = + _registerName1("applyTransform:reverse:range:updatedRange:"); + bool _objc_msgSend_476( + ffi.Pointer obj, + ffi.Pointer sel, + NSStringTransform transform, + bool reverse, + NSRange range, + NSRangePointer resultingRange, + ) { + return __objc_msgSend_476( + obj, + sel, + transform, + reverse, + range, + resultingRange, + ); + } - /// returns all thumbnails as a single NSImage - late final ffi.Pointer _NSURLThumbnailKey = - _lookup('NSURLThumbnailKey'); + late final __objc_msgSend_476Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + NSStringTransform, + ffi.Bool, + NSRange, + NSRangePointer)>>('objc_msgSend'); + late final __objc_msgSend_476 = __objc_msgSend_476Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + NSStringTransform, bool, NSRange, NSRangePointer)>(); - NSURLResourceKey get NSURLThumbnailKey => _NSURLThumbnailKey.value; + ffi.Pointer _objc_msgSend_477( + ffi.Pointer obj, + ffi.Pointer sel, + int capacity, + ) { + return __objc_msgSend_477( + obj, + sel, + capacity, + ); + } - set NSURLThumbnailKey(NSURLResourceKey value) => - _NSURLThumbnailKey.value = value; + late final __objc_msgSend_477Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_477 = __objc_msgSend_477Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - /// size key for a 1024 x 1024 thumbnail image - late final ffi.Pointer - _NSThumbnail1024x1024SizeKey = - _lookup('NSThumbnail1024x1024SizeKey'); + late final _sel_stringWithCapacity_1 = _registerName1("stringWithCapacity:"); + late final ffi.Pointer _NSCharacterConversionException = + _lookup('NSCharacterConversionException'); - NSURLThumbnailDictionaryItem get NSThumbnail1024x1024SizeKey => - _NSThumbnail1024x1024SizeKey.value; + NSExceptionName get NSCharacterConversionException => + _NSCharacterConversionException.value; - set NSThumbnail1024x1024SizeKey(NSURLThumbnailDictionaryItem value) => - _NSThumbnail1024x1024SizeKey.value = value; + set NSCharacterConversionException(NSExceptionName value) => + _NSCharacterConversionException.value = value; - /// Total file size in bytes (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLFileSizeKey = - _lookup('NSURLFileSizeKey'); + late final ffi.Pointer _NSParseErrorException = + _lookup('NSParseErrorException'); - NSURLResourceKey get NSURLFileSizeKey => _NSURLFileSizeKey.value; + NSExceptionName get NSParseErrorException => _NSParseErrorException.value; - set NSURLFileSizeKey(NSURLResourceKey value) => - _NSURLFileSizeKey.value = value; + set NSParseErrorException(NSExceptionName value) => + _NSParseErrorException.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 _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_478( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer otherSet, + ) { + return __objc_msgSend_478( + obj, + sel, + otherSet, + ); + } - NSURLResourceKey get NSURLFileAllocatedSizeKey => - _NSURLFileAllocatedSizeKey.value; + late final __objc_msgSend_478Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(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)>(); - set NSURLFileAllocatedSizeKey(NSURLResourceKey value) => - _NSURLFileAllocatedSizeKey.value = value; + late final _sel_formIntersectionWithCharacterSet_1 = + _registerName1("formIntersectionWithCharacterSet:"); + late final _sel_invert1 = _registerName1("invert"); + ffi.Pointer _objc_msgSend_479( + ffi.Pointer obj, + ffi.Pointer sel, + NSRange aRange, + ) { + return __objc_msgSend_479( + obj, + sel, + aRange, + ); + } - /// 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 __objc_msgSend_479Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_479 = __objc_msgSend_479Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, NSRange)>(); - NSURLResourceKey get NSURLTotalFileSizeKey => _NSURLTotalFileSizeKey.value; + ffi.Pointer _objc_msgSend_480( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer aString, + ) { + return __objc_msgSend_480( + obj, + sel, + aString, + ); + } - set NSURLTotalFileSizeKey(NSURLResourceKey value) => - _NSURLTotalFileSizeKey.value = value; + 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)>(); - /// 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'); + ffi.Pointer _objc_msgSend_481( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer data, + ) { + return __objc_msgSend_481( + obj, + sel, + data, + ); + } - NSURLResourceKey get NSURLTotalFileAllocatedSizeKey => - _NSURLTotalFileAllocatedSizeKey.value; + late final __objc_msgSend_481Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(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)>(); - set NSURLTotalFileAllocatedSizeKey(NSURLResourceKey value) => - _NSURLTotalFileAllocatedSizeKey.value = value; + late final ffi.Pointer> _NSHTTPPropertyStatusCodeKey = + _lookup>('NSHTTPPropertyStatusCodeKey'); - /// 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 get NSHTTPPropertyStatusCodeKey => + _NSHTTPPropertyStatusCodeKey.value; - NSURLResourceKey get NSURLIsAliasFileKey => _NSURLIsAliasFileKey.value; + set NSHTTPPropertyStatusCodeKey(ffi.Pointer value) => + _NSHTTPPropertyStatusCodeKey.value = value; - set NSURLIsAliasFileKey(NSURLResourceKey value) => - _NSURLIsAliasFileKey.value = value; + late final ffi.Pointer> + _NSHTTPPropertyStatusReasonKey = + _lookup>('NSHTTPPropertyStatusReasonKey'); - /// The protection level for this file - late final ffi.Pointer _NSURLFileProtectionKey = - _lookup('NSURLFileProtectionKey'); + ffi.Pointer get NSHTTPPropertyStatusReasonKey => + _NSHTTPPropertyStatusReasonKey.value; - NSURLResourceKey get NSURLFileProtectionKey => _NSURLFileProtectionKey.value; + set NSHTTPPropertyStatusReasonKey(ffi.Pointer value) => + _NSHTTPPropertyStatusReasonKey.value = value; - set NSURLFileProtectionKey(NSURLResourceKey value) => - _NSURLFileProtectionKey.value = value; + late final ffi.Pointer> + _NSHTTPPropertyServerHTTPVersionKey = + _lookup>('NSHTTPPropertyServerHTTPVersionKey'); - /// 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 NSHTTPPropertyServerHTTPVersionKey => + _NSHTTPPropertyServerHTTPVersionKey.value; - NSURLFileProtectionType get NSURLFileProtectionNone => - _NSURLFileProtectionNone.value; + set NSHTTPPropertyServerHTTPVersionKey(ffi.Pointer value) => + _NSHTTPPropertyServerHTTPVersionKey.value = value; - set NSURLFileProtectionNone(NSURLFileProtectionType value) => - _NSURLFileProtectionNone.value = value; + late final ffi.Pointer> + _NSHTTPPropertyRedirectionHeadersKey = + _lookup>('NSHTTPPropertyRedirectionHeadersKey'); - /// 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 NSHTTPPropertyRedirectionHeadersKey => + _NSHTTPPropertyRedirectionHeadersKey.value; - NSURLFileProtectionType get NSURLFileProtectionComplete => - _NSURLFileProtectionComplete.value; + set NSHTTPPropertyRedirectionHeadersKey(ffi.Pointer value) => + _NSHTTPPropertyRedirectionHeadersKey.value = value; - set NSURLFileProtectionComplete(NSURLFileProtectionType value) => - _NSURLFileProtectionComplete.value = value; + late final ffi.Pointer> + _NSHTTPPropertyErrorPageDataKey = + _lookup>('NSHTTPPropertyErrorPageDataKey'); - /// 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 NSHTTPPropertyErrorPageDataKey => + _NSHTTPPropertyErrorPageDataKey.value; - NSURLFileProtectionType get NSURLFileProtectionCompleteUnlessOpen => - _NSURLFileProtectionCompleteUnlessOpen.value; + set NSHTTPPropertyErrorPageDataKey(ffi.Pointer value) => + _NSHTTPPropertyErrorPageDataKey.value = value; - set NSURLFileProtectionCompleteUnlessOpen(NSURLFileProtectionType value) => - _NSURLFileProtectionCompleteUnlessOpen.value = value; + late final ffi.Pointer> _NSHTTPPropertyHTTPProxy = + _lookup>('NSHTTPPropertyHTTPProxy'); - /// 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 NSHTTPPropertyHTTPProxy => + _NSHTTPPropertyHTTPProxy.value; - NSURLFileProtectionType - get NSURLFileProtectionCompleteUntilFirstUserAuthentication => - _NSURLFileProtectionCompleteUntilFirstUserAuthentication.value; + set NSHTTPPropertyHTTPProxy(ffi.Pointer value) => + _NSHTTPPropertyHTTPProxy.value = value; - set NSURLFileProtectionCompleteUntilFirstUserAuthentication( - NSURLFileProtectionType value) => - _NSURLFileProtectionCompleteUntilFirstUserAuthentication.value = value; + late final ffi.Pointer> _NSFTPPropertyUserLoginKey = + _lookup>('NSFTPPropertyUserLoginKey'); - /// The user-visible volume format (Read-only, value type NSString) - late final ffi.Pointer - _NSURLVolumeLocalizedFormatDescriptionKey = - _lookup('NSURLVolumeLocalizedFormatDescriptionKey'); + ffi.Pointer get NSFTPPropertyUserLoginKey => + _NSFTPPropertyUserLoginKey.value; - NSURLResourceKey get NSURLVolumeLocalizedFormatDescriptionKey => - _NSURLVolumeLocalizedFormatDescriptionKey.value; + set NSFTPPropertyUserLoginKey(ffi.Pointer value) => + _NSFTPPropertyUserLoginKey.value = value; - set NSURLVolumeLocalizedFormatDescriptionKey(NSURLResourceKey value) => - _NSURLVolumeLocalizedFormatDescriptionKey.value = value; + late final ffi.Pointer> + _NSFTPPropertyUserPasswordKey = + _lookup>('NSFTPPropertyUserPasswordKey'); - /// Total volume capacity in bytes (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLVolumeTotalCapacityKey = - _lookup('NSURLVolumeTotalCapacityKey'); + ffi.Pointer get NSFTPPropertyUserPasswordKey => + _NSFTPPropertyUserPasswordKey.value; - NSURLResourceKey get NSURLVolumeTotalCapacityKey => - _NSURLVolumeTotalCapacityKey.value; + set NSFTPPropertyUserPasswordKey(ffi.Pointer value) => + _NSFTPPropertyUserPasswordKey.value = value; - set NSURLVolumeTotalCapacityKey(NSURLResourceKey value) => - _NSURLVolumeTotalCapacityKey.value = value; + late final ffi.Pointer> + _NSFTPPropertyActiveTransferModeKey = + _lookup>('NSFTPPropertyActiveTransferModeKey'); - /// Total free space in bytes (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLVolumeAvailableCapacityKey = - _lookup('NSURLVolumeAvailableCapacityKey'); + ffi.Pointer get NSFTPPropertyActiveTransferModeKey => + _NSFTPPropertyActiveTransferModeKey.value; - NSURLResourceKey get NSURLVolumeAvailableCapacityKey => - _NSURLVolumeAvailableCapacityKey.value; + set NSFTPPropertyActiveTransferModeKey(ffi.Pointer value) => + _NSFTPPropertyActiveTransferModeKey.value = value; - set NSURLVolumeAvailableCapacityKey(NSURLResourceKey value) => - _NSURLVolumeAvailableCapacityKey.value = value; + late final ffi.Pointer> _NSFTPPropertyFileOffsetKey = + _lookup>('NSFTPPropertyFileOffsetKey'); - /// Total number of resources on the volume (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLVolumeResourceCountKey = - _lookup('NSURLVolumeResourceCountKey'); + ffi.Pointer get NSFTPPropertyFileOffsetKey => + _NSFTPPropertyFileOffsetKey.value; - NSURLResourceKey get NSURLVolumeResourceCountKey => - _NSURLVolumeResourceCountKey.value; + set NSFTPPropertyFileOffsetKey(ffi.Pointer value) => + _NSFTPPropertyFileOffsetKey.value = value; - set NSURLVolumeResourceCountKey(NSURLResourceKey value) => - _NSURLVolumeResourceCountKey.value = value; + late final ffi.Pointer> _NSFTPPropertyFTPProxy = + _lookup>('NSFTPPropertyFTPProxy'); - /// 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 NSFTPPropertyFTPProxy => + _NSFTPPropertyFTPProxy.value; - NSURLResourceKey get NSURLVolumeSupportsPersistentIDsKey => - _NSURLVolumeSupportsPersistentIDsKey.value; + set NSFTPPropertyFTPProxy(ffi.Pointer value) => + _NSFTPPropertyFTPProxy.value = value; - set NSURLVolumeSupportsPersistentIDsKey(NSURLResourceKey value) => - _NSURLVolumeSupportsPersistentIDsKey.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 symbolic links (Read-only, value type boolean NSNumber) - late final ffi.Pointer - _NSURLVolumeSupportsSymbolicLinksKey = - _lookup('NSURLVolumeSupportsSymbolicLinksKey'); + ffi.Pointer get NSURLFileScheme => _NSURLFileScheme.value; - NSURLResourceKey get NSURLVolumeSupportsSymbolicLinksKey => - _NSURLVolumeSupportsSymbolicLinksKey.value; + set NSURLFileScheme(ffi.Pointer value) => + _NSURLFileScheme.value = value; - set NSURLVolumeSupportsSymbolicLinksKey(NSURLResourceKey value) => - _NSURLVolumeSupportsSymbolicLinksKey.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 hard links (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeSupportsHardLinksKey = - _lookup('NSURLVolumeSupportsHardLinksKey'); + NSURLResourceKey get NSURLKeysOfUnsetValuesKey => + _NSURLKeysOfUnsetValuesKey.value; - NSURLResourceKey get NSURLVolumeSupportsHardLinksKey => - _NSURLVolumeSupportsHardLinksKey.value; + set NSURLKeysOfUnsetValuesKey(NSURLResourceKey value) => + _NSURLKeysOfUnsetValuesKey.value = value; - set NSURLVolumeSupportsHardLinksKey(NSURLResourceKey value) => - _NSURLVolumeSupportsHardLinksKey.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 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 NSURLNameKey => _NSURLNameKey.value; - NSURLResourceKey get NSURLVolumeSupportsJournalingKey => - _NSURLVolumeSupportsJournalingKey.value; + set NSURLNameKey(NSURLResourceKey value) => _NSURLNameKey.value = value; - set NSURLVolumeSupportsJournalingKey(NSURLResourceKey value) => - _NSURLVolumeSupportsJournalingKey.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 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 NSURLLocalizedNameKey => _NSURLLocalizedNameKey.value; - NSURLResourceKey get NSURLVolumeIsJournalingKey => - _NSURLVolumeIsJournalingKey.value; + set NSURLLocalizedNameKey(NSURLResourceKey value) => + _NSURLLocalizedNameKey.value = value; - set NSURLVolumeIsJournalingKey(NSURLResourceKey value) => - _NSURLVolumeIsJournalingKey.value = value; + /// True for regular files (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsRegularFileKey = + _lookup('NSURLIsRegularFileKey'); - /// 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 NSURLIsRegularFileKey => _NSURLIsRegularFileKey.value; - NSURLResourceKey get NSURLVolumeSupportsSparseFilesKey => - _NSURLVolumeSupportsSparseFilesKey.value; + set NSURLIsRegularFileKey(NSURLResourceKey value) => + _NSURLIsRegularFileKey.value = value; - set NSURLVolumeSupportsSparseFilesKey(NSURLResourceKey value) => - _NSURLVolumeSupportsSparseFilesKey.value = value; + /// True for directories (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsDirectoryKey = + _lookup('NSURLIsDirectoryKey'); - /// 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 NSURLIsDirectoryKey => _NSURLIsDirectoryKey.value; - NSURLResourceKey get NSURLVolumeSupportsZeroRunsKey => - _NSURLVolumeSupportsZeroRunsKey.value; + set NSURLIsDirectoryKey(NSURLResourceKey value) => + _NSURLIsDirectoryKey.value = 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'); + /// True for symlinks (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsSymbolicLinkKey = + _lookup('NSURLIsSymbolicLinkKey'); - NSURLResourceKey get NSURLVolumeSupportsCaseSensitiveNamesKey => - _NSURLVolumeSupportsCaseSensitiveNamesKey.value; + NSURLResourceKey get NSURLIsSymbolicLinkKey => _NSURLIsSymbolicLinkKey.value; - set NSURLVolumeSupportsCaseSensitiveNamesKey(NSURLResourceKey value) => - _NSURLVolumeSupportsCaseSensitiveNamesKey.value = value; + set NSURLIsSymbolicLinkKey(NSURLResourceKey value) => + _NSURLIsSymbolicLinkKey.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'); + /// True for the root directory of a volume (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsVolumeKey = + _lookup('NSURLIsVolumeKey'); - NSURLResourceKey get NSURLVolumeSupportsCasePreservedNamesKey => - _NSURLVolumeSupportsCasePreservedNamesKey.value; + NSURLResourceKey get NSURLIsVolumeKey => _NSURLIsVolumeKey.value; - set NSURLVolumeSupportsCasePreservedNamesKey(NSURLResourceKey value) => - _NSURLVolumeSupportsCasePreservedNamesKey.value = value; + set NSURLIsVolumeKey(NSURLResourceKey value) => + _NSURLIsVolumeKey.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'); + /// 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 NSURLVolumeSupportsRootDirectoryDatesKey => - _NSURLVolumeSupportsRootDirectoryDatesKey.value; + NSURLResourceKey get NSURLIsPackageKey => _NSURLIsPackageKey.value; - set NSURLVolumeSupportsRootDirectoryDatesKey(NSURLResourceKey value) => - _NSURLVolumeSupportsRootDirectoryDatesKey.value = value; + set NSURLIsPackageKey(NSURLResourceKey value) => + _NSURLIsPackageKey.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'); + /// True if resource is an application (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsApplicationKey = + _lookup('NSURLIsApplicationKey'); - NSURLResourceKey get NSURLVolumeSupportsVolumeSizesKey => - _NSURLVolumeSupportsVolumeSizesKey.value; + NSURLResourceKey get NSURLIsApplicationKey => _NSURLIsApplicationKey.value; - set NSURLVolumeSupportsVolumeSizesKey(NSURLResourceKey value) => - _NSURLVolumeSupportsVolumeSizesKey.value = value; + set NSURLIsApplicationKey(NSURLResourceKey value) => + _NSURLIsApplicationKey.value = value; - /// true if the volume can be renamed. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeSupportsRenamingKey = - _lookup('NSURLVolumeSupportsRenamingKey'); + /// 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 NSURLVolumeSupportsRenamingKey => - _NSURLVolumeSupportsRenamingKey.value; + NSURLResourceKey get NSURLApplicationIsScriptableKey => + _NSURLApplicationIsScriptableKey.value; - set NSURLVolumeSupportsRenamingKey(NSURLResourceKey value) => - _NSURLVolumeSupportsRenamingKey.value = value; + set NSURLApplicationIsScriptableKey(NSURLResourceKey value) => + _NSURLApplicationIsScriptableKey.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'); + /// True for system-immutable resources (Read-write, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsSystemImmutableKey = + _lookup('NSURLIsSystemImmutableKey'); - NSURLResourceKey get NSURLVolumeSupportsAdvisoryFileLockingKey => - _NSURLVolumeSupportsAdvisoryFileLockingKey.value; + NSURLResourceKey get NSURLIsSystemImmutableKey => + _NSURLIsSystemImmutableKey.value; - set NSURLVolumeSupportsAdvisoryFileLockingKey(NSURLResourceKey value) => - _NSURLVolumeSupportsAdvisoryFileLockingKey.value = value; + set NSURLIsSystemImmutableKey(NSURLResourceKey value) => + _NSURLIsSystemImmutableKey.value = value; - /// true if the volume implements extended security (ACLs). (Read-only, value type boolean NSNumber) - late final ffi.Pointer - _NSURLVolumeSupportsExtendedSecurityKey = - _lookup('NSURLVolumeSupportsExtendedSecurityKey'); + /// True for user-immutable resources (Read-write, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsUserImmutableKey = + _lookup('NSURLIsUserImmutableKey'); - NSURLResourceKey get NSURLVolumeSupportsExtendedSecurityKey => - _NSURLVolumeSupportsExtendedSecurityKey.value; + NSURLResourceKey get NSURLIsUserImmutableKey => + _NSURLIsUserImmutableKey.value; - set NSURLVolumeSupportsExtendedSecurityKey(NSURLResourceKey value) => - _NSURLVolumeSupportsExtendedSecurityKey.value = value; + set NSURLIsUserImmutableKey(NSURLResourceKey value) => + _NSURLIsUserImmutableKey.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'); + /// 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 NSURLVolumeIsBrowsableKey => - _NSURLVolumeIsBrowsableKey.value; + NSURLResourceKey get NSURLIsHiddenKey => _NSURLIsHiddenKey.value; - set NSURLVolumeIsBrowsableKey(NSURLResourceKey value) => - _NSURLVolumeIsBrowsableKey.value = value; + set NSURLIsHiddenKey(NSURLResourceKey value) => + _NSURLIsHiddenKey.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'); + /// 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 NSURLVolumeMaximumFileSizeKey => - _NSURLVolumeMaximumFileSizeKey.value; + NSURLResourceKey get NSURLHasHiddenExtensionKey => + _NSURLHasHiddenExtensionKey.value; - set NSURLVolumeMaximumFileSizeKey(NSURLResourceKey value) => - _NSURLVolumeMaximumFileSizeKey.value = value; + set NSURLHasHiddenExtensionKey(NSURLResourceKey value) => + _NSURLHasHiddenExtensionKey.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'); + /// The date the resource was created (Read-write, value type NSDate) + late final ffi.Pointer _NSURLCreationDateKey = + _lookup('NSURLCreationDateKey'); - NSURLResourceKey get NSURLVolumeIsEjectableKey => - _NSURLVolumeIsEjectableKey.value; + NSURLResourceKey get NSURLCreationDateKey => _NSURLCreationDateKey.value; - set NSURLVolumeIsEjectableKey(NSURLResourceKey value) => - _NSURLVolumeIsEjectableKey.value = value; + set NSURLCreationDateKey(NSURLResourceKey value) => + _NSURLCreationDateKey.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'); + /// The date the resource was last accessed (Read-write, value type NSDate) + late final ffi.Pointer _NSURLContentAccessDateKey = + _lookup('NSURLContentAccessDateKey'); - NSURLResourceKey get NSURLVolumeIsRemovableKey => - _NSURLVolumeIsRemovableKey.value; + NSURLResourceKey get NSURLContentAccessDateKey => + _NSURLContentAccessDateKey.value; - set NSURLVolumeIsRemovableKey(NSURLResourceKey value) => - _NSURLVolumeIsRemovableKey.value = value; + set NSURLContentAccessDateKey(NSURLResourceKey value) => + _NSURLContentAccessDateKey.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'); + /// The time the resource content was last modified (Read-write, value type NSDate) + late final ffi.Pointer _NSURLContentModificationDateKey = + _lookup('NSURLContentModificationDateKey'); - NSURLResourceKey get NSURLVolumeIsInternalKey => - _NSURLVolumeIsInternalKey.value; + NSURLResourceKey get NSURLContentModificationDateKey => + _NSURLContentModificationDateKey.value; - set NSURLVolumeIsInternalKey(NSURLResourceKey value) => - _NSURLVolumeIsInternalKey.value = value; + set NSURLContentModificationDateKey(NSURLResourceKey value) => + _NSURLContentModificationDateKey.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'); + /// The time the resource's attributes were last modified (Read-only, value type NSDate) + late final ffi.Pointer _NSURLAttributeModificationDateKey = + _lookup('NSURLAttributeModificationDateKey'); - NSURLResourceKey get NSURLVolumeIsAutomountedKey => - _NSURLVolumeIsAutomountedKey.value; + NSURLResourceKey get NSURLAttributeModificationDateKey => + _NSURLAttributeModificationDateKey.value; - set NSURLVolumeIsAutomountedKey(NSURLResourceKey value) => - _NSURLVolumeIsAutomountedKey.value = value; + set NSURLAttributeModificationDateKey(NSURLResourceKey value) => + _NSURLAttributeModificationDateKey.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'); + /// Number of hard links to the resource (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLLinkCountKey = + _lookup('NSURLLinkCountKey'); - NSURLResourceKey get NSURLVolumeIsLocalKey => _NSURLVolumeIsLocalKey.value; + NSURLResourceKey get NSURLLinkCountKey => _NSURLLinkCountKey.value; - set NSURLVolumeIsLocalKey(NSURLResourceKey value) => - _NSURLVolumeIsLocalKey.value = value; + set NSURLLinkCountKey(NSURLResourceKey value) => + _NSURLLinkCountKey.value = value; - /// true if the volume is read-only. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeIsReadOnlyKey = - _lookup('NSURLVolumeIsReadOnlyKey'); + /// The resource's parent directory, if any (Read-only, value type NSURL) + late final ffi.Pointer _NSURLParentDirectoryURLKey = + _lookup('NSURLParentDirectoryURLKey'); - NSURLResourceKey get NSURLVolumeIsReadOnlyKey => - _NSURLVolumeIsReadOnlyKey.value; + NSURLResourceKey get NSURLParentDirectoryURLKey => + _NSURLParentDirectoryURLKey.value; - set NSURLVolumeIsReadOnlyKey(NSURLResourceKey value) => - _NSURLVolumeIsReadOnlyKey.value = value; + set NSURLParentDirectoryURLKey(NSURLResourceKey value) => + _NSURLParentDirectoryURLKey.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'); + /// URL of the volume on which the resource is stored (Read-only, value type NSURL) + late final ffi.Pointer _NSURLVolumeURLKey = + _lookup('NSURLVolumeURLKey'); - NSURLResourceKey get NSURLVolumeCreationDateKey => - _NSURLVolumeCreationDateKey.value; + NSURLResourceKey get NSURLVolumeURLKey => _NSURLVolumeURLKey.value; - set NSURLVolumeCreationDateKey(NSURLResourceKey value) => - _NSURLVolumeCreationDateKey.value = value; + set NSURLVolumeURLKey(NSURLResourceKey value) => + _NSURLVolumeURLKey.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'); + /// Uniform type identifier (UTI) for the resource (Read-only, value type NSString) + late final ffi.Pointer _NSURLTypeIdentifierKey = + _lookup('NSURLTypeIdentifierKey'); - NSURLResourceKey get NSURLVolumeURLForRemountingKey => - _NSURLVolumeURLForRemountingKey.value; + NSURLResourceKey get NSURLTypeIdentifierKey => _NSURLTypeIdentifierKey.value; - set NSURLVolumeURLForRemountingKey(NSURLResourceKey value) => - _NSURLVolumeURLForRemountingKey.value = value; + set NSURLTypeIdentifierKey(NSURLResourceKey value) => + _NSURLTypeIdentifierKey.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'); + /// File type (UTType) for the resource (Read-only, value type UTType) + late final ffi.Pointer _NSURLContentTypeKey = + _lookup('NSURLContentTypeKey'); - NSURLResourceKey get NSURLVolumeUUIDStringKey => - _NSURLVolumeUUIDStringKey.value; + NSURLResourceKey get NSURLContentTypeKey => _NSURLContentTypeKey.value; - set NSURLVolumeUUIDStringKey(NSURLResourceKey value) => - _NSURLVolumeUUIDStringKey.value = value; + set NSURLContentTypeKey(NSURLResourceKey value) => + _NSURLContentTypeKey.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'); + /// User-visible type or "kind" description (Read-only, value type NSString) + late final ffi.Pointer _NSURLLocalizedTypeDescriptionKey = + _lookup('NSURLLocalizedTypeDescriptionKey'); - NSURLResourceKey get NSURLVolumeNameKey => _NSURLVolumeNameKey.value; + NSURLResourceKey get NSURLLocalizedTypeDescriptionKey => + _NSURLLocalizedTypeDescriptionKey.value; - set NSURLVolumeNameKey(NSURLResourceKey value) => - _NSURLVolumeNameKey.value = value; + set NSURLLocalizedTypeDescriptionKey(NSURLResourceKey value) => + _NSURLLocalizedTypeDescriptionKey.value = value; - /// The user-presentable name of the volume (Read-only, value type NSString) - late final ffi.Pointer _NSURLVolumeLocalizedNameKey = - _lookup('NSURLVolumeLocalizedNameKey'); + /// The label number assigned to the resource (Read-write, value type NSNumber) + late final ffi.Pointer _NSURLLabelNumberKey = + _lookup('NSURLLabelNumberKey'); - NSURLResourceKey get NSURLVolumeLocalizedNameKey => - _NSURLVolumeLocalizedNameKey.value; + NSURLResourceKey get NSURLLabelNumberKey => _NSURLLabelNumberKey.value; - set NSURLVolumeLocalizedNameKey(NSURLResourceKey value) => - _NSURLVolumeLocalizedNameKey.value = value; + set NSURLLabelNumberKey(NSURLResourceKey value) => + _NSURLLabelNumberKey.value = value; - /// true if the volume is encrypted. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeIsEncryptedKey = - _lookup('NSURLVolumeIsEncryptedKey'); + /// The color of the assigned label (Read-only, value type NSColor) + late final ffi.Pointer _NSURLLabelColorKey = + _lookup('NSURLLabelColorKey'); - NSURLResourceKey get NSURLVolumeIsEncryptedKey => - _NSURLVolumeIsEncryptedKey.value; + NSURLResourceKey get NSURLLabelColorKey => _NSURLLabelColorKey.value; - set NSURLVolumeIsEncryptedKey(NSURLResourceKey value) => - _NSURLVolumeIsEncryptedKey.value = value; + set NSURLLabelColorKey(NSURLResourceKey value) => + _NSURLLabelColorKey.value = value; - /// true if the volume is the root filesystem. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeIsRootFileSystemKey = - _lookup('NSURLVolumeIsRootFileSystemKey'); + /// The user-visible label text (Read-only, value type NSString) + late final ffi.Pointer _NSURLLocalizedLabelKey = + _lookup('NSURLLocalizedLabelKey'); - NSURLResourceKey get NSURLVolumeIsRootFileSystemKey => - _NSURLVolumeIsRootFileSystemKey.value; + NSURLResourceKey get NSURLLocalizedLabelKey => _NSURLLocalizedLabelKey.value; - set NSURLVolumeIsRootFileSystemKey(NSURLResourceKey value) => - _NSURLVolumeIsRootFileSystemKey.value = value; + set NSURLLocalizedLabelKey(NSURLResourceKey value) => + _NSURLLocalizedLabelKey.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'); + /// The icon normally displayed for the resource (Read-only, value type NSImage) + late final ffi.Pointer _NSURLEffectiveIconKey = + _lookup('NSURLEffectiveIconKey'); - NSURLResourceKey get NSURLVolumeSupportsCompressionKey => - _NSURLVolumeSupportsCompressionKey.value; + NSURLResourceKey get NSURLEffectiveIconKey => _NSURLEffectiveIconKey.value; - set NSURLVolumeSupportsCompressionKey(NSURLResourceKey value) => - _NSURLVolumeSupportsCompressionKey.value = value; + set NSURLEffectiveIconKey(NSURLResourceKey value) => + _NSURLEffectiveIconKey.value = value; - /// true if the volume supports clonefile(2) (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeSupportsFileCloningKey = - _lookup('NSURLVolumeSupportsFileCloningKey'); + /// The custom icon assigned to the resource, if any (Currently not implemented, value type NSImage) + late final ffi.Pointer _NSURLCustomIconKey = + _lookup('NSURLCustomIconKey'); - NSURLResourceKey get NSURLVolumeSupportsFileCloningKey => - _NSURLVolumeSupportsFileCloningKey.value; + NSURLResourceKey get NSURLCustomIconKey => _NSURLCustomIconKey.value; - set NSURLVolumeSupportsFileCloningKey(NSURLResourceKey value) => - _NSURLVolumeSupportsFileCloningKey.value = value; + set NSURLCustomIconKey(NSURLResourceKey value) => + _NSURLCustomIconKey.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'); + /// 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 NSURLVolumeSupportsSwapRenamingKey => - _NSURLVolumeSupportsSwapRenamingKey.value; + NSURLResourceKey get NSURLFileResourceIdentifierKey => + _NSURLFileResourceIdentifierKey.value; - set NSURLVolumeSupportsSwapRenamingKey(NSURLResourceKey value) => - _NSURLVolumeSupportsSwapRenamingKey.value = value; + set NSURLFileResourceIdentifierKey(NSURLResourceKey value) => + _NSURLFileResourceIdentifierKey.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'); + /// 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 NSURLVolumeSupportsExclusiveRenamingKey => - _NSURLVolumeSupportsExclusiveRenamingKey.value; + NSURLResourceKey get NSURLVolumeIdentifierKey => + _NSURLVolumeIdentifierKey.value; - set NSURLVolumeSupportsExclusiveRenamingKey(NSURLResourceKey value) => - _NSURLVolumeSupportsExclusiveRenamingKey.value = value; + set NSURLVolumeIdentifierKey(NSURLResourceKey value) => + _NSURLVolumeIdentifierKey.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'); + /// 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 NSURLVolumeSupportsImmutableFilesKey => - _NSURLVolumeSupportsImmutableFilesKey.value; + NSURLResourceKey get NSURLPreferredIOBlockSizeKey => + _NSURLPreferredIOBlockSizeKey.value; - set NSURLVolumeSupportsImmutableFilesKey(NSURLResourceKey value) => - _NSURLVolumeSupportsImmutableFilesKey.value = value; + set NSURLPreferredIOBlockSizeKey(NSURLResourceKey value) => + _NSURLPreferredIOBlockSizeKey.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'); + /// 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 NSURLVolumeSupportsAccessPermissionsKey => - _NSURLVolumeSupportsAccessPermissionsKey.value; + NSURLResourceKey get NSURLIsReadableKey => _NSURLIsReadableKey.value; - set NSURLVolumeSupportsAccessPermissionsKey(NSURLResourceKey value) => - _NSURLVolumeSupportsAccessPermissionsKey.value = value; + set NSURLIsReadableKey(NSURLResourceKey value) => + _NSURLIsReadableKey.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'); + /// 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 NSURLVolumeSupportsFileProtectionKey => - _NSURLVolumeSupportsFileProtectionKey.value; + NSURLResourceKey get NSURLIsWritableKey => _NSURLIsWritableKey.value; - set NSURLVolumeSupportsFileProtectionKey(NSURLResourceKey value) => - _NSURLVolumeSupportsFileProtectionKey.value = value; + set NSURLIsWritableKey(NSURLResourceKey value) => + _NSURLIsWritableKey.value = value; - /// (Read-only, value type NSNumber) - late final ffi.Pointer - _NSURLVolumeAvailableCapacityForImportantUsageKey = - _lookup( - 'NSURLVolumeAvailableCapacityForImportantUsageKey'); + /// 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 NSURLVolumeAvailableCapacityForImportantUsageKey => - _NSURLVolumeAvailableCapacityForImportantUsageKey.value; + NSURLResourceKey get NSURLIsExecutableKey => _NSURLIsExecutableKey.value; - set NSURLVolumeAvailableCapacityForImportantUsageKey( - NSURLResourceKey value) => - _NSURLVolumeAvailableCapacityForImportantUsageKey.value = value; + set NSURLIsExecutableKey(NSURLResourceKey value) => + _NSURLIsExecutableKey.value = value; - /// (Read-only, value type NSNumber) - late final ffi.Pointer - _NSURLVolumeAvailableCapacityForOpportunisticUsageKey = - _lookup( - 'NSURLVolumeAvailableCapacityForOpportunisticUsageKey'); + /// 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 NSURLVolumeAvailableCapacityForOpportunisticUsageKey => - _NSURLVolumeAvailableCapacityForOpportunisticUsageKey.value; + NSURLResourceKey get NSURLFileSecurityKey => _NSURLFileSecurityKey.value; - set NSURLVolumeAvailableCapacityForOpportunisticUsageKey( - NSURLResourceKey value) => - _NSURLVolumeAvailableCapacityForOpportunisticUsageKey.value = value; + set NSURLFileSecurityKey(NSURLResourceKey value) => + _NSURLFileSecurityKey.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'); + /// 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 NSURLIsUbiquitousItemKey => - _NSURLIsUbiquitousItemKey.value; + NSURLResourceKey get NSURLIsExcludedFromBackupKey => + _NSURLIsExcludedFromBackupKey.value; - set NSURLIsUbiquitousItemKey(NSURLResourceKey value) => - _NSURLIsUbiquitousItemKey.value = value; + set NSURLIsExcludedFromBackupKey(NSURLResourceKey value) => + _NSURLIsExcludedFromBackupKey.value = value; - /// true if this item has conflicts outstanding. (Read-only, value type boolean NSNumber) - late final ffi.Pointer - _NSURLUbiquitousItemHasUnresolvedConflictsKey = - _lookup('NSURLUbiquitousItemHasUnresolvedConflictsKey'); + /// The array of Tag names (Read-write, value type NSArray of NSString) + late final ffi.Pointer _NSURLTagNamesKey = + _lookup('NSURLTagNamesKey'); - NSURLResourceKey get NSURLUbiquitousItemHasUnresolvedConflictsKey => - _NSURLUbiquitousItemHasUnresolvedConflictsKey.value; + NSURLResourceKey get NSURLTagNamesKey => _NSURLTagNamesKey.value; - set NSURLUbiquitousItemHasUnresolvedConflictsKey(NSURLResourceKey value) => - _NSURLUbiquitousItemHasUnresolvedConflictsKey.value = value; + set NSURLTagNamesKey(NSURLResourceKey value) => + _NSURLTagNamesKey.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'); + /// the URL's path as a file system path (Read-only, value type NSString) + late final ffi.Pointer _NSURLPathKey = + _lookup('NSURLPathKey'); - NSURLResourceKey get NSURLUbiquitousItemIsDownloadedKey => - _NSURLUbiquitousItemIsDownloadedKey.value; + NSURLResourceKey get NSURLPathKey => _NSURLPathKey.value; - set NSURLUbiquitousItemIsDownloadedKey(NSURLResourceKey value) => - _NSURLUbiquitousItemIsDownloadedKey.value = value; + set NSURLPathKey(NSURLResourceKey value) => _NSURLPathKey.value = value; - /// true if data is being downloaded for this item. (Read-only, value type boolean NSNumber) - late final ffi.Pointer - _NSURLUbiquitousItemIsDownloadingKey = - _lookup('NSURLUbiquitousItemIsDownloadingKey'); + /// 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 NSURLUbiquitousItemIsDownloadingKey => - _NSURLUbiquitousItemIsDownloadingKey.value; + NSURLResourceKey get NSURLCanonicalPathKey => _NSURLCanonicalPathKey.value; - set NSURLUbiquitousItemIsDownloadingKey(NSURLResourceKey value) => - _NSURLUbiquitousItemIsDownloadingKey.value = value; + set NSURLCanonicalPathKey(NSURLResourceKey value) => + _NSURLCanonicalPathKey.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'); + /// 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 NSURLUbiquitousItemIsUploadedKey => - _NSURLUbiquitousItemIsUploadedKey.value; + NSURLResourceKey get NSURLIsMountTriggerKey => _NSURLIsMountTriggerKey.value; - set NSURLUbiquitousItemIsUploadedKey(NSURLResourceKey value) => - _NSURLUbiquitousItemIsUploadedKey.value = value; + set NSURLIsMountTriggerKey(NSURLResourceKey value) => + _NSURLIsMountTriggerKey.value = value; - /// true if data is being uploaded for this item. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLUbiquitousItemIsUploadingKey = - _lookup('NSURLUbiquitousItemIsUploadingKey'); + /// 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 NSURLUbiquitousItemIsUploadingKey => - _NSURLUbiquitousItemIsUploadingKey.value; + NSURLResourceKey get NSURLGenerationIdentifierKey => + _NSURLGenerationIdentifierKey.value; - set NSURLUbiquitousItemIsUploadingKey(NSURLResourceKey value) => - _NSURLUbiquitousItemIsUploadingKey.value = value; + set NSURLGenerationIdentifierKey(NSURLResourceKey value) => + _NSURLGenerationIdentifierKey.value = value; - /// Use NSMetadataQuery and NSMetadataUbiquitousItemPercentDownloadedKey on NSMetadataItem instead - late final ffi.Pointer - _NSURLUbiquitousItemPercentDownloadedKey = - _lookup('NSURLUbiquitousItemPercentDownloadedKey'); - - NSURLResourceKey get NSURLUbiquitousItemPercentDownloadedKey => - _NSURLUbiquitousItemPercentDownloadedKey.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 NSURLUbiquitousItemPercentDownloadedKey(NSURLResourceKey value) => - _NSURLUbiquitousItemPercentDownloadedKey.value = value; + NSURLResourceKey get NSURLDocumentIdentifierKey => + _NSURLDocumentIdentifierKey.value; - /// Use NSMetadataQuery and NSMetadataUbiquitousItemPercentUploadedKey on NSMetadataItem instead - late final ffi.Pointer - _NSURLUbiquitousItemPercentUploadedKey = - _lookup('NSURLUbiquitousItemPercentUploadedKey'); + set NSURLDocumentIdentifierKey(NSURLResourceKey value) => + _NSURLDocumentIdentifierKey.value = value; - NSURLResourceKey get NSURLUbiquitousItemPercentUploadedKey => - _NSURLUbiquitousItemPercentUploadedKey.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 NSURLUbiquitousItemPercentUploadedKey(NSURLResourceKey value) => - _NSURLUbiquitousItemPercentUploadedKey.value = value; + NSURLResourceKey get NSURLAddedToDirectoryDateKey => + _NSURLAddedToDirectoryDateKey.value; - /// returns the download status of this item. (Read-only, value type NSString). Possible values below. - late final ffi.Pointer - _NSURLUbiquitousItemDownloadingStatusKey = - _lookup('NSURLUbiquitousItemDownloadingStatusKey'); + set NSURLAddedToDirectoryDateKey(NSURLResourceKey value) => + _NSURLAddedToDirectoryDateKey.value = value; - NSURLResourceKey get NSURLUbiquitousItemDownloadingStatusKey => - _NSURLUbiquitousItemDownloadingStatusKey.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 NSURLUbiquitousItemDownloadingStatusKey(NSURLResourceKey value) => - _NSURLUbiquitousItemDownloadingStatusKey.value = value; + NSURLResourceKey get NSURLQuarantinePropertiesKey => + _NSURLQuarantinePropertiesKey.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 NSURLQuarantinePropertiesKey(NSURLResourceKey value) => + _NSURLQuarantinePropertiesKey.value = value; - NSURLResourceKey get NSURLUbiquitousItemDownloadingErrorKey => - _NSURLUbiquitousItemDownloadingErrorKey.value; + /// Returns the file system object type. (Read-only, value type NSString) + late final ffi.Pointer _NSURLFileResourceTypeKey = + _lookup('NSURLFileResourceTypeKey'); - set NSURLUbiquitousItemDownloadingErrorKey(NSURLResourceKey value) => - _NSURLUbiquitousItemDownloadingErrorKey.value = value; + NSURLResourceKey get NSURLFileResourceTypeKey => + _NSURLFileResourceTypeKey.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 NSURLFileResourceTypeKey(NSURLResourceKey value) => + _NSURLFileResourceTypeKey.value = value; - NSURLResourceKey get NSURLUbiquitousItemUploadingErrorKey => - _NSURLUbiquitousItemUploadingErrorKey.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 NSURLUbiquitousItemUploadingErrorKey(NSURLResourceKey value) => - _NSURLUbiquitousItemUploadingErrorKey.value = value; + NSURLResourceKey get NSURLFileIdentifierKey => _NSURLFileIdentifierKey.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 NSURLFileIdentifierKey(NSURLResourceKey value) => + _NSURLFileIdentifierKey.value = value; - NSURLResourceKey get NSURLUbiquitousItemDownloadRequestedKey => - _NSURLUbiquitousItemDownloadRequestedKey.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 NSURLUbiquitousItemDownloadRequestedKey(NSURLResourceKey value) => - _NSURLUbiquitousItemDownloadRequestedKey.value = value; + NSURLResourceKey get NSURLFileContentIdentifierKey => + _NSURLFileContentIdentifierKey.value; - /// returns the name of this item's container as displayed to users. - late final ffi.Pointer - _NSURLUbiquitousItemContainerDisplayNameKey = - _lookup('NSURLUbiquitousItemContainerDisplayNameKey'); + set NSURLFileContentIdentifierKey(NSURLResourceKey value) => + _NSURLFileContentIdentifierKey.value = value; - NSURLResourceKey get NSURLUbiquitousItemContainerDisplayNameKey => - _NSURLUbiquitousItemContainerDisplayNameKey.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 NSURLUbiquitousItemContainerDisplayNameKey(NSURLResourceKey value) => - _NSURLUbiquitousItemContainerDisplayNameKey.value = value; + NSURLResourceKey get NSURLMayShareFileContentKey => + _NSURLMayShareFileContentKey.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 NSURLMayShareFileContentKey(NSURLResourceKey value) => + _NSURLMayShareFileContentKey.value = value; - NSURLResourceKey get NSURLUbiquitousItemIsExcludedFromSyncKey => - _NSURLUbiquitousItemIsExcludedFromSyncKey.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 NSURLUbiquitousItemIsExcludedFromSyncKey(NSURLResourceKey value) => - _NSURLUbiquitousItemIsExcludedFromSyncKey.value = value; + NSURLResourceKey get NSURLMayHaveExtendedAttributesKey => + _NSURLMayHaveExtendedAttributesKey.value; - /// true if the ubiquitous item is shared. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLUbiquitousItemIsSharedKey = - _lookup('NSURLUbiquitousItemIsSharedKey'); + set NSURLMayHaveExtendedAttributesKey(NSURLResourceKey value) => + _NSURLMayHaveExtendedAttributesKey.value = value; - NSURLResourceKey get NSURLUbiquitousItemIsSharedKey => - _NSURLUbiquitousItemIsSharedKey.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 NSURLUbiquitousItemIsSharedKey(NSURLResourceKey value) => - _NSURLUbiquitousItemIsSharedKey.value = value; + NSURLResourceKey get NSURLIsPurgeableKey => _NSURLIsPurgeableKey.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 NSURLIsPurgeableKey(NSURLResourceKey value) => + _NSURLIsPurgeableKey.value = value; - NSURLResourceKey get NSURLUbiquitousSharedItemCurrentUserRoleKey => - _NSURLUbiquitousSharedItemCurrentUserRoleKey.value; + /// True if the file has sparse regions. (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLIsSparseKey = + _lookup('NSURLIsSparseKey'); - set NSURLUbiquitousSharedItemCurrentUserRoleKey(NSURLResourceKey value) => - _NSURLUbiquitousSharedItemCurrentUserRoleKey.value = value; + NSURLResourceKey get NSURLIsSparseKey => _NSURLIsSparseKey.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 NSURLIsSparseKey(NSURLResourceKey value) => + _NSURLIsSparseKey.value = value; - NSURLResourceKey get NSURLUbiquitousSharedItemCurrentUserPermissionsKey => - _NSURLUbiquitousSharedItemCurrentUserPermissionsKey.value; + /// The file system object type values returned for the NSURLFileResourceTypeKey + late final ffi.Pointer + _NSURLFileResourceTypeNamedPipe = + _lookup('NSURLFileResourceTypeNamedPipe'); - set NSURLUbiquitousSharedItemCurrentUserPermissionsKey( - NSURLResourceKey value) => - _NSURLUbiquitousSharedItemCurrentUserPermissionsKey.value = value; + NSURLFileResourceType get NSURLFileResourceTypeNamedPipe => + _NSURLFileResourceTypeNamedPipe.value; - /// returns a NSPersonNameComponents, or nil if the current user. (Read-only, value type NSPersonNameComponents) - late final ffi.Pointer - _NSURLUbiquitousSharedItemOwnerNameComponentsKey = - _lookup( - 'NSURLUbiquitousSharedItemOwnerNameComponentsKey'); + set NSURLFileResourceTypeNamedPipe(NSURLFileResourceType value) => + _NSURLFileResourceTypeNamedPipe.value = value; - NSURLResourceKey get NSURLUbiquitousSharedItemOwnerNameComponentsKey => - _NSURLUbiquitousSharedItemOwnerNameComponentsKey.value; + late final ffi.Pointer + _NSURLFileResourceTypeCharacterSpecial = + _lookup('NSURLFileResourceTypeCharacterSpecial'); - set NSURLUbiquitousSharedItemOwnerNameComponentsKey(NSURLResourceKey value) => - _NSURLUbiquitousSharedItemOwnerNameComponentsKey.value = value; + NSURLFileResourceType get NSURLFileResourceTypeCharacterSpecial => + _NSURLFileResourceTypeCharacterSpecial.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 NSURLFileResourceTypeCharacterSpecial(NSURLFileResourceType value) => + _NSURLFileResourceTypeCharacterSpecial.value = value; - NSURLResourceKey - get NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey => - _NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey.value; + late final ffi.Pointer + _NSURLFileResourceTypeDirectory = + _lookup('NSURLFileResourceTypeDirectory'); - set NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey( - NSURLResourceKey value) => - _NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey.value = value; + NSURLFileResourceType get NSURLFileResourceTypeDirectory => + _NSURLFileResourceTypeDirectory.value; - /// this item has not been downloaded yet. Use startDownloadingUbiquitousItemAtURL:error: to download it. - late final ffi.Pointer - _NSURLUbiquitousItemDownloadingStatusNotDownloaded = - _lookup( - 'NSURLUbiquitousItemDownloadingStatusNotDownloaded'); + set NSURLFileResourceTypeDirectory(NSURLFileResourceType value) => + _NSURLFileResourceTypeDirectory.value = value; - NSURLUbiquitousItemDownloadingStatus - get NSURLUbiquitousItemDownloadingStatusNotDownloaded => - _NSURLUbiquitousItemDownloadingStatusNotDownloaded.value; + late final ffi.Pointer + _NSURLFileResourceTypeBlockSpecial = + _lookup('NSURLFileResourceTypeBlockSpecial'); - set NSURLUbiquitousItemDownloadingStatusNotDownloaded( - NSURLUbiquitousItemDownloadingStatus value) => - _NSURLUbiquitousItemDownloadingStatusNotDownloaded.value = value; + NSURLFileResourceType get NSURLFileResourceTypeBlockSpecial => + _NSURLFileResourceTypeBlockSpecial.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 NSURLFileResourceTypeBlockSpecial(NSURLFileResourceType value) => + _NSURLFileResourceTypeBlockSpecial.value = value; - NSURLUbiquitousItemDownloadingStatus - get NSURLUbiquitousItemDownloadingStatusDownloaded => - _NSURLUbiquitousItemDownloadingStatusDownloaded.value; + late final ffi.Pointer _NSURLFileResourceTypeRegular = + _lookup('NSURLFileResourceTypeRegular'); - set NSURLUbiquitousItemDownloadingStatusDownloaded( - NSURLUbiquitousItemDownloadingStatus value) => - _NSURLUbiquitousItemDownloadingStatusDownloaded.value = value; + NSURLFileResourceType get NSURLFileResourceTypeRegular => + _NSURLFileResourceTypeRegular.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 NSURLFileResourceTypeRegular(NSURLFileResourceType value) => + _NSURLFileResourceTypeRegular.value = value; - NSURLUbiquitousItemDownloadingStatus - get NSURLUbiquitousItemDownloadingStatusCurrent => - _NSURLUbiquitousItemDownloadingStatusCurrent.value; + late final ffi.Pointer + _NSURLFileResourceTypeSymbolicLink = + _lookup('NSURLFileResourceTypeSymbolicLink'); - set NSURLUbiquitousItemDownloadingStatusCurrent( - NSURLUbiquitousItemDownloadingStatus value) => - _NSURLUbiquitousItemDownloadingStatusCurrent.value = value; + NSURLFileResourceType get NSURLFileResourceTypeSymbolicLink => + _NSURLFileResourceTypeSymbolicLink.value; - /// the current user is the owner of this shared item. - late final ffi.Pointer - _NSURLUbiquitousSharedItemRoleOwner = - _lookup( - 'NSURLUbiquitousSharedItemRoleOwner'); + set NSURLFileResourceTypeSymbolicLink(NSURLFileResourceType value) => + _NSURLFileResourceTypeSymbolicLink.value = value; - NSURLUbiquitousSharedItemRole get NSURLUbiquitousSharedItemRoleOwner => - _NSURLUbiquitousSharedItemRoleOwner.value; + late final ffi.Pointer _NSURLFileResourceTypeSocket = + _lookup('NSURLFileResourceTypeSocket'); - set NSURLUbiquitousSharedItemRoleOwner(NSURLUbiquitousSharedItemRole value) => - _NSURLUbiquitousSharedItemRoleOwner.value = value; + NSURLFileResourceType get NSURLFileResourceTypeSocket => + _NSURLFileResourceTypeSocket.value; - /// the current user is a participant of this shared item. - late final ffi.Pointer - _NSURLUbiquitousSharedItemRoleParticipant = - _lookup( - 'NSURLUbiquitousSharedItemRoleParticipant'); + set NSURLFileResourceTypeSocket(NSURLFileResourceType value) => + _NSURLFileResourceTypeSocket.value = value; - NSURLUbiquitousSharedItemRole get NSURLUbiquitousSharedItemRoleParticipant => - _NSURLUbiquitousSharedItemRoleParticipant.value; + late final ffi.Pointer _NSURLFileResourceTypeUnknown = + _lookup('NSURLFileResourceTypeUnknown'); - set NSURLUbiquitousSharedItemRoleParticipant( - NSURLUbiquitousSharedItemRole value) => - _NSURLUbiquitousSharedItemRoleParticipant.value = value; + NSURLFileResourceType get NSURLFileResourceTypeUnknown => + _NSURLFileResourceTypeUnknown.value; - /// the current user is only allowed to read this item - late final ffi.Pointer - _NSURLUbiquitousSharedItemPermissionsReadOnly = - _lookup( - 'NSURLUbiquitousSharedItemPermissionsReadOnly'); + set NSURLFileResourceTypeUnknown(NSURLFileResourceType value) => + _NSURLFileResourceTypeUnknown.value = value; - NSURLUbiquitousSharedItemPermissions - get NSURLUbiquitousSharedItemPermissionsReadOnly => - _NSURLUbiquitousSharedItemPermissionsReadOnly.value; + /// dictionary of NSImage/UIImage objects keyed by size + late final ffi.Pointer _NSURLThumbnailDictionaryKey = + _lookup('NSURLThumbnailDictionaryKey'); - set NSURLUbiquitousSharedItemPermissionsReadOnly( - NSURLUbiquitousSharedItemPermissions value) => - _NSURLUbiquitousSharedItemPermissionsReadOnly.value = value; + NSURLResourceKey get NSURLThumbnailDictionaryKey => + _NSURLThumbnailDictionaryKey.value; - /// the current user is allowed to both read and write this item - late final ffi.Pointer - _NSURLUbiquitousSharedItemPermissionsReadWrite = - _lookup( - 'NSURLUbiquitousSharedItemPermissionsReadWrite'); + set NSURLThumbnailDictionaryKey(NSURLResourceKey value) => + _NSURLThumbnailDictionaryKey.value = value; - NSURLUbiquitousSharedItemPermissions - get NSURLUbiquitousSharedItemPermissionsReadWrite => - _NSURLUbiquitousSharedItemPermissionsReadWrite.value; + /// returns all thumbnails as a single NSImage + late final ffi.Pointer _NSURLThumbnailKey = + _lookup('NSURLThumbnailKey'); - set NSURLUbiquitousSharedItemPermissionsReadWrite( - NSURLUbiquitousSharedItemPermissions value) => - _NSURLUbiquitousSharedItemPermissionsReadWrite.value = value; + NSURLResourceKey get NSURLThumbnailKey => _NSURLThumbnailKey.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 NSURLThumbnailKey(NSURLResourceKey value) => + _NSURLThumbnailKey.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)>(); + /// size key for a 1024 x 1024 thumbnail image + late final ffi.Pointer + _NSThumbnail1024x1024SizeKey = + _lookup('NSThumbnail1024x1024SizeKey'); - 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, - ); - } + NSURLThumbnailDictionaryItem get NSThumbnail1024x1024SizeKey => + _NSThumbnail1024x1024SizeKey.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 NSThumbnail1024x1024SizeKey(NSURLThumbnailDictionaryItem value) => + _NSThumbnail1024x1024SizeKey.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, - ); - } + /// Total file size in bytes (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLFileSizeKey = + _lookup('NSURLFileSizeKey'); - 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 NSURLFileSizeKey => _NSURLFileSizeKey.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 NSURLFileSizeKey(NSURLResourceKey value) => + _NSURLFileSizeKey.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)>(); + /// 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 _NSGenericException = - _lookup('NSGenericException'); + NSURLResourceKey get NSURLFileAllocatedSizeKey => + _NSURLFileAllocatedSizeKey.value; - NSExceptionName get NSGenericException => _NSGenericException.value; + set NSURLFileAllocatedSizeKey(NSURLResourceKey value) => + _NSURLFileAllocatedSizeKey.value = value; - set NSGenericException(NSExceptionName value) => - _NSGenericException.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 ffi.Pointer _NSRangeException = - _lookup('NSRangeException'); + NSURLResourceKey get NSURLTotalFileSizeKey => _NSURLTotalFileSizeKey.value; - NSExceptionName get NSRangeException => _NSRangeException.value; + set NSURLTotalFileSizeKey(NSURLResourceKey value) => + _NSURLTotalFileSizeKey.value = value; - set NSRangeException(NSExceptionName value) => - _NSRangeException.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'); - late final ffi.Pointer _NSInvalidArgumentException = - _lookup('NSInvalidArgumentException'); + NSURLResourceKey get NSURLTotalFileAllocatedSizeKey => + _NSURLTotalFileAllocatedSizeKey.value; - NSExceptionName get NSInvalidArgumentException => - _NSInvalidArgumentException.value; + set NSURLTotalFileAllocatedSizeKey(NSURLResourceKey value) => + _NSURLTotalFileAllocatedSizeKey.value = value; - set NSInvalidArgumentException(NSExceptionName value) => - _NSInvalidArgumentException.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'); - late final ffi.Pointer _NSInternalInconsistencyException = - _lookup('NSInternalInconsistencyException'); + NSURLResourceKey get NSURLIsAliasFileKey => _NSURLIsAliasFileKey.value; - NSExceptionName get NSInternalInconsistencyException => - _NSInternalInconsistencyException.value; + set NSURLIsAliasFileKey(NSURLResourceKey value) => + _NSURLIsAliasFileKey.value = value; - set NSInternalInconsistencyException(NSExceptionName value) => - _NSInternalInconsistencyException.value = value; + /// The protection level for this file + late final ffi.Pointer _NSURLFileProtectionKey = + _lookup('NSURLFileProtectionKey'); - late final ffi.Pointer _NSMallocException = - _lookup('NSMallocException'); + NSURLResourceKey get NSURLFileProtectionKey => _NSURLFileProtectionKey.value; - NSExceptionName get NSMallocException => _NSMallocException.value; + set NSURLFileProtectionKey(NSURLResourceKey value) => + _NSURLFileProtectionKey.value = value; - set NSMallocException(NSExceptionName value) => - _NSMallocException.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'); - late final ffi.Pointer _NSObjectInaccessibleException = - _lookup('NSObjectInaccessibleException'); + NSURLFileProtectionType get NSURLFileProtectionNone => + _NSURLFileProtectionNone.value; - NSExceptionName get NSObjectInaccessibleException => - _NSObjectInaccessibleException.value; + set NSURLFileProtectionNone(NSURLFileProtectionType value) => + _NSURLFileProtectionNone.value = value; - set NSObjectInaccessibleException(NSExceptionName value) => - _NSObjectInaccessibleException.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'); - late final ffi.Pointer _NSObjectNotAvailableException = - _lookup('NSObjectNotAvailableException'); + NSURLFileProtectionType get NSURLFileProtectionComplete => + _NSURLFileProtectionComplete.value; - NSExceptionName get NSObjectNotAvailableException => - _NSObjectNotAvailableException.value; + set NSURLFileProtectionComplete(NSURLFileProtectionType value) => + _NSURLFileProtectionComplete.value = value; - set NSObjectNotAvailableException(NSExceptionName value) => - _NSObjectNotAvailableException.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'); - late final ffi.Pointer _NSDestinationInvalidException = - _lookup('NSDestinationInvalidException'); + NSURLFileProtectionType get NSURLFileProtectionCompleteUnlessOpen => + _NSURLFileProtectionCompleteUnlessOpen.value; - NSExceptionName get NSDestinationInvalidException => - _NSDestinationInvalidException.value; + set NSURLFileProtectionCompleteUnlessOpen(NSURLFileProtectionType value) => + _NSURLFileProtectionCompleteUnlessOpen.value = value; - set NSDestinationInvalidException(NSExceptionName value) => - _NSDestinationInvalidException.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'); - late final ffi.Pointer _NSPortTimeoutException = - _lookup('NSPortTimeoutException'); + NSURLFileProtectionType + get NSURLFileProtectionCompleteUntilFirstUserAuthentication => + _NSURLFileProtectionCompleteUntilFirstUserAuthentication.value; - NSExceptionName get NSPortTimeoutException => _NSPortTimeoutException.value; + set NSURLFileProtectionCompleteUntilFirstUserAuthentication( + NSURLFileProtectionType value) => + _NSURLFileProtectionCompleteUntilFirstUserAuthentication.value = value; - set NSPortTimeoutException(NSExceptionName value) => - _NSPortTimeoutException.value = value; + /// The user-visible volume format (Read-only, value type NSString) + late final ffi.Pointer + _NSURLVolumeLocalizedFormatDescriptionKey = + _lookup('NSURLVolumeLocalizedFormatDescriptionKey'); - late final ffi.Pointer _NSInvalidSendPortException = - _lookup('NSInvalidSendPortException'); + NSURLResourceKey get NSURLVolumeLocalizedFormatDescriptionKey => + _NSURLVolumeLocalizedFormatDescriptionKey.value; - NSExceptionName get NSInvalidSendPortException => - _NSInvalidSendPortException.value; + set NSURLVolumeLocalizedFormatDescriptionKey(NSURLResourceKey value) => + _NSURLVolumeLocalizedFormatDescriptionKey.value = value; - set NSInvalidSendPortException(NSExceptionName value) => - _NSInvalidSendPortException.value = value; + /// Total volume capacity in bytes (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLVolumeTotalCapacityKey = + _lookup('NSURLVolumeTotalCapacityKey'); - late final ffi.Pointer _NSInvalidReceivePortException = - _lookup('NSInvalidReceivePortException'); + NSURLResourceKey get NSURLVolumeTotalCapacityKey => + _NSURLVolumeTotalCapacityKey.value; - NSExceptionName get NSInvalidReceivePortException => - _NSInvalidReceivePortException.value; + set NSURLVolumeTotalCapacityKey(NSURLResourceKey value) => + _NSURLVolumeTotalCapacityKey.value = value; - set NSInvalidReceivePortException(NSExceptionName value) => - _NSInvalidReceivePortException.value = value; + /// Total free space in bytes (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLVolumeAvailableCapacityKey = + _lookup('NSURLVolumeAvailableCapacityKey'); - late final ffi.Pointer _NSPortSendException = - _lookup('NSPortSendException'); + NSURLResourceKey get NSURLVolumeAvailableCapacityKey => + _NSURLVolumeAvailableCapacityKey.value; - NSExceptionName get NSPortSendException => _NSPortSendException.value; + set NSURLVolumeAvailableCapacityKey(NSURLResourceKey value) => + _NSURLVolumeAvailableCapacityKey.value = value; - set NSPortSendException(NSExceptionName value) => - _NSPortSendException.value = value; + /// Total number of resources on the volume (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLVolumeResourceCountKey = + _lookup('NSURLVolumeResourceCountKey'); - late final ffi.Pointer _NSPortReceiveException = - _lookup('NSPortReceiveException'); + NSURLResourceKey get NSURLVolumeResourceCountKey => + _NSURLVolumeResourceCountKey.value; - NSExceptionName get NSPortReceiveException => _NSPortReceiveException.value; + set NSURLVolumeResourceCountKey(NSURLResourceKey value) => + _NSURLVolumeResourceCountKey.value = value; - set NSPortReceiveException(NSExceptionName value) => - _NSPortReceiveException.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'); - late final ffi.Pointer _NSOldStyleException = - _lookup('NSOldStyleException'); + NSURLResourceKey get NSURLVolumeSupportsPersistentIDsKey => + _NSURLVolumeSupportsPersistentIDsKey.value; - NSExceptionName get NSOldStyleException => _NSOldStyleException.value; + set NSURLVolumeSupportsPersistentIDsKey(NSURLResourceKey value) => + _NSURLVolumeSupportsPersistentIDsKey.value = value; - set NSOldStyleException(NSExceptionName value) => - _NSOldStyleException.value = value; + /// true if the volume format supports symbolic links (Read-only, value type boolean NSNumber) + late final ffi.Pointer + _NSURLVolumeSupportsSymbolicLinksKey = + _lookup('NSURLVolumeSupportsSymbolicLinksKey'); - late final ffi.Pointer _NSInconsistentArchiveException = - _lookup('NSInconsistentArchiveException'); + NSURLResourceKey get NSURLVolumeSupportsSymbolicLinksKey => + _NSURLVolumeSupportsSymbolicLinksKey.value; - NSExceptionName get NSInconsistentArchiveException => - _NSInconsistentArchiveException.value; + set NSURLVolumeSupportsSymbolicLinksKey(NSURLResourceKey value) => + _NSURLVolumeSupportsSymbolicLinksKey.value = value; - set NSInconsistentArchiveException(NSExceptionName value) => - _NSInconsistentArchiveException.value = value; + /// true if the volume format supports hard links (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeSupportsHardLinksKey = + _lookup('NSURLVolumeSupportsHardLinksKey'); - 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 NSURLVolumeSupportsHardLinksKey => + _NSURLVolumeSupportsHardLinksKey.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 NSURLVolumeSupportsHardLinksKey(NSURLResourceKey value) => + _NSURLVolumeSupportsHardLinksKey.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 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_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 NSURLVolumeSupportsJournalingKey => + _NSURLVolumeSupportsJournalingKey.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 NSURLVolumeSupportsJournalingKey(NSURLResourceKey value) => + _NSURLVolumeSupportsJournalingKey.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 currently using a journal for speedy recovery after an unplanned restart. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeIsJournalingKey = + _lookup('NSURLVolumeIsJournalingKey'); - ffi.Pointer NSGetUncaughtExceptionHandler() { - return _NSGetUncaughtExceptionHandler(); - } + NSURLResourceKey get NSURLVolumeIsJournalingKey => + _NSURLVolumeIsJournalingKey.value; - late final _NSGetUncaughtExceptionHandlerPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer - Function()>>('NSGetUncaughtExceptionHandler'); - late final _NSGetUncaughtExceptionHandler = _NSGetUncaughtExceptionHandlerPtr - .asFunction Function()>(); + set NSURLVolumeIsJournalingKey(NSURLResourceKey value) => + _NSURLVolumeIsJournalingKey.value = value; - void NSSetUncaughtExceptionHandler( - ffi.Pointer arg0, - ) { - return _NSSetUncaughtExceptionHandler( - arg0, - ); - } + /// 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 _NSSetUncaughtExceptionHandlerPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer)>>( - 'NSSetUncaughtExceptionHandler'); - late final _NSSetUncaughtExceptionHandler = _NSSetUncaughtExceptionHandlerPtr - .asFunction)>(); + NSURLResourceKey get NSURLVolumeSupportsSparseFilesKey => + _NSURLVolumeSupportsSparseFilesKey.value; - late final ffi.Pointer> _NSAssertionHandlerKey = - _lookup>('NSAssertionHandlerKey'); + set NSURLVolumeSupportsSparseFilesKey(NSURLResourceKey value) => + _NSURLVolumeSupportsSparseFilesKey.value = value; - ffi.Pointer get NSAssertionHandlerKey => - _NSAssertionHandlerKey.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 NSAssertionHandlerKey(ffi.Pointer value) => - _NSAssertionHandlerKey.value = value; + NSURLResourceKey get NSURLVolumeSupportsZeroRunsKey => + _NSURLVolumeSupportsZeroRunsKey.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 NSURLVolumeSupportsZeroRunsKey(NSURLResourceKey value) => + _NSURLVolumeSupportsZeroRunsKey.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)>(); + /// 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 _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 NSURLVolumeSupportsCaseSensitiveNamesKey => + _NSURLVolumeSupportsCaseSensitiveNamesKey.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 NSURLVolumeSupportsCaseSensitiveNamesKey(NSURLResourceKey value) => + _NSURLVolumeSupportsCaseSensitiveNamesKey.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, - ); - } + /// 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 __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 NSURLVolumeSupportsCasePreservedNamesKey => + _NSURLVolumeSupportsCasePreservedNamesKey.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 NSURLVolumeSupportsCasePreservedNamesKey(NSURLResourceKey value) => + _NSURLVolumeSupportsCasePreservedNamesKey.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>)>(); + /// 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 _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 NSURLVolumeSupportsRootDirectoryDatesKey => + _NSURLVolumeSupportsRootDirectoryDatesKey.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 NSURLVolumeSupportsRootDirectoryDatesKey(NSURLResourceKey value) => + _NSURLVolumeSupportsRootDirectoryDatesKey.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 supports returning volume size values (NSURLVolumeTotalCapacityKey and NSURLVolumeAvailableCapacityKey). (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeSupportsVolumeSizesKey = + _lookup('NSURLVolumeSupportsVolumeSizesKey'); - 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 NSURLVolumeSupportsVolumeSizesKey => + _NSURLVolumeSupportsVolumeSizesKey.value; - 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)>(); + set NSURLVolumeSupportsVolumeSizesKey(NSURLResourceKey value) => + _NSURLVolumeSupportsVolumeSizesKey.value = value; - late final _sel_result1 = _registerName1("result"); - late final ffi.Pointer - _NSInvocationOperationVoidResultException = - _lookup('NSInvocationOperationVoidResultException'); + /// true if the volume can be renamed. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeSupportsRenamingKey = + _lookup('NSURLVolumeSupportsRenamingKey'); - NSExceptionName get NSInvocationOperationVoidResultException => - _NSInvocationOperationVoidResultException.value; + NSURLResourceKey get NSURLVolumeSupportsRenamingKey => + _NSURLVolumeSupportsRenamingKey.value; - set NSInvocationOperationVoidResultException(NSExceptionName value) => - _NSInvocationOperationVoidResultException.value = value; + set NSURLVolumeSupportsRenamingKey(NSURLResourceKey value) => + _NSURLVolumeSupportsRenamingKey.value = value; - late final ffi.Pointer - _NSInvocationOperationCancelledException = - _lookup('NSInvocationOperationCancelledException'); + /// 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'); - NSExceptionName get NSInvocationOperationCancelledException => - _NSInvocationOperationCancelledException.value; + NSURLResourceKey get NSURLVolumeSupportsAdvisoryFileLockingKey => + _NSURLVolumeSupportsAdvisoryFileLockingKey.value; - set NSInvocationOperationCancelledException(NSExceptionName value) => - _NSInvocationOperationCancelledException.value = value; + set NSURLVolumeSupportsAdvisoryFileLockingKey(NSURLResourceKey value) => + _NSURLVolumeSupportsAdvisoryFileLockingKey.value = value; - late final ffi.Pointer - _NSOperationQueueDefaultMaxConcurrentOperationCount = - _lookup('NSOperationQueueDefaultMaxConcurrentOperationCount'); + /// true if the volume implements extended security (ACLs). (Read-only, value type boolean NSNumber) + late final ffi.Pointer + _NSURLVolumeSupportsExtendedSecurityKey = + _lookup('NSURLVolumeSupportsExtendedSecurityKey'); - int get NSOperationQueueDefaultMaxConcurrentOperationCount => - _NSOperationQueueDefaultMaxConcurrentOperationCount.value; + NSURLResourceKey get NSURLVolumeSupportsExtendedSecurityKey => + _NSURLVolumeSupportsExtendedSecurityKey.value; - set NSOperationQueueDefaultMaxConcurrentOperationCount(int value) => - _NSOperationQueueDefaultMaxConcurrentOperationCount.value = value; + set NSURLVolumeSupportsExtendedSecurityKey(NSURLResourceKey value) => + _NSURLVolumeSupportsExtendedSecurityKey.value = value; - /// Predefined domain for errors from most AppKit and Foundation APIs. - late final ffi.Pointer _NSCocoaErrorDomain = - _lookup('NSCocoaErrorDomain'); + /// 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'); - NSErrorDomain get NSCocoaErrorDomain => _NSCocoaErrorDomain.value; + NSURLResourceKey get NSURLVolumeIsBrowsableKey => + _NSURLVolumeIsBrowsableKey.value; - set NSCocoaErrorDomain(NSErrorDomain value) => - _NSCocoaErrorDomain.value = value; + set NSURLVolumeIsBrowsableKey(NSURLResourceKey value) => + _NSURLVolumeIsBrowsableKey.value = value; - /// Other predefined domains; value of "code" will correspond to preexisting values in these domains. - late final ffi.Pointer _NSPOSIXErrorDomain = - _lookup('NSPOSIXErrorDomain'); + /// 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'); - NSErrorDomain get NSPOSIXErrorDomain => _NSPOSIXErrorDomain.value; + NSURLResourceKey get NSURLVolumeMaximumFileSizeKey => + _NSURLVolumeMaximumFileSizeKey.value; - set NSPOSIXErrorDomain(NSErrorDomain value) => - _NSPOSIXErrorDomain.value = value; + set NSURLVolumeMaximumFileSizeKey(NSURLResourceKey value) => + _NSURLVolumeMaximumFileSizeKey.value = value; - late final ffi.Pointer _NSOSStatusErrorDomain = - _lookup('NSOSStatusErrorDomain'); + /// 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'); - NSErrorDomain get NSOSStatusErrorDomain => _NSOSStatusErrorDomain.value; + NSURLResourceKey get NSURLVolumeIsEjectableKey => + _NSURLVolumeIsEjectableKey.value; - set NSOSStatusErrorDomain(NSErrorDomain value) => - _NSOSStatusErrorDomain.value = value; + set NSURLVolumeIsEjectableKey(NSURLResourceKey value) => + _NSURLVolumeIsEjectableKey.value = value; - late final ffi.Pointer _NSMachErrorDomain = - _lookup('NSMachErrorDomain'); + /// 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'); - NSErrorDomain get NSMachErrorDomain => _NSMachErrorDomain.value; + NSURLResourceKey get NSURLVolumeIsRemovableKey => + _NSURLVolumeIsRemovableKey.value; - set NSMachErrorDomain(NSErrorDomain value) => - _NSMachErrorDomain.value = value; + set NSURLVolumeIsRemovableKey(NSURLResourceKey value) => + _NSURLVolumeIsRemovableKey.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'); + /// 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'); - NSErrorUserInfoKey get NSUnderlyingErrorKey => _NSUnderlyingErrorKey.value; + NSURLResourceKey get NSURLVolumeIsInternalKey => + _NSURLVolumeIsInternalKey.value; - set NSUnderlyingErrorKey(NSErrorUserInfoKey value) => - _NSUnderlyingErrorKey.value = value; + set NSURLVolumeIsInternalKey(NSURLResourceKey value) => + _NSURLVolumeIsInternalKey.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'); + /// 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'); - NSErrorUserInfoKey get NSMultipleUnderlyingErrorsKey => - _NSMultipleUnderlyingErrorsKey.value; + NSURLResourceKey get NSURLVolumeIsAutomountedKey => + _NSURLVolumeIsAutomountedKey.value; - set NSMultipleUnderlyingErrorsKey(NSErrorUserInfoKey value) => - _NSMultipleUnderlyingErrorsKey.value = value; + set NSURLVolumeIsAutomountedKey(NSURLResourceKey value) => + _NSURLVolumeIsAutomountedKey.value = value; - /// NSString, a complete sentence (or more) describing ideally both what failed and why it failed. - late final ffi.Pointer _NSLocalizedDescriptionKey = - _lookup('NSLocalizedDescriptionKey'); + /// true if the volume is stored on a local device. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeIsLocalKey = + _lookup('NSURLVolumeIsLocalKey'); - NSErrorUserInfoKey get NSLocalizedDescriptionKey => - _NSLocalizedDescriptionKey.value; + NSURLResourceKey get NSURLVolumeIsLocalKey => _NSURLVolumeIsLocalKey.value; - set NSLocalizedDescriptionKey(NSErrorUserInfoKey value) => - _NSLocalizedDescriptionKey.value = value; + set NSURLVolumeIsLocalKey(NSURLResourceKey value) => + _NSURLVolumeIsLocalKey.value = value; - /// NSString, a complete sentence (or more) describing why the operation failed. - late final ffi.Pointer _NSLocalizedFailureReasonErrorKey = - _lookup('NSLocalizedFailureReasonErrorKey'); + /// true if the volume is read-only. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeIsReadOnlyKey = + _lookup('NSURLVolumeIsReadOnlyKey'); - NSErrorUserInfoKey get NSLocalizedFailureReasonErrorKey => - _NSLocalizedFailureReasonErrorKey.value; + NSURLResourceKey get NSURLVolumeIsReadOnlyKey => + _NSURLVolumeIsReadOnlyKey.value; - set NSLocalizedFailureReasonErrorKey(NSErrorUserInfoKey value) => - _NSLocalizedFailureReasonErrorKey.value = value; + set NSURLVolumeIsReadOnlyKey(NSURLResourceKey value) => + _NSURLVolumeIsReadOnlyKey.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'); + /// The volume's creation date, or nil if this cannot be determined. (Read-only, value type NSDate) + late final ffi.Pointer _NSURLVolumeCreationDateKey = + _lookup('NSURLVolumeCreationDateKey'); - NSErrorUserInfoKey get NSLocalizedRecoverySuggestionErrorKey => - _NSLocalizedRecoverySuggestionErrorKey.value; + NSURLResourceKey get NSURLVolumeCreationDateKey => + _NSURLVolumeCreationDateKey.value; - set NSLocalizedRecoverySuggestionErrorKey(NSErrorUserInfoKey value) => - _NSLocalizedRecoverySuggestionErrorKey.value = value; + set NSURLVolumeCreationDateKey(NSURLResourceKey value) => + _NSURLVolumeCreationDateKey.value = value; - /// NSArray of NSStrings corresponding to button titles. - late final ffi.Pointer - _NSLocalizedRecoveryOptionsErrorKey = - _lookup('NSLocalizedRecoveryOptionsErrorKey'); + /// 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'); - NSErrorUserInfoKey get NSLocalizedRecoveryOptionsErrorKey => - _NSLocalizedRecoveryOptionsErrorKey.value; + NSURLResourceKey get NSURLVolumeURLForRemountingKey => + _NSURLVolumeURLForRemountingKey.value; - set NSLocalizedRecoveryOptionsErrorKey(NSErrorUserInfoKey value) => - _NSLocalizedRecoveryOptionsErrorKey.value = value; + set NSURLVolumeURLForRemountingKey(NSURLResourceKey value) => + _NSURLVolumeURLForRemountingKey.value = value; - /// Instance of a subclass of NSObject that conforms to the NSErrorRecoveryAttempting informal protocol - late final ffi.Pointer _NSRecoveryAttempterErrorKey = - _lookup('NSRecoveryAttempterErrorKey'); + /// 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'); - NSErrorUserInfoKey get NSRecoveryAttempterErrorKey => - _NSRecoveryAttempterErrorKey.value; + NSURLResourceKey get NSURLVolumeUUIDStringKey => + _NSURLVolumeUUIDStringKey.value; - set NSRecoveryAttempterErrorKey(NSErrorUserInfoKey value) => - _NSRecoveryAttempterErrorKey.value = value; + set NSURLVolumeUUIDStringKey(NSURLResourceKey value) => + _NSURLVolumeUUIDStringKey.value = value; - /// NSString containing a help anchor - late final ffi.Pointer _NSHelpAnchorErrorKey = - _lookup('NSHelpAnchorErrorKey'); + /// The name of the volume (Read-write if NSURLVolumeSupportsRenamingKey is YES, otherwise read-only, value type NSString) + late final ffi.Pointer _NSURLVolumeNameKey = + _lookup('NSURLVolumeNameKey'); - NSErrorUserInfoKey get NSHelpAnchorErrorKey => _NSHelpAnchorErrorKey.value; + NSURLResourceKey get NSURLVolumeNameKey => _NSURLVolumeNameKey.value; - set NSHelpAnchorErrorKey(NSErrorUserInfoKey value) => - _NSHelpAnchorErrorKey.value = value; + set NSURLVolumeNameKey(NSURLResourceKey value) => + _NSURLVolumeNameKey.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'); + /// The user-presentable name of the volume (Read-only, value type NSString) + late final ffi.Pointer _NSURLVolumeLocalizedNameKey = + _lookup('NSURLVolumeLocalizedNameKey'); - NSErrorUserInfoKey get NSDebugDescriptionErrorKey => - _NSDebugDescriptionErrorKey.value; + NSURLResourceKey get NSURLVolumeLocalizedNameKey => + _NSURLVolumeLocalizedNameKey.value; - set NSDebugDescriptionErrorKey(NSErrorUserInfoKey value) => - _NSDebugDescriptionErrorKey.value = value; + set NSURLVolumeLocalizedNameKey(NSURLResourceKey value) => + _NSURLVolumeLocalizedNameKey.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'); + /// true if the volume is encrypted. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeIsEncryptedKey = + _lookup('NSURLVolumeIsEncryptedKey'); - NSErrorUserInfoKey get NSLocalizedFailureErrorKey => - _NSLocalizedFailureErrorKey.value; + NSURLResourceKey get NSURLVolumeIsEncryptedKey => + _NSURLVolumeIsEncryptedKey.value; - set NSLocalizedFailureErrorKey(NSErrorUserInfoKey value) => - _NSLocalizedFailureErrorKey.value = value; + set NSURLVolumeIsEncryptedKey(NSURLResourceKey value) => + _NSURLVolumeIsEncryptedKey.value = value; - /// NSNumber containing NSStringEncoding - late final ffi.Pointer _NSStringEncodingErrorKey = - _lookup('NSStringEncodingErrorKey'); + /// true if the volume is the root filesystem. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeIsRootFileSystemKey = + _lookup('NSURLVolumeIsRootFileSystemKey'); - NSErrorUserInfoKey get NSStringEncodingErrorKey => - _NSStringEncodingErrorKey.value; + NSURLResourceKey get NSURLVolumeIsRootFileSystemKey => + _NSURLVolumeIsRootFileSystemKey.value; - set NSStringEncodingErrorKey(NSErrorUserInfoKey value) => - _NSStringEncodingErrorKey.value = value; + set NSURLVolumeIsRootFileSystemKey(NSURLResourceKey value) => + _NSURLVolumeIsRootFileSystemKey.value = value; - /// NSURL - late final ffi.Pointer _NSURLErrorKey = - _lookup('NSURLErrorKey'); + /// 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'); - NSErrorUserInfoKey get NSURLErrorKey => _NSURLErrorKey.value; + NSURLResourceKey get NSURLVolumeSupportsCompressionKey => + _NSURLVolumeSupportsCompressionKey.value; - set NSURLErrorKey(NSErrorUserInfoKey value) => _NSURLErrorKey.value = value; + set NSURLVolumeSupportsCompressionKey(NSURLResourceKey value) => + _NSURLVolumeSupportsCompressionKey.value = value; - /// NSString - late final ffi.Pointer _NSFilePathErrorKey = - _lookup('NSFilePathErrorKey'); + /// true if the volume supports clonefile(2) (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeSupportsFileCloningKey = + _lookup('NSURLVolumeSupportsFileCloningKey'); - NSErrorUserInfoKey get NSFilePathErrorKey => _NSFilePathErrorKey.value; + NSURLResourceKey get NSURLVolumeSupportsFileCloningKey => + _NSURLVolumeSupportsFileCloningKey.value; - set NSFilePathErrorKey(NSErrorUserInfoKey value) => - _NSFilePathErrorKey.value = value; + set NSURLVolumeSupportsFileCloningKey(NSURLResourceKey value) => + _NSURLVolumeSupportsFileCloningKey.value = value; - /// Is this an error handle? - /// - /// Requires there to be a current isolate. - bool Dart_IsError( - Object handle, - ) { - return _Dart_IsError( - handle, - ); - } + /// 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'); - late final _Dart_IsErrorPtr = - _lookup>( - 'Dart_IsError'); - late final _Dart_IsError = - _Dart_IsErrorPtr.asFunction(); + NSURLResourceKey get NSURLVolumeSupportsSwapRenamingKey => + _NSURLVolumeSupportsSwapRenamingKey.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, - ); - } + set NSURLVolumeSupportsSwapRenamingKey(NSURLResourceKey value) => + _NSURLVolumeSupportsSwapRenamingKey.value = value; - late final _Dart_IsApiErrorPtr = - _lookup>( - 'Dart_IsApiError'); - late final _Dart_IsApiError = - _Dart_IsApiErrorPtr.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 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, - ); - } + NSURLResourceKey get NSURLVolumeSupportsExclusiveRenamingKey => + _NSURLVolumeSupportsExclusiveRenamingKey.value; - late final _Dart_IsUnhandledExceptionErrorPtr = - _lookup>( - 'Dart_IsUnhandledExceptionError'); - late final _Dart_IsUnhandledExceptionError = - _Dart_IsUnhandledExceptionErrorPtr.asFunction(); + set NSURLVolumeSupportsExclusiveRenamingKey(NSURLResourceKey value) => + _NSURLVolumeSupportsExclusiveRenamingKey.value = 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, - ); - } + /// 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_IsCompilationErrorPtr = - _lookup>( - 'Dart_IsCompilationError'); - late final _Dart_IsCompilationError = - _Dart_IsCompilationErrorPtr.asFunction(); + NSURLResourceKey get NSURLVolumeSupportsImmutableFilesKey => + _NSURLVolumeSupportsImmutableFilesKey.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, - ); - } + set NSURLVolumeSupportsImmutableFilesKey(NSURLResourceKey value) => + _NSURLVolumeSupportsImmutableFilesKey.value = value; - late final _Dart_IsFatalErrorPtr = - _lookup>( - 'Dart_IsFatalError'); - late final _Dart_IsFatalError = - _Dart_IsFatalErrorPtr.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'); - /// 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, - ); - } + NSURLResourceKey get NSURLVolumeSupportsAccessPermissionsKey => + _NSURLVolumeSupportsAccessPermissionsKey.value; - late final _Dart_GetErrorPtr = - _lookup Function(ffi.Handle)>>( - 'Dart_GetError'); - late final _Dart_GetError = - _Dart_GetErrorPtr.asFunction Function(Object)>(); + set NSURLVolumeSupportsAccessPermissionsKey(NSURLResourceKey value) => + _NSURLVolumeSupportsAccessPermissionsKey.value = value; - /// Is this an error handle for an unhandled exception? - bool Dart_ErrorHasException( - Object handle, - ) { - return _Dart_ErrorHasException( - 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_ErrorHasExceptionPtr = - _lookup>( - 'Dart_ErrorHasException'); - late final _Dart_ErrorHasException = - _Dart_ErrorHasExceptionPtr.asFunction(); + NSURLResourceKey get NSURLVolumeSupportsFileProtectionKey => + _NSURLVolumeSupportsFileProtectionKey.value; - /// Gets the exception Object from an unhandled exception error handle. - Object Dart_ErrorGetException( - Object handle, - ) { - return _Dart_ErrorGetException( - handle, - ); - } + set NSURLVolumeSupportsFileProtectionKey(NSURLResourceKey value) => + _NSURLVolumeSupportsFileProtectionKey.value = value; - late final _Dart_ErrorGetExceptionPtr = - _lookup>( - 'Dart_ErrorGetException'); - late final _Dart_ErrorGetException = - _Dart_ErrorGetExceptionPtr.asFunction(); + /// (Read-only, value type NSNumber) + late final ffi.Pointer + _NSURLVolumeAvailableCapacityForImportantUsageKey = + _lookup( + 'NSURLVolumeAvailableCapacityForImportantUsageKey'); - /// Gets the stack trace Object from an unhandled exception error handle. - Object Dart_ErrorGetStackTrace( - Object handle, - ) { - return _Dart_ErrorGetStackTrace( - handle, - ); - } + NSURLResourceKey get NSURLVolumeAvailableCapacityForImportantUsageKey => + _NSURLVolumeAvailableCapacityForImportantUsageKey.value; - late final _Dart_ErrorGetStackTracePtr = - _lookup>( - 'Dart_ErrorGetStackTrace'); - late final _Dart_ErrorGetStackTrace = - _Dart_ErrorGetStackTracePtr.asFunction(); + set NSURLVolumeAvailableCapacityForImportantUsageKey( + NSURLResourceKey value) => + _NSURLVolumeAvailableCapacityForImportantUsageKey.value = 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, - ); - } + /// (Read-only, value type NSNumber) + late final ffi.Pointer + _NSURLVolumeAvailableCapacityForOpportunisticUsageKey = + _lookup( + 'NSURLVolumeAvailableCapacityForOpportunisticUsageKey'); - late final _Dart_NewApiErrorPtr = - _lookup)>>( - 'Dart_NewApiError'); - late final _Dart_NewApiError = - _Dart_NewApiErrorPtr.asFunction)>(); + NSURLResourceKey get NSURLVolumeAvailableCapacityForOpportunisticUsageKey => + _NSURLVolumeAvailableCapacityForOpportunisticUsageKey.value; - Object Dart_NewCompilationError( - ffi.Pointer error, - ) { - return _Dart_NewCompilationError( - error, - ); - } - - late final _Dart_NewCompilationErrorPtr = - _lookup)>>( - 'Dart_NewCompilationError'); - late final _Dart_NewCompilationError = _Dart_NewCompilationErrorPtr - .asFunction)>(); + set NSURLVolumeAvailableCapacityForOpportunisticUsageKey( + NSURLResourceKey value) => + _NSURLVolumeAvailableCapacityForOpportunisticUsageKey.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, - ); - } + /// The name of the file system type. (Read-only, value type NSString) + late final ffi.Pointer _NSURLVolumeTypeNameKey = + _lookup('NSURLVolumeTypeNameKey'); - late final _Dart_NewUnhandledExceptionErrorPtr = - _lookup>( - 'Dart_NewUnhandledExceptionError'); - late final _Dart_NewUnhandledExceptionError = - _Dart_NewUnhandledExceptionErrorPtr.asFunction(); + NSURLResourceKey get NSURLVolumeTypeNameKey => _NSURLVolumeTypeNameKey.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 NSURLVolumeTypeNameKey(NSURLResourceKey value) => + _NSURLVolumeTypeNameKey.value = value; - late final _Dart_PropagateErrorPtr = - _lookup>( - 'Dart_PropagateError'); - late final _Dart_PropagateError = - _Dart_PropagateErrorPtr.asFunction(); + /// The file system subtype value. (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLVolumeSubtypeKey = + _lookup('NSURLVolumeSubtypeKey'); - /// 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 NSURLVolumeSubtypeKey => _NSURLVolumeSubtypeKey.value; - late final _Dart_ToStringPtr = - _lookup>( - 'Dart_ToString'); - late final _Dart_ToString = - _Dart_ToStringPtr.asFunction(); + set NSURLVolumeSubtypeKey(NSURLResourceKey value) => + _NSURLVolumeSubtypeKey.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, - ); - } + /// The volume mounted from location. (Read-only, value type NSString) + late final ffi.Pointer _NSURLVolumeMountFromLocationKey = + _lookup('NSURLVolumeMountFromLocationKey'); - late final _Dart_IdentityEqualsPtr = - _lookup>( - 'Dart_IdentityEquals'); - late final _Dart_IdentityEquals = - _Dart_IdentityEqualsPtr.asFunction(); + NSURLResourceKey get NSURLVolumeMountFromLocationKey => + _NSURLVolumeMountFromLocationKey.value; - /// Allocates a handle in the current scope from a persistent handle. - Object Dart_HandleFromPersistent( - Object object, - ) { - return _Dart_HandleFromPersistent( - object, - ); - } + set NSURLVolumeMountFromLocationKey(NSURLResourceKey value) => + _NSURLVolumeMountFromLocationKey.value = value; - late final _Dart_HandleFromPersistentPtr = - _lookup>( - 'Dart_HandleFromPersistent'); - late final _Dart_HandleFromPersistent = - _Dart_HandleFromPersistentPtr.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'); - /// 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 NSURLIsUbiquitousItemKey => + _NSURLIsUbiquitousItemKey.value; - late final _Dart_HandleFromWeakPersistentPtr = _lookup< - ffi.NativeFunction>( - 'Dart_HandleFromWeakPersistent'); - late final _Dart_HandleFromWeakPersistent = _Dart_HandleFromWeakPersistentPtr - .asFunction(); + set NSURLIsUbiquitousItemKey(NSURLResourceKey value) => + _NSURLIsUbiquitousItemKey.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 this item has conflicts outstanding. (Read-only, value type boolean NSNumber) + late final ffi.Pointer + _NSURLUbiquitousItemHasUnresolvedConflictsKey = + _lookup('NSURLUbiquitousItemHasUnresolvedConflictsKey'); - late final _Dart_NewPersistentHandlePtr = - _lookup>( - 'Dart_NewPersistentHandle'); - late final _Dart_NewPersistentHandle = - _Dart_NewPersistentHandlePtr.asFunction(); + NSURLResourceKey get NSURLUbiquitousItemHasUnresolvedConflictsKey => + _NSURLUbiquitousItemHasUnresolvedConflictsKey.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 NSURLUbiquitousItemHasUnresolvedConflictsKey(NSURLResourceKey value) => + _NSURLUbiquitousItemHasUnresolvedConflictsKey.value = value; - late final _Dart_SetPersistentHandlePtr = - _lookup>( - 'Dart_SetPersistentHandle'); - late final _Dart_SetPersistentHandle = - _Dart_SetPersistentHandlePtr.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'); - /// Deallocates a persistent handle. - /// - /// Requires there to be a current isolate group. - void Dart_DeletePersistentHandle( - Object object, - ) { - return _Dart_DeletePersistentHandle( - object, - ); - } + NSURLResourceKey get NSURLUbiquitousItemIsDownloadedKey => + _NSURLUbiquitousItemIsDownloadedKey.value; - late final _Dart_DeletePersistentHandlePtr = - _lookup>( - 'Dart_DeletePersistentHandle'); - late final _Dart_DeletePersistentHandle = - _Dart_DeletePersistentHandlePtr.asFunction(); + set NSURLUbiquitousItemIsDownloadedKey(NSURLResourceKey value) => + _NSURLUbiquitousItemIsDownloadedKey.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, - ); - } + /// 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_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)>(); + NSURLResourceKey get NSURLUbiquitousItemIsDownloadingKey => + _NSURLUbiquitousItemIsDownloadingKey.value; - /// 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, - ); - } + set NSURLUbiquitousItemIsDownloadingKey(NSURLResourceKey value) => + _NSURLUbiquitousItemIsDownloadingKey.value = value; - late final _Dart_DeleteWeakPersistentHandlePtr = - _lookup>( - 'Dart_DeleteWeakPersistentHandle'); - late final _Dart_DeleteWeakPersistentHandle = - _Dart_DeleteWeakPersistentHandlePtr.asFunction< - void Function(Dart_WeakPersistentHandle)>(); + /// 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'); - /// 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, - ); - } + NSURLResourceKey get NSURLUbiquitousItemIsUploadedKey => + _NSURLUbiquitousItemIsUploadedKey.value; - 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)>(); + set NSURLUbiquitousItemIsUploadedKey(NSURLResourceKey value) => + _NSURLUbiquitousItemIsUploadedKey.value = 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, - ); - } + /// 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_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)>(); + NSURLResourceKey get NSURLUbiquitousItemIsUploadingKey => + _NSURLUbiquitousItemIsUploadingKey.value; - /// 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, - ); - } + set NSURLUbiquitousItemIsUploadingKey(NSURLResourceKey value) => + _NSURLUbiquitousItemIsUploadingKey.value = value; - late final _Dart_DeleteFinalizableHandlePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(Dart_FinalizableHandle, - ffi.Handle)>>('Dart_DeleteFinalizableHandle'); - late final _Dart_DeleteFinalizableHandle = _Dart_DeleteFinalizableHandlePtr - .asFunction(); + /// Use NSMetadataQuery and NSMetadataUbiquitousItemPercentDownloadedKey on NSMetadataItem instead + late final ffi.Pointer + _NSURLUbiquitousItemPercentDownloadedKey = + _lookup('NSURLUbiquitousItemPercentDownloadedKey'); - /// 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, - ); - } + NSURLResourceKey get NSURLUbiquitousItemPercentDownloadedKey => + _NSURLUbiquitousItemPercentDownloadedKey.value; - 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)>(); + set NSURLUbiquitousItemPercentDownloadedKey(NSURLResourceKey value) => + _NSURLUbiquitousItemPercentDownloadedKey.value = value; - /// 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(); - } + /// Use NSMetadataQuery and NSMetadataUbiquitousItemPercentUploadedKey on NSMetadataItem instead + late final ffi.Pointer + _NSURLUbiquitousItemPercentUploadedKey = + _lookup('NSURLUbiquitousItemPercentUploadedKey'); - late final _Dart_VersionStringPtr = - _lookup Function()>>( - 'Dart_VersionString'); - late final _Dart_VersionString = - _Dart_VersionStringPtr.asFunction Function()>(); + NSURLResourceKey get NSURLUbiquitousItemPercentUploadedKey => + _NSURLUbiquitousItemPercentUploadedKey.value; - /// Initialize Dart_IsolateFlags with correct version and default values. - void Dart_IsolateFlagsInitialize( - ffi.Pointer flags, - ) { - return _Dart_IsolateFlagsInitialize( - flags, - ); - } + set NSURLUbiquitousItemPercentUploadedKey(NSURLResourceKey value) => + _NSURLUbiquitousItemPercentUploadedKey.value = value; - late final _Dart_IsolateFlagsInitializePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer)>>('Dart_IsolateFlagsInitialize'); - late final _Dart_IsolateFlagsInitialize = _Dart_IsolateFlagsInitializePtr - .asFunction)>(); + /// returns the download status of this item. (Read-only, value type NSString). Possible values below. + late final ffi.Pointer + _NSURLUbiquitousItemDownloadingStatusKey = + _lookup('NSURLUbiquitousItemDownloadingStatusKey'); - /// 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, - ); - } + NSURLResourceKey get NSURLUbiquitousItemDownloadingStatusKey => + _NSURLUbiquitousItemDownloadingStatusKey.value; - 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)>(); + set NSURLUbiquitousItemDownloadingStatusKey(NSURLResourceKey value) => + _NSURLUbiquitousItemDownloadingStatusKey.value = value; - /// 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(); - } + /// 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 _Dart_CleanupPtr = - _lookup Function()>>( - 'Dart_Cleanup'); - late final _Dart_Cleanup = - _Dart_CleanupPtr.asFunction Function()>(); + NSURLResourceKey get NSURLUbiquitousItemDownloadingErrorKey => + _NSURLUbiquitousItemDownloadingErrorKey.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, - ) { - return _Dart_SetVMFlags( - argc, - argv, - ); - } + set NSURLUbiquitousItemDownloadingErrorKey(NSURLResourceKey value) => + _NSURLUbiquitousItemDownloadingErrorKey.value = value; - 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 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'); - /// 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, - ); - } + NSURLResourceKey get NSURLUbiquitousItemUploadingErrorKey => + _NSURLUbiquitousItemUploadingErrorKey.value; - late final _Dart_IsVMFlagSetPtr = - _lookup)>>( - 'Dart_IsVMFlagSet'); - late final _Dart_IsVMFlagSet = - _Dart_IsVMFlagSetPtr.asFunction)>(); + set NSURLUbiquitousItemUploadingErrorKey(NSURLResourceKey value) => + _NSURLUbiquitousItemUploadingErrorKey.value = value; - /// 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, - ); - } + /// 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'); - 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>)>(); + NSURLResourceKey get NSURLUbiquitousItemDownloadRequestedKey => + _NSURLUbiquitousItemDownloadRequestedKey.value; - /// 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, - ); - } + set NSURLUbiquitousItemDownloadRequestedKey(NSURLResourceKey value) => + _NSURLUbiquitousItemDownloadRequestedKey.value = value; - 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>)>(); + /// returns the name of this item's container as displayed to users. + late final ffi.Pointer + _NSURLUbiquitousItemContainerDisplayNameKey = + _lookup('NSURLUbiquitousItemContainerDisplayNameKey'); - /// 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, - ); - } + NSURLResourceKey get NSURLUbiquitousItemContainerDisplayNameKey => + _NSURLUbiquitousItemContainerDisplayNameKey.value; - 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>)>(); + set NSURLUbiquitousItemContainerDisplayNameKey(NSURLResourceKey value) => + _NSURLUbiquitousItemContainerDisplayNameKey.value = value; - /// 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(); - } + /// 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 _Dart_ShutdownIsolatePtr = - _lookup>('Dart_ShutdownIsolate'); - late final _Dart_ShutdownIsolate = - _Dart_ShutdownIsolatePtr.asFunction(); + NSURLResourceKey get NSURLUbiquitousItemIsExcludedFromSyncKey => + _NSURLUbiquitousItemIsExcludedFromSyncKey.value; - /// Returns the current isolate. Will return NULL if there is no - /// current isolate. - Dart_Isolate Dart_CurrentIsolate() { - return _Dart_CurrentIsolate(); - } + set NSURLUbiquitousItemIsExcludedFromSyncKey(NSURLResourceKey value) => + _NSURLUbiquitousItemIsExcludedFromSyncKey.value = value; - late final _Dart_CurrentIsolatePtr = - _lookup>( - 'Dart_CurrentIsolate'); - late final _Dart_CurrentIsolate = - _Dart_CurrentIsolatePtr.asFunction(); + /// true if the ubiquitous item is shared. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLUbiquitousItemIsSharedKey = + _lookup('NSURLUbiquitousItemIsSharedKey'); - /// 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(); - } + NSURLResourceKey get NSURLUbiquitousItemIsSharedKey => + _NSURLUbiquitousItemIsSharedKey.value; - late final _Dart_CurrentIsolateDataPtr = - _lookup Function()>>( - 'Dart_CurrentIsolateData'); - late final _Dart_CurrentIsolateData = _Dart_CurrentIsolateDataPtr.asFunction< - ffi.Pointer Function()>(); + set NSURLUbiquitousItemIsSharedKey(NSURLResourceKey value) => + _NSURLUbiquitousItemIsSharedKey.value = value; - /// 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, - ); - } + /// 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 _Dart_IsolateDataPtr = - _lookup Function(Dart_Isolate)>>( - 'Dart_IsolateData'); - late final _Dart_IsolateData = _Dart_IsolateDataPtr.asFunction< - ffi.Pointer Function(Dart_Isolate)>(); + NSURLResourceKey get NSURLUbiquitousSharedItemCurrentUserRoleKey => + _NSURLUbiquitousSharedItemCurrentUserRoleKey.value; - /// Returns the current isolate group. Will return NULL if there is no - /// current isolate group. - Dart_IsolateGroup Dart_CurrentIsolateGroup() { - return _Dart_CurrentIsolateGroup(); - } + set NSURLUbiquitousSharedItemCurrentUserRoleKey(NSURLResourceKey value) => + _NSURLUbiquitousSharedItemCurrentUserRoleKey.value = value; - late final _Dart_CurrentIsolateGroupPtr = - _lookup>( - 'Dart_CurrentIsolateGroup'); - late final _Dart_CurrentIsolateGroup = - _Dart_CurrentIsolateGroupPtr.asFunction(); + /// 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'); - /// 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(); - } + NSURLResourceKey get NSURLUbiquitousSharedItemCurrentUserPermissionsKey => + _NSURLUbiquitousSharedItemCurrentUserPermissionsKey.value; - late final _Dart_CurrentIsolateGroupDataPtr = - _lookup Function()>>( - 'Dart_CurrentIsolateGroupData'); - late final _Dart_CurrentIsolateGroupData = _Dart_CurrentIsolateGroupDataPtr - .asFunction Function()>(); + set NSURLUbiquitousSharedItemCurrentUserPermissionsKey( + NSURLResourceKey value) => + _NSURLUbiquitousSharedItemCurrentUserPermissionsKey.value = value; - /// 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, - ); - } + /// returns a NSPersonNameComponents, or nil if the current user. (Read-only, value type NSPersonNameComponents) + late final ffi.Pointer + _NSURLUbiquitousSharedItemOwnerNameComponentsKey = + _lookup( + 'NSURLUbiquitousSharedItemOwnerNameComponentsKey'); - late final _Dart_IsolateGroupDataPtr = - _lookup Function(Dart_Isolate)>>( - 'Dart_IsolateGroupData'); - late final _Dart_IsolateGroupData = _Dart_IsolateGroupDataPtr.asFunction< - ffi.Pointer Function(Dart_Isolate)>(); + NSURLResourceKey get NSURLUbiquitousSharedItemOwnerNameComponentsKey => + _NSURLUbiquitousSharedItemOwnerNameComponentsKey.value; - /// 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(); - } + set NSURLUbiquitousSharedItemOwnerNameComponentsKey(NSURLResourceKey value) => + _NSURLUbiquitousSharedItemOwnerNameComponentsKey.value = value; - late final _Dart_DebugNamePtr = - _lookup>('Dart_DebugName'); - late final _Dart_DebugName = - _Dart_DebugNamePtr.asFunction(); + /// 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'); - /// 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, - ); - } + NSURLResourceKey + get NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey => + _NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey.value; - late final _Dart_IsolateServiceIdPtr = - _lookup Function(Dart_Isolate)>>( - 'Dart_IsolateServiceId'); - late final _Dart_IsolateServiceId = _Dart_IsolateServiceIdPtr.asFunction< - ffi.Pointer Function(Dart_Isolate)>(); + set NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey( + NSURLResourceKey value) => + _NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey.value = value; - /// 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, - ); - } + /// this item has not been downloaded yet. Use startDownloadingUbiquitousItemAtURL:error: to download it. + late final ffi.Pointer + _NSURLUbiquitousItemDownloadingStatusNotDownloaded = + _lookup( + 'NSURLUbiquitousItemDownloadingStatusNotDownloaded'); - late final _Dart_EnterIsolatePtr = - _lookup>( - 'Dart_EnterIsolate'); - late final _Dart_EnterIsolate = - _Dart_EnterIsolatePtr.asFunction(); + NSURLUbiquitousItemDownloadingStatus + get NSURLUbiquitousItemDownloadingStatusNotDownloaded => + _NSURLUbiquitousItemDownloadingStatusNotDownloaded.value; - /// 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, - ); - } + set NSURLUbiquitousItemDownloadingStatusNotDownloaded( + NSURLUbiquitousItemDownloadingStatus value) => + _NSURLUbiquitousItemDownloadingStatusNotDownloaded.value = value; - late final _Dart_KillIsolatePtr = - _lookup>( - 'Dart_KillIsolate'); - late final _Dart_KillIsolate = - _Dart_KillIsolatePtr.asFunction(); + /// 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'); - /// 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, - ); - } + NSURLUbiquitousItemDownloadingStatus + get NSURLUbiquitousItemDownloadingStatusDownloaded => + _NSURLUbiquitousItemDownloadingStatusDownloaded.value; - 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, - ); - } + set NSURLUbiquitousItemDownloadingStatusDownloaded( + NSURLUbiquitousItemDownloadingStatus value) => + _NSURLUbiquitousItemDownloadingStatusDownloaded.value = value; - late final _Dart_NotifyIdlePtr = - _lookup>( - 'Dart_NotifyIdle'); - late final _Dart_NotifyIdle = - _Dart_NotifyIdlePtr.asFunction(); + /// 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'); - /// 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(); - } + NSURLUbiquitousItemDownloadingStatus + get NSURLUbiquitousItemDownloadingStatusCurrent => + _NSURLUbiquitousItemDownloadingStatusCurrent.value; - late final _Dart_NotifyLowMemoryPtr = - _lookup>('Dart_NotifyLowMemory'); - late final _Dart_NotifyLowMemory = - _Dart_NotifyLowMemoryPtr.asFunction(); + set NSURLUbiquitousItemDownloadingStatusCurrent( + NSURLUbiquitousItemDownloadingStatus value) => + _NSURLUbiquitousItemDownloadingStatusCurrent.value = value; - /// Starts the CPU sampling profiler. - void Dart_StartProfiling() { - return _Dart_StartProfiling(); - } + /// the current user is the owner of this shared item. + late final ffi.Pointer + _NSURLUbiquitousSharedItemRoleOwner = + _lookup( + 'NSURLUbiquitousSharedItemRoleOwner'); - late final _Dart_StartProfilingPtr = - _lookup>('Dart_StartProfiling'); - late final _Dart_StartProfiling = - _Dart_StartProfilingPtr.asFunction(); + NSURLUbiquitousSharedItemRole get NSURLUbiquitousSharedItemRoleOwner => + _NSURLUbiquitousSharedItemRoleOwner.value; - /// 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(); - } + set NSURLUbiquitousSharedItemRoleOwner(NSURLUbiquitousSharedItemRole value) => + _NSURLUbiquitousSharedItemRoleOwner.value = value; - late final _Dart_StopProfilingPtr = - _lookup>('Dart_StopProfiling'); - late final _Dart_StopProfiling = - _Dart_StopProfilingPtr.asFunction(); + /// the current user is a participant of this shared item. + late final ffi.Pointer + _NSURLUbiquitousSharedItemRoleParticipant = + _lookup( + 'NSURLUbiquitousSharedItemRoleParticipant'); - /// 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(); - } + NSURLUbiquitousSharedItemRole get NSURLUbiquitousSharedItemRoleParticipant => + _NSURLUbiquitousSharedItemRoleParticipant.value; - late final _Dart_ThreadDisableProfilingPtr = - _lookup>( - 'Dart_ThreadDisableProfiling'); - late final _Dart_ThreadDisableProfiling = - _Dart_ThreadDisableProfilingPtr.asFunction(); + set NSURLUbiquitousSharedItemRoleParticipant( + NSURLUbiquitousSharedItemRole value) => + _NSURLUbiquitousSharedItemRoleParticipant.value = value; - /// 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(); - } + /// the current user is only allowed to read this item + late final ffi.Pointer + _NSURLUbiquitousSharedItemPermissionsReadOnly = + _lookup( + 'NSURLUbiquitousSharedItemPermissionsReadOnly'); - late final _Dart_ThreadEnableProfilingPtr = - _lookup>( - 'Dart_ThreadEnableProfiling'); - late final _Dart_ThreadEnableProfiling = - _Dart_ThreadEnableProfilingPtr.asFunction(); + NSURLUbiquitousSharedItemPermissions + get NSURLUbiquitousSharedItemPermissionsReadOnly => + _NSURLUbiquitousSharedItemPermissionsReadOnly.value; - /// 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, - ); - } + set NSURLUbiquitousSharedItemPermissionsReadOnly( + NSURLUbiquitousSharedItemPermissions value) => + _NSURLUbiquitousSharedItemPermissionsReadOnly.value = value; - 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)>(); + /// the current user is allowed to both read and write this item + late final ffi.Pointer + _NSURLUbiquitousSharedItemPermissionsReadWrite = + _lookup( + 'NSURLUbiquitousSharedItemPermissionsReadWrite'); - /// Exits an isolate. After this call, Dart_CurrentIsolate will - /// return NULL. - /// - /// Requires there to be a current isolate. - void Dart_ExitIsolate() { - return _Dart_ExitIsolate(); - } + NSURLUbiquitousSharedItemPermissions + get NSURLUbiquitousSharedItemPermissionsReadWrite => + _NSURLUbiquitousSharedItemPermissionsReadWrite.value; - late final _Dart_ExitIsolatePtr = - _lookup>('Dart_ExitIsolate'); - late final _Dart_ExitIsolate = - _Dart_ExitIsolatePtr.asFunction(); + set NSURLUbiquitousSharedItemPermissionsReadWrite( + NSURLUbiquitousSharedItemPermissions value) => + _NSURLUbiquitousSharedItemPermissionsReadWrite.value = value; - /// 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, + late final _class_NSURLQueryItem1 = _getClass1("NSURLQueryItem"); + late final _sel_initWithName_value_1 = _registerName1("initWithName:value:"); + instancetype _objc_msgSend_482( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer name, + ffi.Pointer value, ) { - return _Dart_CreateSnapshot( - vm_snapshot_data_buffer, - vm_snapshot_data_size, - isolate_snapshot_data_buffer, - isolate_snapshot_data_size, - is_core, + return __objc_msgSend_482( + obj, + sel, + name, + value, ); } - late final _Dart_CreateSnapshotPtr = _lookup< + late final __objc_msgSend_482Ptr = _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)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_482 = __objc_msgSend_482Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - /// 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, + 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_483( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer baseURL, ) { - return _Dart_IsKernel( - buffer, - buffer_size, + return __objc_msgSend_483( + obj, + sel, + baseURL, ); } - late final _Dart_IsKernelPtr = _lookup< + late final __objc_msgSend_483Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, ffi.IntPtr)>>('Dart_IsKernel'); - late final _Dart_IsKernel = _Dart_IsKernelPtr.asFunction< - bool Function(ffi.Pointer, int)>(); + ffi.Pointer Function(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)>(); - /// 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, + 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_484( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + int statusCode, + ffi.Pointer HTTPVersion, + ffi.Pointer headerFields, ) { - return _Dart_IsolateMakeRunnable( - isolate, + return __objc_msgSend_484( + obj, + sel, + url, + statusCode, + HTTPVersion, + headerFields, ); } - late final _Dart_IsolateMakeRunnablePtr = - _lookup Function(Dart_Isolate)>>( - 'Dart_IsolateMakeRunnable'); - late final _Dart_IsolateMakeRunnable = _Dart_IsolateMakeRunnablePtr - .asFunction Function(Dart_Isolate)>(); + late final __objc_msgSend_484Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSInteger, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_484 = __objc_msgSend_484Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer)>(); - /// 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, + late final _sel_statusCode1 = _registerName1("statusCode"); + late final _sel_allHeaderFields1 = _registerName1("allHeaderFields"); + late final _sel_localizedStringForStatusCode_1 = + _registerName1("localizedStringForStatusCode:"); + ffi.Pointer _objc_msgSend_485( + ffi.Pointer obj, + ffi.Pointer sel, + int statusCode, ) { - return _Dart_SetMessageNotifyCallback( - message_notify_callback, + return __objc_msgSend_485( + obj, + sel, + statusCode, ); } - late final _Dart_SetMessageNotifyCallbackPtr = _lookup< - ffi.NativeFunction>( - 'Dart_SetMessageNotifyCallback'); - late final _Dart_SetMessageNotifyCallback = _Dart_SetMessageNotifyCallbackPtr - .asFunction(); + late final __objc_msgSend_485Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSInteger)>>('objc_msgSend'); + late final __objc_msgSend_485 = __objc_msgSend_485Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - /// 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 ffi.Pointer _NSGenericException = + _lookup('NSGenericException'); - late final _Dart_GetMessageNotifyCallbackPtr = - _lookup>( - 'Dart_GetMessageNotifyCallback'); - late final _Dart_GetMessageNotifyCallback = _Dart_GetMessageNotifyCallbackPtr - .asFunction(); + NSExceptionName get NSGenericException => _NSGenericException.value; - /// 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(); - } + set NSGenericException(NSExceptionName value) => + _NSGenericException.value = value; - late final _Dart_ShouldPauseOnStartPtr = - _lookup>( - 'Dart_ShouldPauseOnStart'); - late final _Dart_ShouldPauseOnStart = - _Dart_ShouldPauseOnStartPtr.asFunction(); + late final ffi.Pointer _NSRangeException = + _lookup('NSRangeException'); - /// 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, - ); - } + NSExceptionName get NSRangeException => _NSRangeException.value; - late final _Dart_SetShouldPauseOnStartPtr = - _lookup>( - 'Dart_SetShouldPauseOnStart'); - late final _Dart_SetShouldPauseOnStart = - _Dart_SetShouldPauseOnStartPtr.asFunction(); + set NSRangeException(NSExceptionName value) => + _NSRangeException.value = value; - /// 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 ffi.Pointer _NSInvalidArgumentException = + _lookup('NSInvalidArgumentException'); - late final _Dart_IsPausedOnStartPtr = - _lookup>('Dart_IsPausedOnStart'); - late final _Dart_IsPausedOnStart = - _Dart_IsPausedOnStartPtr.asFunction(); + NSExceptionName get NSInvalidArgumentException => + _NSInvalidArgumentException.value; - /// 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, - ); - } + set NSInvalidArgumentException(NSExceptionName value) => + _NSInvalidArgumentException.value = value; - late final _Dart_SetPausedOnStartPtr = - _lookup>( - 'Dart_SetPausedOnStart'); - late final _Dart_SetPausedOnStart = - _Dart_SetPausedOnStartPtr.asFunction(); + late final ffi.Pointer _NSInternalInconsistencyException = + _lookup('NSInternalInconsistencyException'); - /// 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(); - } + NSExceptionName get NSInternalInconsistencyException => + _NSInternalInconsistencyException.value; - late final _Dart_ShouldPauseOnExitPtr = - _lookup>( - 'Dart_ShouldPauseOnExit'); - late final _Dart_ShouldPauseOnExit = - _Dart_ShouldPauseOnExitPtr.asFunction(); + set NSInternalInconsistencyException(NSExceptionName value) => + _NSInternalInconsistencyException.value = value; - /// 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 ffi.Pointer _NSMallocException = + _lookup('NSMallocException'); - late final _Dart_SetShouldPauseOnExitPtr = - _lookup>( - 'Dart_SetShouldPauseOnExit'); - late final _Dart_SetShouldPauseOnExit = - _Dart_SetShouldPauseOnExitPtr.asFunction(); + NSExceptionName get NSMallocException => _NSMallocException.value; - /// 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(); - } + set NSMallocException(NSExceptionName value) => + _NSMallocException.value = value; - late final _Dart_IsPausedOnExitPtr = - _lookup>('Dart_IsPausedOnExit'); - late final _Dart_IsPausedOnExit = - _Dart_IsPausedOnExitPtr.asFunction(); + late final ffi.Pointer _NSObjectInaccessibleException = + _lookup('NSObjectInaccessibleException'); - /// 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, - ); - } + NSExceptionName get NSObjectInaccessibleException => + _NSObjectInaccessibleException.value; - late final _Dart_SetPausedOnExitPtr = - _lookup>( - 'Dart_SetPausedOnExit'); - late final _Dart_SetPausedOnExit = - _Dart_SetPausedOnExitPtr.asFunction(); + set NSObjectInaccessibleException(NSExceptionName value) => + _NSObjectInaccessibleException.value = value; - /// 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 ffi.Pointer _NSObjectNotAvailableException = + _lookup('NSObjectNotAvailableException'); - late final _Dart_SetStickyErrorPtr = - _lookup>( - 'Dart_SetStickyError'); - late final _Dart_SetStickyError = - _Dart_SetStickyErrorPtr.asFunction(); + NSExceptionName get NSObjectNotAvailableException => + _NSObjectNotAvailableException.value; - /// Does the current isolate have a sticky error? - bool Dart_HasStickyError() { - return _Dart_HasStickyError(); - } + set NSObjectNotAvailableException(NSExceptionName value) => + _NSObjectNotAvailableException.value = value; - late final _Dart_HasStickyErrorPtr = - _lookup>('Dart_HasStickyError'); - late final _Dart_HasStickyError = - _Dart_HasStickyErrorPtr.asFunction(); + late final ffi.Pointer _NSDestinationInvalidException = + _lookup('NSDestinationInvalidException'); - /// Gets the sticky error for the current isolate. - /// - /// \return A handle to the sticky error object or null. - Object Dart_GetStickyError() { - return _Dart_GetStickyError(); - } + NSExceptionName get NSDestinationInvalidException => + _NSDestinationInvalidException.value; - late final _Dart_GetStickyErrorPtr = - _lookup>('Dart_GetStickyError'); - late final _Dart_GetStickyError = - _Dart_GetStickyErrorPtr.asFunction(); + set NSDestinationInvalidException(NSExceptionName value) => + _NSDestinationInvalidException.value = value; - /// 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 ffi.Pointer _NSPortTimeoutException = + _lookup('NSPortTimeoutException'); - late final _Dart_HandleMessagePtr = - _lookup>('Dart_HandleMessage'); - late final _Dart_HandleMessage = - _Dart_HandleMessagePtr.asFunction(); + NSExceptionName get NSPortTimeoutException => _NSPortTimeoutException.value; - /// 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, - ); - } + set NSPortTimeoutException(NSExceptionName value) => + _NSPortTimeoutException.value = value; - late final _Dart_WaitForEventPtr = - _lookup>( - 'Dart_WaitForEvent'); - late final _Dart_WaitForEvent = - _Dart_WaitForEventPtr.asFunction(); + late final ffi.Pointer _NSInvalidSendPortException = + _lookup('NSInvalidSendPortException'); - /// 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(); - } + NSExceptionName get NSInvalidSendPortException => + _NSInvalidSendPortException.value; - late final _Dart_HandleServiceMessagesPtr = - _lookup>( - 'Dart_HandleServiceMessages'); - late final _Dart_HandleServiceMessages = - _Dart_HandleServiceMessagesPtr.asFunction(); + set NSInvalidSendPortException(NSExceptionName value) => + _NSInvalidSendPortException.value = value; - /// 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 ffi.Pointer _NSInvalidReceivePortException = + _lookup('NSInvalidReceivePortException'); - late final _Dart_HasServiceMessagesPtr = - _lookup>( - 'Dart_HasServiceMessages'); - late final _Dart_HasServiceMessages = - _Dart_HasServiceMessagesPtr.asFunction(); + NSExceptionName get NSInvalidReceivePortException => + _NSInvalidReceivePortException.value; - /// 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(); - } + set NSInvalidReceivePortException(NSExceptionName value) => + _NSInvalidReceivePortException.value = value; - late final _Dart_RunLoopPtr = - _lookup>('Dart_RunLoop'); - late final _Dart_RunLoop = _Dart_RunLoopPtr.asFunction(); + late final ffi.Pointer _NSPortSendException = + _lookup('NSPortSendException'); - /// 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, - ); - } + NSExceptionName get NSPortSendException => _NSPortSendException.value; - 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>)>(); + set NSPortSendException(NSExceptionName value) => + _NSPortSendException.value = value; - /// Gets the main port id for the current isolate. - int Dart_GetMainPortId() { - return _Dart_GetMainPortId(); - } + late final ffi.Pointer _NSPortReceiveException = + _lookup('NSPortReceiveException'); - late final _Dart_GetMainPortIdPtr = - _lookup>('Dart_GetMainPortId'); - late final _Dart_GetMainPortId = - _Dart_GetMainPortIdPtr.asFunction(); + NSExceptionName get NSPortReceiveException => _NSPortReceiveException.value; - /// Does the current isolate have live ReceivePorts? - /// - /// A ReceivePort is live when it has not been closed. - bool Dart_HasLivePorts() { - return _Dart_HasLivePorts(); - } + set NSPortReceiveException(NSExceptionName value) => + _NSPortReceiveException.value = value; - late final _Dart_HasLivePortsPtr = - _lookup>('Dart_HasLivePorts'); - late final _Dart_HasLivePorts = - _Dart_HasLivePortsPtr.asFunction(); + late final ffi.Pointer _NSOldStyleException = + _lookup('NSOldStyleException'); - /// 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, - ); - } + NSExceptionName get NSOldStyleException => _NSOldStyleException.value; - late final _Dart_PostPtr = - _lookup>( - 'Dart_Post'); - late final _Dart_Post = - _Dart_PostPtr.asFunction(); + set NSOldStyleException(NSExceptionName value) => + _NSOldStyleException.value = value; - /// 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, + 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_486( + ffi.Pointer obj, + ffi.Pointer sel, + NSExceptionName name, + ffi.Pointer reason, + ffi.Pointer userInfo, ) { - return _Dart_NewSendPort( - port_id, + return __objc_msgSend_486( + obj, + sel, + name, + reason, + userInfo, ); } - late final _Dart_NewSendPortPtr = - _lookup>( - 'Dart_NewSendPort'); - late final _Dart_NewSendPort = - _Dart_NewSendPortPtr.asFunction(); + late final __objc_msgSend_486Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + NSExceptionName, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_486 = __objc_msgSend_486Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + NSExceptionName, + ffi.Pointer, + ffi.Pointer)>(); - /// 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, + late final _sel_initWithName_reason_userInfo_1 = + _registerName1("initWithName:reason:userInfo:"); + instancetype _objc_msgSend_487( + ffi.Pointer obj, + ffi.Pointer sel, + NSExceptionName aName, + ffi.Pointer aReason, + ffi.Pointer aUserInfo, ) { - return _Dart_SendPortGetId( - port, - port_id, + return __objc_msgSend_487( + obj, + sel, + aName, + aReason, + aUserInfo, ); } - late final _Dart_SendPortGetIdPtr = _lookup< + late final __objc_msgSend_487Ptr = _lookup< ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Pointer)>>('Dart_SendPortGetId'); - late final _Dart_SendPortGetId = _Dart_SendPortGetIdPtr.asFunction< - Object Function(Object, ffi.Pointer)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + NSExceptionName, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_487 = __objc_msgSend_487Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + NSExceptionName, ffi.Pointer, 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 _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_488( + ffi.Pointer obj, + ffi.Pointer sel, + NSExceptionName name, + ffi.Pointer format, + va_list argList, + ) { + return __objc_msgSend_488( + obj, + sel, + name, + format, + argList, + ); } - late final _Dart_EnterScopePtr = - _lookup>('Dart_EnterScope'); - late final _Dart_EnterScope = - _Dart_EnterScopePtr.asFunction(); + late final __objc_msgSend_488Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + NSExceptionName, + ffi.Pointer, + va_list)>>('objc_msgSend'); + late final __objc_msgSend_488 = __objc_msgSend_488Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + NSExceptionName, ffi.Pointer, va_list)>(); - /// 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(); + ffi.Pointer NSGetUncaughtExceptionHandler() { + return _NSGetUncaughtExceptionHandler(); } - late final _Dart_ExitScopePtr = - _lookup>('Dart_ExitScope'); - late final _Dart_ExitScope = _Dart_ExitScopePtr.asFunction(); + late final _NSGetUncaughtExceptionHandlerPtr = _lookup< + ffi + .NativeFunction Function()>>( + 'NSGetUncaughtExceptionHandler'); + late final _NSGetUncaughtExceptionHandler = _NSGetUncaughtExceptionHandlerPtr + .asFunction Function()>(); - /// 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, + void NSSetUncaughtExceptionHandler( + ffi.Pointer arg0, ) { - return _Dart_ScopeAllocate( - size, + return _NSSetUncaughtExceptionHandler( + arg0, ); } - late final _Dart_ScopeAllocatePtr = - _lookup Function(ffi.IntPtr)>>( - 'Dart_ScopeAllocate'); - late final _Dart_ScopeAllocate = - _Dart_ScopeAllocatePtr.asFunction Function(int)>(); + late final _NSSetUncaughtExceptionHandlerPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer)>>( + 'NSSetUncaughtExceptionHandler'); + late final _NSSetUncaughtExceptionHandler = _NSSetUncaughtExceptionHandlerPtr + .asFunction)>(); - /// Returns the null object. - /// - /// \return A handle to the null object. - Object Dart_Null() { - return _Dart_Null(); + 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_489( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_489( + obj, + sel, + ); } - late final _Dart_NullPtr = - _lookup>('Dart_Null'); - late final _Dart_Null = _Dart_NullPtr.asFunction(); + 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)>(); - /// Is this object null? - bool Dart_IsNull( - Object object, + late final _sel_handleFailureInMethod_object_file_lineNumber_description_1 = + _registerName1( + "handleFailureInMethod:object:file:lineNumber:description:"); + void _objc_msgSend_490( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer selector, + ffi.Pointer object, + ffi.Pointer fileName, + int line, + ffi.Pointer format, ) { - return _Dart_IsNull( + return __objc_msgSend_490( + obj, + sel, + selector, object, + fileName, + line, + format, ); } - 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(); + late final __objc_msgSend_490Ptr = _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_490 = __objc_msgSend_490Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); - /// 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, + late final _sel_handleFailureInFunction_file_lineNumber_description_1 = + _registerName1("handleFailureInFunction:file:lineNumber:description:"); + void _objc_msgSend_491( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer functionName, + ffi.Pointer fileName, + int line, + ffi.Pointer format, ) { - return _Dart_ObjectEquals( - obj1, - obj2, - equal, + return __objc_msgSend_491( + obj, + sel, + functionName, + fileName, + line, + format, ); } - late final _Dart_ObjectEqualsPtr = _lookup< + late final __objc_msgSend_491Ptr = _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)>(); + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSInteger, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_491 = __objc_msgSend_491Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + 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, + late final _class_NSBlockOperation1 = _getClass1("NSBlockOperation"); + late final _sel_blockOperationWithBlock_1 = + _registerName1("blockOperationWithBlock:"); + instancetype _objc_msgSend_492( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> block, ) { - return _Dart_ObjectIsType( - object, - type, - instanceof, + return __objc_msgSend_492( + obj, + sel, + block, ); } - late final _Dart_ObjectIsTypePtr = _lookup< + late final __objc_msgSend_492Ptr = _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)>(); + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_492 = __objc_msgSend_492Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - /// Query object type. - /// - /// \param object Some Object. - /// - /// \return true if Object is of the specified type. - bool Dart_IsInstance( - Object object, + 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_493( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer target, + ffi.Pointer sel1, + ffi.Pointer arg, ) { - return _Dart_IsInstance( - object, + return __objc_msgSend_493( + obj, + sel, + target, + sel1, + arg, ); } - late final _Dart_IsInstancePtr = - _lookup>( - 'Dart_IsInstance'); - late final _Dart_IsInstance = - _Dart_IsInstancePtr.asFunction(); + late final __objc_msgSend_493Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_493 = __objc_msgSend_493Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - bool Dart_IsNumber( - Object object, + late final _sel_initWithInvocation_1 = _registerName1("initWithInvocation:"); + instancetype _objc_msgSend_494( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer inv, ) { - return _Dart_IsNumber( - object, + return __objc_msgSend_494( + obj, + sel, + inv, ); } - late final _Dart_IsNumberPtr = - _lookup>( - 'Dart_IsNumber'); - late final _Dart_IsNumber = - _Dart_IsNumberPtr.asFunction(); + late final __objc_msgSend_494Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_494 = __objc_msgSend_494Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - bool Dart_IsInteger( - Object object, + late final _sel_invocation1 = _registerName1("invocation"); + ffi.Pointer _objc_msgSend_495( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _Dart_IsInteger( - object, + return __objc_msgSend_495( + obj, + sel, ); } - late final _Dart_IsIntegerPtr = - _lookup>( - 'Dart_IsInteger'); - late final _Dart_IsInteger = - _Dart_IsIntegerPtr.asFunction(); + late final __objc_msgSend_495Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_495 = __objc_msgSend_495Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - bool Dart_IsDouble( - Object object, - ) { - return _Dart_IsDouble( - object, - ); - } + late final _sel_result1 = _registerName1("result"); + late final ffi.Pointer + _NSInvocationOperationVoidResultException = + _lookup('NSInvocationOperationVoidResultException'); - late final _Dart_IsDoublePtr = - _lookup>( - 'Dart_IsDouble'); - late final _Dart_IsDouble = - _Dart_IsDoublePtr.asFunction(); + NSExceptionName get NSInvocationOperationVoidResultException => + _NSInvocationOperationVoidResultException.value; - bool Dart_IsBoolean( - Object object, - ) { - return _Dart_IsBoolean( - object, - ); - } + set NSInvocationOperationVoidResultException(NSExceptionName value) => + _NSInvocationOperationVoidResultException.value = value; - late final _Dart_IsBooleanPtr = - _lookup>( - 'Dart_IsBoolean'); - late final _Dart_IsBoolean = - _Dart_IsBooleanPtr.asFunction(); + late final ffi.Pointer + _NSInvocationOperationCancelledException = + _lookup('NSInvocationOperationCancelledException'); - bool Dart_IsString( - Object object, - ) { - return _Dart_IsString( - object, - ); - } + NSExceptionName get NSInvocationOperationCancelledException => + _NSInvocationOperationCancelledException.value; - late final _Dart_IsStringPtr = - _lookup>( - 'Dart_IsString'); - late final _Dart_IsString = - _Dart_IsStringPtr.asFunction(); + set NSInvocationOperationCancelledException(NSExceptionName value) => + _NSInvocationOperationCancelledException.value = value; - bool Dart_IsStringLatin1( - Object object, - ) { - return _Dart_IsStringLatin1( - object, - ); - } + late final ffi.Pointer + _NSOperationQueueDefaultMaxConcurrentOperationCount = + _lookup('NSOperationQueueDefaultMaxConcurrentOperationCount'); - late final _Dart_IsStringLatin1Ptr = - _lookup>( - 'Dart_IsStringLatin1'); - late final _Dart_IsStringLatin1 = - _Dart_IsStringLatin1Ptr.asFunction(); + int get NSOperationQueueDefaultMaxConcurrentOperationCount => + _NSOperationQueueDefaultMaxConcurrentOperationCount.value; - bool Dart_IsExternalString( - Object object, - ) { - return _Dart_IsExternalString( - object, - ); - } + set NSOperationQueueDefaultMaxConcurrentOperationCount(int value) => + _NSOperationQueueDefaultMaxConcurrentOperationCount.value = value; - late final _Dart_IsExternalStringPtr = - _lookup>( - 'Dart_IsExternalString'); - late final _Dart_IsExternalString = - _Dart_IsExternalStringPtr.asFunction(); + /// Predefined domain for errors from most AppKit and Foundation APIs. + late final ffi.Pointer _NSCocoaErrorDomain = + _lookup('NSCocoaErrorDomain'); - bool Dart_IsList( - Object object, - ) { - return _Dart_IsList( - object, - ); - } + NSErrorDomain get NSCocoaErrorDomain => _NSCocoaErrorDomain.value; - late final _Dart_IsListPtr = - _lookup>('Dart_IsList'); - late final _Dart_IsList = _Dart_IsListPtr.asFunction(); + set NSCocoaErrorDomain(NSErrorDomain value) => + _NSCocoaErrorDomain.value = value; - bool Dart_IsMap( - Object object, - ) { - return _Dart_IsMap( - object, - ); - } + /// Other predefined domains; value of "code" will correspond to preexisting values in these domains. + late final ffi.Pointer _NSPOSIXErrorDomain = + _lookup('NSPOSIXErrorDomain'); - late final _Dart_IsMapPtr = - _lookup>('Dart_IsMap'); - late final _Dart_IsMap = _Dart_IsMapPtr.asFunction(); + NSErrorDomain get NSPOSIXErrorDomain => _NSPOSIXErrorDomain.value; - bool Dart_IsLibrary( - Object object, - ) { - return _Dart_IsLibrary( - object, - ); - } + set NSPOSIXErrorDomain(NSErrorDomain value) => + _NSPOSIXErrorDomain.value = value; - late final _Dart_IsLibraryPtr = - _lookup>( - 'Dart_IsLibrary'); - late final _Dart_IsLibrary = - _Dart_IsLibraryPtr.asFunction(); + late final ffi.Pointer _NSOSStatusErrorDomain = + _lookup('NSOSStatusErrorDomain'); - bool Dart_IsType( - Object handle, - ) { - return _Dart_IsType( - handle, - ); - } + NSErrorDomain get NSOSStatusErrorDomain => _NSOSStatusErrorDomain.value; - late final _Dart_IsTypePtr = - _lookup>('Dart_IsType'); - late final _Dart_IsType = _Dart_IsTypePtr.asFunction(); + set NSOSStatusErrorDomain(NSErrorDomain value) => + _NSOSStatusErrorDomain.value = value; - bool Dart_IsFunction( - Object handle, - ) { - return _Dart_IsFunction( - handle, - ); - } + late final ffi.Pointer _NSMachErrorDomain = + _lookup('NSMachErrorDomain'); - late final _Dart_IsFunctionPtr = - _lookup>( - 'Dart_IsFunction'); - late final _Dart_IsFunction = - _Dart_IsFunctionPtr.asFunction(); + NSErrorDomain get NSMachErrorDomain => _NSMachErrorDomain.value; - bool Dart_IsVariable( - Object handle, - ) { - return _Dart_IsVariable( - handle, - ); - } + set NSMachErrorDomain(NSErrorDomain value) => + _NSMachErrorDomain.value = value; - late final _Dart_IsVariablePtr = - _lookup>( - 'Dart_IsVariable'); - late final _Dart_IsVariable = - _Dart_IsVariablePtr.asFunction(); + /// 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'); - bool Dart_IsTypeVariable( - Object handle, - ) { - return _Dart_IsTypeVariable( - handle, - ); - } + NSErrorUserInfoKey get NSUnderlyingErrorKey => _NSUnderlyingErrorKey.value; - late final _Dart_IsTypeVariablePtr = - _lookup>( - 'Dart_IsTypeVariable'); - late final _Dart_IsTypeVariable = - _Dart_IsTypeVariablePtr.asFunction(); + set NSUnderlyingErrorKey(NSErrorUserInfoKey value) => + _NSUnderlyingErrorKey.value = value; - bool Dart_IsClosure( - Object object, - ) { - return _Dart_IsClosure( - object, - ); - } + /// 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'); - late final _Dart_IsClosurePtr = - _lookup>( - 'Dart_IsClosure'); - late final _Dart_IsClosure = - _Dart_IsClosurePtr.asFunction(); + NSErrorUserInfoKey get NSMultipleUnderlyingErrorsKey => + _NSMultipleUnderlyingErrorsKey.value; - bool Dart_IsTypedData( - Object object, - ) { - return _Dart_IsTypedData( - object, - ); - } + set NSMultipleUnderlyingErrorsKey(NSErrorUserInfoKey value) => + _NSMultipleUnderlyingErrorsKey.value = value; - late final _Dart_IsTypedDataPtr = - _lookup>( - 'Dart_IsTypedData'); - late final _Dart_IsTypedData = - _Dart_IsTypedDataPtr.asFunction(); + /// NSString, a complete sentence (or more) describing ideally both what failed and why it failed. + late final ffi.Pointer _NSLocalizedDescriptionKey = + _lookup('NSLocalizedDescriptionKey'); - bool Dart_IsByteBuffer( - Object object, - ) { - return _Dart_IsByteBuffer( - object, - ); - } + NSErrorUserInfoKey get NSLocalizedDescriptionKey => + _NSLocalizedDescriptionKey.value; - late final _Dart_IsByteBufferPtr = - _lookup>( - 'Dart_IsByteBuffer'); - late final _Dart_IsByteBuffer = - _Dart_IsByteBufferPtr.asFunction(); + set NSLocalizedDescriptionKey(NSErrorUserInfoKey value) => + _NSLocalizedDescriptionKey.value = value; - bool Dart_IsFuture( - Object object, - ) { - return _Dart_IsFuture( - object, - ); - } + /// NSString, a complete sentence (or more) describing why the operation failed. + late final ffi.Pointer _NSLocalizedFailureReasonErrorKey = + _lookup('NSLocalizedFailureReasonErrorKey'); - late final _Dart_IsFuturePtr = - _lookup>( - 'Dart_IsFuture'); - late final _Dart_IsFuture = - _Dart_IsFuturePtr.asFunction(); + NSErrorUserInfoKey get NSLocalizedFailureReasonErrorKey => + _NSLocalizedFailureReasonErrorKey.value; - /// 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, - ); - } + set NSLocalizedFailureReasonErrorKey(NSErrorUserInfoKey value) => + _NSLocalizedFailureReasonErrorKey.value = value; - late final _Dart_InstanceGetTypePtr = - _lookup>( - 'Dart_InstanceGetType'); - late final _Dart_InstanceGetType = - _Dart_InstanceGetTypePtr.asFunction(); + /// NSString, a complete sentence (or more) describing what the user can do to fix the problem. + late final ffi.Pointer + _NSLocalizedRecoverySuggestionErrorKey = + _lookup('NSLocalizedRecoverySuggestionErrorKey'); - /// 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, - ); - } + NSErrorUserInfoKey get NSLocalizedRecoverySuggestionErrorKey => + _NSLocalizedRecoverySuggestionErrorKey.value; - late final _Dart_ClassNamePtr = - _lookup>( - 'Dart_ClassName'); - late final _Dart_ClassName = - _Dart_ClassNamePtr.asFunction(); + set NSLocalizedRecoverySuggestionErrorKey(NSErrorUserInfoKey value) => + _NSLocalizedRecoverySuggestionErrorKey.value = value; - /// Returns the name for the provided function or method. + /// 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? /// - /// \return A valid string handle if no error occurs during the - /// operation. - Object Dart_FunctionName( - Object function, + /// Requires there to be a current isolate. + bool Dart_IsError( + Object handle, ) { - return _Dart_FunctionName( - function, + return _Dart_IsError( + handle, ); } - late final _Dart_FunctionNamePtr = - _lookup>( - 'Dart_FunctionName'); - late final _Dart_FunctionName = - _Dart_FunctionNamePtr.asFunction(); + late final _Dart_IsErrorPtr = + _lookup>( + 'Dart_IsError'); + late final _Dart_IsError = + _Dart_IsErrorPtr.asFunction(); - /// Returns a handle to the owner of a function. + /// Is this an api error handle? /// - /// 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. + /// 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. /// - /// \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, + /// Requires there to be a current isolate. + bool Dart_IsApiError( + Object handle, ) { - return _Dart_FunctionOwner( - function, + return _Dart_IsApiError( + handle, ); } - late final _Dart_FunctionOwnerPtr = - _lookup>( - 'Dart_FunctionOwner'); - late final _Dart_FunctionOwner = - _Dart_FunctionOwnerPtr.asFunction(); + late final _Dart_IsApiErrorPtr = + _lookup>( + 'Dart_IsApiError'); + late final _Dart_IsApiError = + _Dart_IsApiErrorPtr.asFunction(); - /// Determines whether a function handle referes to a static function - /// of method. + /// Is this an unhandled exception error handle? /// - /// For the purposes of the embedding API, a top-level function is - /// implicitly declared static. + /// 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. /// - /// \param function A handle to a function or method declaration. - /// \param is_static Returns whether the function or method is declared static. + /// See Dart_ErrorGetException and Dart_ErrorGetStackTrace. /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_FunctionIsStatic( - Object function, - ffi.Pointer is_static, + /// Requires there to be a current isolate. + bool Dart_IsUnhandledExceptionError( + Object handle, ) { - return _Dart_FunctionIsStatic( - function, - is_static, + return _Dart_IsUnhandledExceptionError( + handle, ); } - 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_IsUnhandledExceptionErrorPtr = + _lookup>( + 'Dart_IsUnhandledExceptionError'); + late final _Dart_IsUnhandledExceptionError = + _Dart_IsUnhandledExceptionErrorPtr.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. + /// Is this a compilation error handle? /// - /// \param object Some Object. + /// 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. /// - /// \return true if Object is a tear-off. - bool Dart_IsTearOff( - Object object, + /// Requires there to be a current isolate. + bool Dart_IsCompilationError( + Object handle, ) { - return _Dart_IsTearOff( - object, + return _Dart_IsCompilationError( + handle, ); } - late final _Dart_IsTearOffPtr = + late final _Dart_IsCompilationErrorPtr = _lookup>( - 'Dart_IsTearOff'); - late final _Dart_IsTearOff = - _Dart_IsTearOffPtr.asFunction(); + 'Dart_IsCompilationError'); + late final _Dart_IsCompilationError = + _Dart_IsCompilationErrorPtr.asFunction(); - /// Retrieves the function of a closure. + /// Is this a fatal error handle? /// - /// \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, + /// 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_ClosureFunction( - closure, + return _Dart_IsFatalError( + handle, ); } - late final _Dart_ClosureFunctionPtr = - _lookup>( - 'Dart_ClosureFunction'); - late final _Dart_ClosureFunction = - _Dart_ClosureFunctionPtr.asFunction(); + late final _Dart_IsFatalErrorPtr = + _lookup>( + 'Dart_IsFatalError'); + late final _Dart_IsFatalError = + _Dart_IsFatalErrorPtr.asFunction(); - /// Returns a handle to the library which contains class. + /// Gets the error message from an error handle. /// - /// \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, + /// 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_ClassLibrary( - cls_type, + return _Dart_GetError( + handle, ); } - late final _Dart_ClassLibraryPtr = - _lookup>( - 'Dart_ClassLibrary'); - late final _Dart_ClassLibrary = - _Dart_ClassLibraryPtr.asFunction(); + late final _Dart_GetErrorPtr = + _lookup Function(ffi.Handle)>>( + 'Dart_GetError'); + late final _Dart_GetError = + _Dart_GetErrorPtr.asFunction Function(Object)>(); - /// 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, + /// Is this an error handle for an unhandled exception? + bool Dart_ErrorHasException( + Object handle, ) { - return _Dart_IntegerFitsIntoInt64( - integer, - fits, + return _Dart_ErrorHasException( + handle, ); } - 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_ErrorHasExceptionPtr = + _lookup>( + 'Dart_ErrorHasException'); + late final _Dart_ErrorHasException = + _Dart_ErrorHasExceptionPtr.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, + /// Gets the exception Object from an unhandled exception error handle. + Object Dart_ErrorGetException( + Object handle, ) { - return _Dart_IntegerFitsIntoUint64( - integer, - fits, + return _Dart_ErrorGetException( + handle, ); } - 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_ErrorGetExceptionPtr = + _lookup>( + 'Dart_ErrorGetException'); + late final _Dart_ErrorGetException = + _Dart_ErrorGetExceptionPtr.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, + /// Gets the stack trace Object from an unhandled exception error handle. + Object Dart_ErrorGetStackTrace( + Object handle, ) { - return _Dart_NewInteger( - value, + return _Dart_ErrorGetStackTrace( + handle, ); } - late final _Dart_NewIntegerPtr = - _lookup>( - 'Dart_NewInteger'); - late final _Dart_NewInteger = - _Dart_NewIntegerPtr.asFunction(); + late final _Dart_ErrorGetStackTracePtr = + _lookup>( + 'Dart_ErrorGetStackTrace'); + late final _Dart_ErrorGetStackTrace = + _Dart_ErrorGetStackTracePtr.asFunction(); - /// Returns an Integer with the provided value. + /// Produces an api error handle with the provided error message. /// - /// \param value The unsigned value of the integer. + /// Requires there to be a current isolate. /// - /// \return The Integer object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewIntegerFromUint64( - int value, + /// \param error the error message. + Object Dart_NewApiError( + ffi.Pointer error, ) { - return _Dart_NewIntegerFromUint64( - value, + return _Dart_NewApiError( + error, ); } - late final _Dart_NewIntegerFromUint64Ptr = - _lookup>( - 'Dart_NewIntegerFromUint64'); - late final _Dart_NewIntegerFromUint64 = - _Dart_NewIntegerFromUint64Ptr.asFunction(); + late final _Dart_NewApiErrorPtr = + _lookup)>>( + 'Dart_NewApiError'); + late final _Dart_NewApiError = + _Dart_NewApiErrorPtr.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, + Object Dart_NewCompilationError( + ffi.Pointer error, ) { - return _Dart_NewIntegerFromHexCString( - value, + return _Dart_NewCompilationError( + error, ); } - late final _Dart_NewIntegerFromHexCStringPtr = + late final _Dart_NewCompilationErrorPtr = _lookup)>>( - 'Dart_NewIntegerFromHexCString'); - late final _Dart_NewIntegerFromHexCString = _Dart_NewIntegerFromHexCStringPtr + 'Dart_NewCompilationError'); + late final _Dart_NewCompilationError = _Dart_NewCompilationErrorPtr .asFunction)>(); - /// Gets the value of an Integer. - /// - /// The integer must fit into a 64-bit signed integer, otherwise an error occurs. + /// Produces a new unhandled exception error handle. /// - /// \param integer An Integer. - /// \param value Returns the value of the Integer. + /// Requires there to be a current isolate. /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_IntegerToInt64( - Object integer, - ffi.Pointer value, + /// \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_IntegerToInt64( - integer, - value, + return _Dart_NewUnhandledExceptionError( + exception, ); } - 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)>(); + late final _Dart_NewUnhandledExceptionErrorPtr = + _lookup>( + 'Dart_NewUnhandledExceptionError'); + late final _Dart_NewUnhandledExceptionError = + _Dart_NewUnhandledExceptionErrorPtr.asFunction(); - /// Gets the value of an Integer. + /// Propagates an error. /// - /// The integer must fit into a 64-bit unsigned integer, otherwise an - /// error occurs. + /// 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. /// - /// \param integer An Integer. - /// \param value Returns the value of the Integer. + /// 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. /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_IntegerToUint64( - Object integer, - ffi.Pointer value, + /// 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_IntegerToUint64( - integer, - value, + return _Dart_PropagateError( + handle, ); } - 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_PropagateErrorPtr = + _lookup>( + 'Dart_PropagateError'); + late final _Dart_PropagateError = + _Dart_PropagateErrorPtr.asFunction(); - /// Gets the value of an integer as a hexadecimal C string. + /// Converts an object to a 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. + /// May generate an unhandled exception error. /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_IntegerToHexCString( - Object integer, - ffi.Pointer> value, + /// \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_IntegerToHexCString( - integer, - value, + return _Dart_ToString( + 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_ToStringPtr = + _lookup>( + 'Dart_ToString'); + late final _Dart_ToString = + _Dart_ToStringPtr.asFunction(); - /// Returns a Double with the provided value. + /// Checks to see if two handles refer to identically equal objects. /// - /// \param value A double. + /// 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. /// - /// \return The Double object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewDouble( - double value, + /// \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_NewDouble( - value, + return _Dart_IdentityEquals( + obj1, + obj2, ); } - late final _Dart_NewDoublePtr = - _lookup>( - 'Dart_NewDouble'); - late final _Dart_NewDouble = - _Dart_NewDoublePtr.asFunction(); + late final _Dart_IdentityEqualsPtr = + _lookup>( + 'Dart_IdentityEquals'); + late final _Dart_IdentityEquals = + _Dart_IdentityEqualsPtr.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, + /// Allocates a handle in the current scope from a persistent handle. + Object Dart_HandleFromPersistent( + Object object, ) { - return _Dart_DoubleValue( - double_obj, - value, + return _Dart_HandleFromPersistent( + object, ); } - 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)>(); + late final _Dart_HandleFromPersistentPtr = + _lookup>( + 'Dart_HandleFromPersistent'); + late final _Dart_HandleFromPersistent = + _Dart_HandleFromPersistentPtr.asFunction(); - /// 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 + /// Allocates a handle in the current scope from a weak persistent handle. /// - /// \return A valid Dart instance if no error occurs during the operation. - Object Dart_GetStaticMethodClosure( - Object library1, - Object cls_type, - Object function_name, + /// This will be a handle to Dart_Null if the object has been garbage collected. + Object Dart_HandleFromWeakPersistent( + Dart_WeakPersistentHandle object, ) { - return _Dart_GetStaticMethodClosure( - library1, - cls_type, - function_name, + return _Dart_HandleFromWeakPersistent( + object, ); } - 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_HandleFromWeakPersistentPtr = _lookup< + ffi.NativeFunction>( + 'Dart_HandleFromWeakPersistent'); + late final _Dart_HandleFromWeakPersistent = _Dart_HandleFromWeakPersistentPtr + .asFunction(); - /// Returns the True object. - /// - /// Requires there to be a current isolate. + /// Allocates a persistent handle for an object. /// - /// \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. + /// 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. - /// - /// \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, + Object Dart_NewPersistentHandle( + Object object, ) { - return _Dart_NewBoolean( - value, + return _Dart_NewPersistentHandle( + object, ); } - late final _Dart_NewBooleanPtr = - _lookup>( - 'Dart_NewBoolean'); - late final _Dart_NewBoolean = - _Dart_NewBooleanPtr.asFunction(); + late final _Dart_NewPersistentHandlePtr = + _lookup>( + 'Dart_NewPersistentHandle'); + late final _Dart_NewPersistentHandle = + _Dart_NewPersistentHandlePtr.asFunction(); - /// Gets the value of a Boolean - /// - /// \param boolean_obj A Boolean - /// \param value Returns the value of the Boolean. + /// Assign value of local handle to a persistent handle. /// - /// \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. + /// Requires there to be a current isolate. /// - /// \param str A String. - /// \param length Returns the length of the String. + /// \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 A valid handle if no error occurs during the operation. - Object Dart_StringLength( - Object str, - ffi.Pointer length, + /// \return Success if the persistent handle was set + /// Otherwise, returns an error. + void Dart_SetPersistentHandle( + Object obj1, + Object obj2, ) { - return _Dart_StringLength( - str, - length, + return _Dart_SetPersistentHandle( + obj1, + obj2, ); } - 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)>(); + late final _Dart_SetPersistentHandlePtr = + _lookup>( + 'Dart_SetPersistentHandle'); + late final _Dart_SetPersistentHandle = + _Dart_SetPersistentHandlePtr.asFunction(); - /// 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 + /// Deallocates a persistent handle. /// - /// \return The String object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewStringFromCString( - ffi.Pointer str, + /// Requires there to be a current isolate group. + void Dart_DeletePersistentHandle( + Object object, ) { - return _Dart_NewStringFromCString( - str, + return _Dart_DeletePersistentHandle( + object, ); } - late final _Dart_NewStringFromCStringPtr = - _lookup)>>( - 'Dart_NewStringFromCString'); - late final _Dart_NewStringFromCString = _Dart_NewStringFromCStringPtr - .asFunction)>(); + late final _Dart_DeletePersistentHandlePtr = + _lookup>( + 'Dart_DeletePersistentHandle'); + late final _Dart_DeletePersistentHandle = + _Dart_DeletePersistentHandlePtr.asFunction(); - /// Returns a String built from an array of UTF-8 encoded characters. + /// Allocates a weak persistent handle for an object. /// - /// \param utf8_array An array of UTF-8 encoded characters. - /// \param length The length of the codepoints array. + /// This handle has the lifetime of the current isolate. The handle can also be + /// explicitly deallocated by calling Dart_DeleteWeakPersistentHandle. /// - /// \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. + /// 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. /// - /// \param utf16_array An array of UTF-16 encoded characters. - /// \param length The length of the codepoints array. + /// Requires there to be a current isolate. /// - /// \return The String object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewStringFromUTF16( - ffi.Pointer utf16_array, - int length, + /// \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_NewStringFromUTF16( - utf16_array, - length, + return _Dart_NewWeakPersistentHandle( + object, + peer, + external_allocation_size, + callback, ); } - late final _Dart_NewStringFromUTF16Ptr = _lookup< + late final _Dart_NewWeakPersistentHandlePtr = _lookup< ffi.NativeFunction< - ffi.Handle Function( - ffi.Pointer, ffi.IntPtr)>>('Dart_NewStringFromUTF16'); - late final _Dart_NewStringFromUTF16 = _Dart_NewStringFromUTF16Ptr.asFunction< - Object Function(ffi.Pointer, int)>(); + 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)>(); - /// 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. + /// Deletes the given weak persistent [object] handle. /// - /// \return The String object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewStringFromUTF32( - ffi.Pointer utf32_array, - int length, + /// Requires there to be a current isolate group. + void Dart_DeleteWeakPersistentHandle( + Dart_WeakPersistentHandle object, ) { - return _Dart_NewStringFromUTF32( - utf32_array, - length, + return _Dart_DeleteWeakPersistentHandle( + 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_DeleteWeakPersistentHandlePtr = + _lookup>( + 'Dart_DeleteWeakPersistentHandle'); + late final _Dart_DeleteWeakPersistentHandle = + _Dart_DeleteWeakPersistentHandlePtr.asFunction< + void Function(Dart_WeakPersistentHandle)>(); - /// 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. + /// Updates the external memory size for the given weak persistent handle. /// - /// \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, + /// May trigger garbage collection. + void Dart_UpdateExternalSize( + Dart_WeakPersistentHandle object, int external_allocation_size, - Dart_HandleFinalizer callback, ) { - return _Dart_NewExternalLatin1String( - latin1_array, - length, - peer, + return _Dart_UpdateExternalSize( + object, external_allocation_size, - callback, ); } - late final _Dart_NewExternalLatin1StringPtr = _lookup< + late final _Dart_UpdateExternalSizePtr = _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)>(); + ffi.Void Function(Dart_WeakPersistentHandle, + ffi.IntPtr)>>('Dart_UpdateExternalSize'); + late final _Dart_UpdateExternalSize = _Dart_UpdateExternalSizePtr.asFunction< + void Function(Dart_WeakPersistentHandle, int)>(); - /// Returns a String which references an external array of UTF-16 encoded - /// characters. + /// Allocates a finalizable handle for an object. /// - /// \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. + /// 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 callback to be called when this string is finalized. + /// \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 String object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewExternalUTF16String( - ffi.Pointer utf16_array, - int length, + /// \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_NewExternalUTF16String( - utf16_array, - length, + return _Dart_NewFinalizableHandle( + object, peer, external_allocation_size, callback, ); } - late final _Dart_NewExternalUTF16StringPtr = _lookup< + late final _Dart_NewFinalizableHandlePtr = _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)>(); + 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)>(); - /// Gets the C string representation of a String. - /// (It is a sequence of UTF-8 encoded values with a '\0' termination.) + /// Deletes the given finalizable [object] handle. /// - /// \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. + /// 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. /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_StringToCString( - Object str, - ffi.Pointer> cstr, + /// Requires there to be a current isolate. + void Dart_DeleteFinalizableHandle( + Dart_FinalizableHandle object, + Object strong_ref_to_object, ) { - return _Dart_StringToCString( - str, - cstr, + return _Dart_DeleteFinalizableHandle( + object, + strong_ref_to_object, ); } - late final _Dart_StringToCStringPtr = _lookup< + late final _Dart_DeleteFinalizableHandlePtr = _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.Void Function(Dart_FinalizableHandle, + ffi.Handle)>>('Dart_DeleteFinalizableHandle'); + late final _Dart_DeleteFinalizableHandle = _Dart_DeleteFinalizableHandlePtr + .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. + /// Updates the external memory size for the given finalizable handle. /// - /// \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. + /// 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. /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_StringToUTF8( - Object str, - ffi.Pointer> utf8_array, - ffi.Pointer length, + /// May trigger garbage collection. + void Dart_UpdateFinalizableExternalSize( + Dart_FinalizableHandle object, + Object strong_ref_to_object, + int external_allocation_size, ) { - return _Dart_StringToUTF8( - str, - utf8_array, - length, + return _Dart_UpdateFinalizableExternalSize( + object, + strong_ref_to_object, + external_allocation_size, ); } - late final _Dart_StringToUTF8Ptr = _lookup< + late final _Dart_UpdateFinalizableExternalSizePtr = _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)>(); + 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 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. + /// Gets the version string for the Dart VM. /// - /// \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. + /// 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_StringToLatin1( - Object str, - ffi.Pointer latin1_array, - ffi.Pointer length, - ) { - return _Dart_StringToLatin1( - str, - latin1_array, - length, - ); + /// \return The version string for the embedded Dart VM. + ffi.Pointer Dart_VersionString() { + return _Dart_VersionString(); } - 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_VersionStringPtr = + _lookup Function()>>( + 'Dart_VersionString'); + late final _Dart_VersionString = + _Dart_VersionStringPtr.asFunction Function()>(); - /// 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, + /// Initialize Dart_IsolateFlags with correct version and default values. + void Dart_IsolateFlagsInitialize( + ffi.Pointer flags, ) { - return _Dart_StringToUTF16( - str, - utf16_array, - length, + return _Dart_IsolateFlagsInitialize( + flags, ); } - 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_IsolateFlagsInitializePtr = _lookup< + ffi + .NativeFunction)>>( + 'Dart_IsolateFlagsInitialize'); + late final _Dart_IsolateFlagsInitialize = _Dart_IsolateFlagsInitializePtr + .asFunction)>(); - /// Gets the storage size in bytes of a String. + /// Initializes the VM. /// - /// \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. + /// \param params A struct containing initialization information. The version + /// field of the struct must be DART_INITIALIZE_PARAMS_CURRENT_VERSION. /// - /// \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 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_StringGetProperties( - str, - char_size, - str_len, - peer, + return _Dart_Initialize( + params, ); } - late final _Dart_StringGetPropertiesPtr = _lookup< + late final _Dart_InitializePtr = _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(); + ffi.Pointer Function( + ffi.Pointer)>>('Dart_Initialize'); + late final _Dart_Initialize = _Dart_InitializePtr.asFunction< + ffi.Pointer Function(ffi.Pointer)>(); - /// 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. + /// Cleanup state in the VM before process termination. /// - /// \param length The length of the list. + /// \return NULL if cleanup is successful. Returns an error message otherwise. + /// The caller is responsible for freeing the error message. /// - /// \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, - ); + /// 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_NewListOfTypePtr = - _lookup>( - 'Dart_NewListOfType'); - late final _Dart_NewListOfType = - _Dart_NewListOfTypePtr.asFunction(); + late final _Dart_CleanupPtr = + _lookup Function()>>( + 'Dart_Cleanup'); + late final _Dart_Cleanup = + _Dart_CleanupPtr.asFunction Function()>(); - /// 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. + /// Sets command line flags. Should be called before Dart_Initialize. /// - /// \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 argc The length of the arguments array. + /// \param argv An array of arguments. /// - /// \param length The length of the list. + /// \return NULL if successful. Returns an error message otherwise. + /// The caller is responsible for freeing the error message. /// - /// \return The List object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewListOfTypeFilled( - Object element_type, - Object fill_object, - int length, + /// NOTE: This call does not store references to the passed in c-strings. + ffi.Pointer Dart_SetVMFlags( + int argc, + ffi.Pointer> argv, ) { - return _Dart_NewListOfTypeFilled( - element_type, - fill_object, - length, + return _Dart_SetVMFlags( + argc, + argv, ); } - late final _Dart_NewListOfTypeFilledPtr = _lookup< + late final _Dart_SetVMFlagsPtr = _lookup< ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Handle, ffi.IntPtr)>>('Dart_NewListOfTypeFilled'); - late final _Dart_NewListOfTypeFilled = _Dart_NewListOfTypeFilledPtr - .asFunction(); + ffi.Pointer Function( + ffi.Int, ffi.Pointer>)>>('Dart_SetVMFlags'); + late final _Dart_SetVMFlags = _Dart_SetVMFlagsPtr.asFunction< + ffi.Pointer Function( + int, ffi.Pointer>)>(); - /// Gets the length of a List. - /// - /// May generate an unhandled exception error. - /// - /// \param list A List. - /// \param length Returns the length of the List. + /// Returns true if the named VM flag is of boolean type, specified, and set to + /// true. /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_ListLength( - Object list, - ffi.Pointer length, + /// \param flag_name The name of the flag without leading punctuation + /// (example: "enable_asserts"). + bool Dart_IsVMFlagSet( + ffi.Pointer flag_name, ) { - return _Dart_ListLength( - list, - length, + return _Dart_IsVMFlagSet( + flag_name, ); } - 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_IsVMFlagSetPtr = + _lookup)>>( + 'Dart_IsVMFlagSet'); + late final _Dart_IsVMFlagSet = + _Dart_IsVMFlagSetPtr.asFunction)>(); - /// Gets the Object at some index of a List. + /// Creates a new isolate. The new isolate becomes the current isolate. /// - /// If the index is out of bounds, an error occurs. + /// 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. /// - /// May generate an unhandled exception error. + /// Requires there to be no current isolate. /// - /// \param list A List. - /// \param index A valid index into the List. + /// \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 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 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_ListGetAt( - list, - index, + return _Dart_CreateIsolateGroup( + script_uri, + name, + isolate_snapshot_data, + isolate_snapshot_instructions, + flags, + isolate_group_data, + isolate_data, + error, ); } - late final _Dart_ListGetAtPtr = - _lookup>( - 'Dart_ListGetAt'); - late final _Dart_ListGetAt = - _Dart_ListGetAtPtr.asFunction(); + 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>)>(); - /// Gets a range of Objects from a List. + /// Creates a new isolate inside the isolate group of [group_member]. /// - /// If any of the requested index values are out of bounds, an error occurs. + /// Requires there to be no current isolate. /// - /// May generate an unhandled exception error. + /// \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. /// - /// \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 The newly created isolate on success, or NULL if isolate creation + /// failed. /// - /// \return Success if no error occurs during the operation. - Object Dart_ListGetRange( - Object list, - int offset, - int length, - ffi.Pointer result, + /// 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_ListGetRange( - list, - offset, - length, - result, + return _Dart_CreateIsolateInGroup( + group_member, + name, + shutdown_callback, + cleanup_callback, + child_isolate_data, + error, ); } - 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_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>)>(); - /// Sets the Object at some index of a List. - /// - /// If the index is out of bounds, an error occurs. + /// Creates a new isolate from a Dart Kernel file. The new isolate + /// becomes the current isolate. /// - /// May generate an unhandled exception error. + /// Requires there to be no current isolate. /// - /// \param array A List. - /// \param index A valid index into the List. - /// \param value The Object to put in the List. + /// \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 valid handle if no error occurs during the operation. - Object Dart_ListSetAt( - Object list, - int index, - Object value, + /// \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_ListSetAt( - list, - index, - value, + return _Dart_CreateIsolateGroupFromKernel( + script_uri, + name, + kernel_buffer, + kernel_buffer_size, + flags, + isolate_group_data, + isolate_data, + error, ); } - 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_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>)>(); - /// 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, - ); + /// 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_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_ShutdownIsolatePtr = + _lookup>('Dart_ShutdownIsolate'); + late final _Dart_ShutdownIsolate = + _Dart_ShutdownIsolatePtr.asFunction(); - /// 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, - ); + /// Returns the current isolate. Will return NULL if there is no + /// current isolate. + Dart_Isolate Dart_CurrentIsolate() { + return _Dart_CurrentIsolate(); } - 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_CurrentIsolatePtr = + _lookup>( + 'Dart_CurrentIsolate'); + late final _Dart_CurrentIsolate = + _Dart_CurrentIsolatePtr.asFunction(); - /// 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, - ); + /// 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_MapGetAtPtr = - _lookup>( - 'Dart_MapGetAt'); - late final _Dart_MapGetAt = - _Dart_MapGetAtPtr.asFunction(); + late final _Dart_CurrentIsolateDataPtr = + _lookup Function()>>( + 'Dart_CurrentIsolateData'); + late final _Dart_CurrentIsolateData = _Dart_CurrentIsolateDataPtr.asFunction< + ffi.Pointer Function()>(); - /// 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, + /// 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_MapContainsKey( - map, - key, + return _Dart_IsolateData( + isolate, ); } - late final _Dart_MapContainsKeyPtr = - _lookup>( - 'Dart_MapContainsKey'); - late final _Dart_MapContainsKey = - _Dart_MapContainsKeyPtr.asFunction(); + late final _Dart_IsolateDataPtr = + _lookup Function(Dart_Isolate)>>( + 'Dart_IsolateData'); + late final _Dart_IsolateData = _Dart_IsolateDataPtr.asFunction< + ffi.Pointer Function(Dart_Isolate)>(); - /// 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 the current isolate group. Will return NULL if there is no + /// current isolate group. + Dart_IsolateGroup Dart_CurrentIsolateGroup() { + return _Dart_CurrentIsolateGroup(); } - late final _Dart_MapKeysPtr = - _lookup>( - 'Dart_MapKeys'); - late final _Dart_MapKeys = - _Dart_MapKeysPtr.asFunction(); + late final _Dart_CurrentIsolateGroupPtr = + _lookup>( + 'Dart_CurrentIsolateGroup'); + late final _Dart_CurrentIsolateGroup = + _Dart_CurrentIsolateGroupPtr.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, - ); + /// 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_GetTypeOfTypedDataPtr = - _lookup>( - 'Dart_GetTypeOfTypedData'); - late final _Dart_GetTypeOfTypedData = - _Dart_GetTypeOfTypedDataPtr.asFunction(); + late final _Dart_CurrentIsolateGroupDataPtr = + _lookup Function()>>( + 'Dart_CurrentIsolateGroupData'); + late final _Dart_CurrentIsolateGroupData = _Dart_CurrentIsolateGroupDataPtr + .asFunction Function()>(); - /// 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, + /// 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_GetTypeOfExternalTypedData( - object, + return _Dart_IsolateGroupData( + isolate, ); } - late final _Dart_GetTypeOfExternalTypedDataPtr = - _lookup>( - 'Dart_GetTypeOfExternalTypedData'); - late final _Dart_GetTypeOfExternalTypedData = - _Dart_GetTypeOfExternalTypedDataPtr.asFunction(); + late final _Dart_IsolateGroupDataPtr = + _lookup Function(Dart_Isolate)>>( + 'Dart_IsolateGroupData'); + late final _Dart_IsolateGroupData = _Dart_IsolateGroupDataPtr.asFunction< + ffi.Pointer Function(Dart_Isolate)>(); - /// 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). + /// Returns the debugging name for the current isolate. /// - /// \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, - ); + /// 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_NewTypedDataPtr = - _lookup>( - 'Dart_NewTypedData'); - late final _Dart_NewTypedData = - _Dart_NewTypedDataPtr.asFunction(); + late final _Dart_DebugNamePtr = + _lookup>('Dart_DebugName'); + late final _Dart_DebugName = + _Dart_DebugNamePtr.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). + /// Returns the ID for an isolate which is used to query the service protocol. /// - /// \return The TypedData object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewExternalTypedData( - int type, - ffi.Pointer data, - int length, + /// It is the responsibility of the caller to free the returned ID. + ffi.Pointer Dart_IsolateServiceId( + Dart_Isolate isolate, ) { - return _Dart_NewExternalTypedData( - type, - data, - length, + return _Dart_IsolateServiceId( + isolate, ); } - 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)>(); + late final _Dart_IsolateServiceIdPtr = + _lookup Function(Dart_Isolate)>>( + 'Dart_IsolateServiceId'); + late final _Dart_IsolateServiceId = _Dart_IsolateServiceIdPtr.asFunction< + ffi.Pointer Function(Dart_Isolate)>(); - /// 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. + /// Enters an isolate. After calling this function, + /// the current isolate will be set to the provided isolate. /// - /// \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, + /// 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_NewExternalTypedDataWithFinalizer( - type, - data, - length, - peer, - external_allocation_size, - callback, + return _Dart_EnterIsolate( + isolate, ); } - 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_EnterIsolatePtr = + _lookup>( + 'Dart_EnterIsolate'); + late final _Dart_EnterIsolate = + _Dart_EnterIsolatePtr.asFunction(); - /// Returns a ByteBuffer object for the typed data. + /// Kills the given isolate. /// - /// \param type_data The TypedData object. + /// 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. /// - /// \return The ByteBuffer object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewByteBuffer( - Object typed_data, + /// 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_NewByteBuffer( - typed_data, + return _Dart_KillIsolate( + isolate, ); } - late final _Dart_NewByteBufferPtr = - _lookup>( - 'Dart_NewByteBuffer'); - late final _Dart_NewByteBuffer = - _Dart_NewByteBufferPtr.asFunction(); + late final _Dart_KillIsolatePtr = + _lookup>( + 'Dart_KillIsolate'); + late final _Dart_KillIsolate = + _Dart_KillIsolatePtr.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. + /// 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. /// - /// 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. + /// Multiple calls are interpreted as increasing, not replacing, the estimate of + /// unreachable memory. /// - /// \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, + /// Requires there to be a current isolate. + void Dart_HintFreed( + int size, ) { - return _Dart_TypedDataAcquireData( - object, - type, - data, - len, + return _Dart_HintFreed( + size, ); } - 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_HintFreedPtr = + _lookup>( + 'Dart_HintFreed'); + late final _Dart_HintFreed = + _Dart_HintFreedPtr.asFunction(); - /// Releases access to the internal data address that was acquired earlier using - /// Dart_TypedDataAcquireData. + /// 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. /// - /// \param object The typed data object whose internal data address is to be - /// released. + /// |deadline| is measured in microseconds against the system's monotonic time. + /// This clock can be accessed via Dart_TimelineGetMicros(). /// - /// \return Success if the internal data address is released successfully. - /// Otherwise, returns an error handle. - Object Dart_TypedDataReleaseData( - Object object, + /// Requires there to be a current isolate. + void Dart_NotifyIdle( + int deadline, ) { - return _Dart_TypedDataReleaseData( - object, + return _Dart_NotifyIdle( + deadline, ); } - late final _Dart_TypedDataReleaseDataPtr = - _lookup>( - 'Dart_TypedDataReleaseData'); - late final _Dart_TypedDataReleaseData = - _Dart_TypedDataReleaseDataPtr.asFunction(); + late final _Dart_NotifyIdlePtr = + _lookup>( + 'Dart_NotifyIdle'); + late final _Dart_NotifyIdle = + _Dart_NotifyIdlePtr.asFunction(); - /// Returns the TypedData object associated with the ByteBuffer object. - /// - /// \param byte_buffer The ByteBuffer object. + /// Notifies the VM that the system is running low on memory. /// - /// \return The TypedData object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_GetDataFromByteBuffer( - Object byte_buffer, - ) { - return _Dart_GetDataFromByteBuffer( - byte_buffer, - ); + /// Does not require a current isolate. Only valid after calling Dart_Initialize. + void Dart_NotifyLowMemory() { + return _Dart_NotifyLowMemory(); } - late final _Dart_GetDataFromByteBufferPtr = - _lookup>( - 'Dart_GetDataFromByteBuffer'); - late final _Dart_GetDataFromByteBuffer = - _Dart_GetDataFromByteBufferPtr.asFunction(); + late final _Dart_NotifyLowMemoryPtr = + _lookup>('Dart_NotifyLowMemory'); + late final _Dart_NotifyLowMemory = + _Dart_NotifyLowMemoryPtr.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, - ); + /// Starts the CPU sampling profiler. + void Dart_StartProfiling() { + return _Dart_StartProfiling(); } - 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)>(); + late final _Dart_StartProfilingPtr = + _lookup>('Dart_StartProfiling'); + late final _Dart_StartProfiling = + _Dart_StartProfilingPtr.asFunction(); - /// Allocate a new object without invoking a constructor. + /// Stops the CPU sampling profiler. /// - /// \param type The type of an object to be allocated. + /// 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. /// - /// \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, - ); + /// 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_AllocatePtr = - _lookup>( - 'Dart_Allocate'); - late final _Dart_Allocate = - _Dart_AllocatePtr.asFunction(); + late final _Dart_ThreadDisableProfilingPtr = + _lookup>( + 'Dart_ThreadDisableProfiling'); + late final _Dart_ThreadDisableProfiling = + _Dart_ThreadDisableProfilingPtr.asFunction(); - /// Allocate a new object without invoking a constructor, and sets specified - /// native fields. + /// Notifies the VM that the current thread should be profiled. /// - /// \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. + /// NOTE: It is only legal to call this function *after* calling + /// Dart_ThreadDisableProfiling. /// - /// \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, + /// 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_AllocateWithNativeFields( - type, - num_native_fields, - native_fields, + return _Dart_AddSymbols( + dso_name, + buffer, + buffer_size, ); } - late final _Dart_AllocateWithNativeFieldsPtr = _lookup< + late final _Dart_AddSymbolsPtr = _lookup< ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.IntPtr, - ffi.Pointer)>>('Dart_AllocateWithNativeFields'); - late final _Dart_AllocateWithNativeFields = _Dart_AllocateWithNativeFieldsPtr - .asFunction)>(); + 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)>(); - /// Invokes a method or function. + /// Exits an isolate. After this call, Dart_CurrentIsolate will + /// return NULL. /// - /// 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. + /// 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. /// - /// This function ignores visibility (leading underscores in names). + /// 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. /// - /// May generate an unhandled exception error. + /// Requires there to be a current isolate. Not available in the precompiled + /// runtime (check Dart_IsPrecompiledRuntime). /// - /// \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 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 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 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_Invoke( - target, - name, - number_of_arguments, - arguments, + return _Dart_CreateSnapshot( + vm_snapshot_data_buffer, + vm_snapshot_data_size, + isolate_snapshot_data_buffer, + isolate_snapshot_data_size, + is_core, ); } - late final _Dart_InvokePtr = _lookup< + late final _Dart_CreateSnapshotPtr = _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.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)>(); - /// Invokes a Closure with the given arguments. + /// Returns whether the buffer contains a kernel file. /// - /// May generate an unhandled exception error. + /// \param buffer Pointer to a buffer that might contain a kernel binary. + /// \param buffer_size Size of the buffer. /// - /// \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 Whether the buffer contains a kernel binary (full or partial). + bool Dart_IsKernel( + ffi.Pointer buffer, + int buffer_size, ) { - return _Dart_InvokeClosure( - closure, - number_of_arguments, - arguments, + return _Dart_IsKernel( + buffer, + buffer_size, ); } - late final _Dart_InvokeClosurePtr = _lookup< + late final _Dart_IsKernelPtr = _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)>(); + ffi.Bool Function( + ffi.Pointer, ffi.IntPtr)>>('Dart_IsKernel'); + late final _Dart_IsKernel = _Dart_IsKernelPtr.asFunction< + bool Function(ffi.Pointer, int)>(); - /// 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). + /// Make isolate runnable. /// - /// May generate an unhandled exception error. + /// 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 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. + /// \param isolate The isolate to be made runnable. /// - /// \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 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_InvokeConstructor( - object, - name, - number_of_arguments, - arguments, + return _Dart_IsolateMakeRunnable( + isolate, ); } - 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_IsolateMakeRunnablePtr = + _lookup Function(Dart_Isolate)>>( + 'Dart_IsolateMakeRunnable'); + late final _Dart_IsolateMakeRunnable = _Dart_IsolateMakeRunnablePtr + .asFunction Function(Dart_Isolate)>(); - /// 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. + /// Allows embedders to provide an alternative wakeup mechanism for the + /// delivery of inter-isolate messages. This setting only applies to + /// the current isolate. /// - /// \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, + /// 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_GetField( - container, - name, + return _Dart_SetMessageNotifyCallback( + message_notify_callback, ); } - late final _Dart_GetFieldPtr = - _lookup>( - 'Dart_GetField'); - late final _Dart_GetField = - _Dart_GetFieldPtr.asFunction(); + late final _Dart_SetMessageNotifyCallbackPtr = _lookup< + ffi.NativeFunction>( + 'Dart_SetMessageNotifyCallback'); + late final _Dart_SetMessageNotifyCallback = _Dart_SetMessageNotifyCallbackPtr + .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. + /// Query the current message notify callback for the isolate. /// - /// \return A valid handle if no error occurs. - Object Dart_SetField( - Object container, - Object name, - Object value, - ) { - return _Dart_SetField( - container, - name, - value, - ); + /// \return The current message notify callback for the isolate. + Dart_MessageNotifyCallback Dart_GetMessageNotifyCallback() { + return _Dart_GetMessageNotifyCallback(); } - 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(); + late final _Dart_GetMessageNotifyCallbackPtr = + _lookup>( + 'Dart_GetMessageNotifyCallback'); + late final _Dart_GetMessageNotifyCallback = _Dart_GetMessageNotifyCallbackPtr + .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. + /// If the VM flag `--pause-isolates-on-start` was passed this will be true. /// - /// \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, - ); + /// \return A boolean value indicating if pause on start was requested. + bool Dart_ShouldPauseOnStart() { + return _Dart_ShouldPauseOnStart(); } - late final _Dart_ThrowExceptionPtr = - _lookup>( - 'Dart_ThrowException'); - late final _Dart_ThrowException = - _Dart_ThrowExceptionPtr.asFunction(); + late final _Dart_ShouldPauseOnStartPtr = + _lookup>( + 'Dart_ShouldPauseOnStart'); + late final _Dart_ShouldPauseOnStart = + _Dart_ShouldPauseOnStartPtr.asFunction(); - /// Rethrows an exception. + /// Override the VM flag `--pause-isolates-on-start` for the current isolate. /// - /// 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 should_pause Should the isolate be paused on start? /// - /// \return An error handle if the exception was not thrown. - /// Otherwise the function does not return. - Object Dart_ReThrowException( - Object exception, - Object stacktrace, + /// NOTE: This must be called before Dart_IsolateMakeRunnable. + void Dart_SetShouldPauseOnStart( + bool should_pause, ) { - return _Dart_ReThrowException( - exception, - stacktrace, + return _Dart_SetShouldPauseOnStart( + should_pause, ); } - late final _Dart_ReThrowExceptionPtr = - _lookup>( - 'Dart_ReThrowException'); - late final _Dart_ReThrowException = - _Dart_ReThrowExceptionPtr.asFunction(); + late final _Dart_SetShouldPauseOnStartPtr = + _lookup>( + 'Dart_SetShouldPauseOnStart'); + late final _Dart_SetShouldPauseOnStart = + _Dart_SetShouldPauseOnStartPtr.asFunction(); - /// Gets the number of native instance fields in an object. - Object Dart_GetNativeInstanceFieldCount( - Object obj, - ffi.Pointer count, - ) { - return _Dart_GetNativeInstanceFieldCount( - obj, - count, - ); + /// 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_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)>(); + late final _Dart_IsPausedOnStartPtr = + _lookup>('Dart_IsPausedOnStart'); + late final _Dart_IsPausedOnStart = + _Dart_IsPausedOnStartPtr.asFunction(); - /// Gets the value of a native field. + /// Called when the embedder has paused the current isolate on start and when + /// the embedder has resumed the isolate. /// - /// TODO(turnidge): Document. - Object Dart_GetNativeInstanceField( - Object obj, - int index, - ffi.Pointer value, + /// \param paused Is the isolate paused on start? + void Dart_SetPausedOnStart( + bool paused, ) { - return _Dart_GetNativeInstanceField( - obj, - index, - value, + return _Dart_SetPausedOnStart( + paused, ); } - 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)>(); + late final _Dart_SetPausedOnStartPtr = + _lookup>( + 'Dart_SetPausedOnStart'); + late final _Dart_SetPausedOnStart = + _Dart_SetPausedOnStartPtr.asFunction(); - /// Sets the value of a native field. + /// If the VM flag `--pause-isolates-on-exit` was passed this will be true. /// - /// TODO(turnidge): Document. - Object Dart_SetNativeInstanceField( - Object obj, - int index, - int value, - ) { - return _Dart_SetNativeInstanceField( - obj, - index, - value, - ); + /// \return A boolean value indicating if pause on exit was requested. + bool Dart_ShouldPauseOnExit() { + return _Dart_ShouldPauseOnExit(); } - 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(); + late final _Dart_ShouldPauseOnExitPtr = + _lookup>( + 'Dart_ShouldPauseOnExit'); + late final _Dart_ShouldPauseOnExit = + _Dart_ShouldPauseOnExitPtr.asFunction(); - /// Extracts current isolate group data from the native arguments structure. - ffi.Pointer Dart_GetNativeIsolateGroupData( - Dart_NativeArguments args, + /// 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_GetNativeIsolateGroupData( - args, + return _Dart_SetShouldPauseOnExit( + should_pause, ); } - 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)>(); + late final _Dart_SetShouldPauseOnExitPtr = + _lookup>( + 'Dart_SetShouldPauseOnExit'); + late final _Dart_SetShouldPauseOnExit = + _Dart_SetShouldPauseOnExitPtr.asFunction(); - /// Gets the native arguments based on the types passed in and populates - /// the passed arguments buffer with appropriate native values. + /// Is the current isolate paused on exit? /// - /// \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 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. /// - /// \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, + /// \param paused Is the isolate paused on exit? + void Dart_SetPausedOnExit( + bool paused, ) { - return _Dart_GetNativeArguments( - args, - num_arguments, - arg_descriptors, - arg_values, + return _Dart_SetPausedOnExit( + paused, ); } - 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)>(); + late final _Dart_SetPausedOnExitPtr = + _lookup>( + 'Dart_SetPausedOnExit'); + late final _Dart_SetPausedOnExit = + _Dart_SetPausedOnExitPtr.asFunction(); - /// Gets the native argument at some index. - Object Dart_GetNativeArgument( - Dart_NativeArguments args, - int index, + /// 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_GetNativeArgument( - args, - index, + return _Dart_SetStickyError( + error, ); } - 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)>(); + late final _Dart_SetStickyErrorPtr = + _lookup>( + 'Dart_SetStickyError'); + late final _Dart_SetStickyError = + _Dart_SetStickyErrorPtr.asFunction(); - /// Gets the number of native arguments. - int Dart_GetNativeArgumentCount( - Dart_NativeArguments args, - ) { - return _Dart_GetNativeArgumentCount( - args, - ); + /// Does the current isolate have a sticky error? + bool Dart_HasStickyError() { + return _Dart_HasStickyError(); } - late final _Dart_GetNativeArgumentCountPtr = - _lookup>( - 'Dart_GetNativeArgumentCount'); - late final _Dart_GetNativeArgumentCount = _Dart_GetNativeArgumentCountPtr - .asFunction(); + late final _Dart_HasStickyErrorPtr = + _lookup>('Dart_HasStickyError'); + late final _Dart_HasStickyError = + _Dart_HasStickyErrorPtr.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, - ); + /// 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_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)>(); + late final _Dart_GetStickyErrorPtr = + _lookup>('Dart_GetStickyError'); + late final _Dart_GetStickyError = + _Dart_GetStickyErrorPtr.asFunction(); - /// Gets the native field of the receiver. - Object Dart_GetNativeReceiver( - Dart_NativeArguments args, - ffi.Pointer value, - ) { - return _Dart_GetNativeReceiver( - args, - value, - ); + /// 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_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)>(); + late final _Dart_HandleMessagePtr = + _lookup>('Dart_HandleMessage'); + late final _Dart_HandleMessage = + _Dart_HandleMessagePtr.asFunction(); - /// 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, + /// 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_GetNativeStringArgument( - args, - arg_index, - peer, + return _Dart_WaitForEvent( + timeout_millis, ); } - 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_WaitForEventPtr = + _lookup>( + 'Dart_WaitForEvent'); + late final _Dart_WaitForEvent = + _Dart_WaitForEventPtr.asFunction(); - /// 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, - ); + /// 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_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)>(); + late final _Dart_HandleServiceMessagesPtr = + _lookup>( + 'Dart_HandleServiceMessages'); + late final _Dart_HandleServiceMessages = + _Dart_HandleServiceMessagesPtr.asFunction(); - /// 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, - ); + /// 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_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)>(); + late final _Dart_HasServiceMessagesPtr = + _lookup>( + 'Dart_HasServiceMessages'); + late final _Dart_HasServiceMessages = + _Dart_HasServiceMessagesPtr.asFunction(); - /// 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, - ); + /// 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_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_RunLoopPtr = + _lookup>('Dart_RunLoop'); + late final _Dart_RunLoop = _Dart_RunLoopPtr.asFunction(); - /// Sets the return value for a native function. + /// Lets the VM run message processing for the isolate. /// - /// 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, + /// 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_SetReturnValue( - args, - retval, + return _Dart_RunLoopAsync( + errors_are_fatal, + on_error_port, + on_exit_port, + error, ); } - late final _Dart_SetReturnValuePtr = _lookup< + late final _Dart_RunLoopAsyncPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - Dart_NativeArguments, ffi.Handle)>>('Dart_SetReturnValue'); - late final _Dart_SetReturnValue = _Dart_SetReturnValuePtr.asFunction< - void Function(Dart_NativeArguments, Object)>(); + 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>)>(); - void Dart_SetWeakHandleReturnValue( - Dart_NativeArguments args, - Dart_WeakPersistentHandle rval, - ) { - return _Dart_SetWeakHandleReturnValue( - args, - rval, - ); + /// Gets the main port id for the current isolate. + int Dart_GetMainPortId() { + return _Dart_GetMainPortId(); } - 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_GetMainPortIdPtr = + _lookup>('Dart_GetMainPortId'); + late final _Dart_GetMainPortId = + _Dart_GetMainPortIdPtr.asFunction(); - void Dart_SetBooleanReturnValue( - Dart_NativeArguments args, - bool retval, - ) { - return _Dart_SetBooleanReturnValue( - args, - retval, - ); + /// 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_SetBooleanReturnValuePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - Dart_NativeArguments, ffi.Bool)>>('Dart_SetBooleanReturnValue'); - late final _Dart_SetBooleanReturnValue = _Dart_SetBooleanReturnValuePtr - .asFunction(); + late final _Dart_HasLivePortsPtr = + _lookup>('Dart_HasLivePorts'); + late final _Dart_HasLivePorts = + _Dart_HasLivePortsPtr.asFunction(); - void Dart_SetIntegerReturnValue( - Dart_NativeArguments args, - int retval, + /// 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_SetIntegerReturnValue( - args, - retval, + return _Dart_Post( + port_id, + object, ); } - late final _Dart_SetIntegerReturnValuePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - Dart_NativeArguments, ffi.Int64)>>('Dart_SetIntegerReturnValue'); - late final _Dart_SetIntegerReturnValue = _Dart_SetIntegerReturnValuePtr - .asFunction(); + late final _Dart_PostPtr = + _lookup>( + 'Dart_Post'); + late final _Dart_Post = + _Dart_PostPtr.asFunction(); - void Dart_SetDoubleReturnValue( - Dart_NativeArguments args, - double retval, + /// 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_SetDoubleReturnValue( - args, - retval, + return _Dart_NewSendPort( + port_id, ); } - 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_NewSendPortPtr = + _lookup>( + 'Dart_NewSendPort'); + late final _Dart_NewSendPort = + _Dart_NewSendPortPtr.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 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_SetEnvironmentCallback( - callback, + return _Dart_SendPortGetId( + port, + port_id, ); } - late final _Dart_SetEnvironmentCallbackPtr = _lookup< - ffi.NativeFunction>( - 'Dart_SetEnvironmentCallback'); - late final _Dart_SetEnvironmentCallback = _Dart_SetEnvironmentCallbackPtr - .asFunction(); + 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)>(); - /// Sets the callback used to resolve native functions for a library. + /// Enters a new scope. /// - /// \param library A library. - /// \param resolver A native entry resolver. + /// 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 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, - ); + /// Requires there to be a current isolate. + void Dart_EnterScope() { + return _Dart_EnterScope(); } - 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)>(); + late final _Dart_EnterScopePtr = + _lookup>('Dart_EnterScope'); + late final _Dart_EnterScope = + _Dart_EnterScopePtr.asFunction(); - /// Returns the callback used to resolve native functions for a library. + /// Exits a scope. /// - /// \param library A library. - /// \param resolver a pointer to a Dart_NativeEntryResolver + /// The previous scope (if any) becomes the current scope. /// - /// \return A valid handle if the library was found. - Object Dart_GetNativeResolver( - Object library1, - ffi.Pointer resolver, - ) { - return _Dart_GetNativeResolver( - library1, - resolver, - ); + /// Requires there to be a current isolate. + void Dart_ExitScope() { + return _Dart_ExitScope(); } - 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_ExitScopePtr = + _lookup>('Dart_ExitScope'); + late final _Dart_ExitScope = _Dart_ExitScopePtr.asFunction(); - /// Returns the callback used to resolve native function symbols for a library. + /// 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. /// - /// \param library A library. - /// \param resolver a pointer to a Dart_NativeEntrySymbol. + /// This function makes it possible for the embedder to allocate + /// temporary data in the VMs zone allocator. /// - /// \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). + /// 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 /// - /// NOTE: This is an experimental feature and might change in the future. + /// 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 library A library. - /// \param resolver A native function resolver. + /// \param size Size of the memory to allocate. /// - /// \return A valid handle if the native resolver was set successfully. - Object Dart_SetFfiNativeResolver( - Object library1, - Dart_FfiNativeResolver resolver, + /// \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_SetFfiNativeResolver( - library1, - resolver, + return _Dart_ScopeAllocate( + size, ); } - 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_ScopeAllocatePtr = + _lookup Function(ffi.IntPtr)>>( + 'Dart_ScopeAllocate'); + late final _Dart_ScopeAllocate = + _Dart_ScopeAllocatePtr.asFunction Function(int)>(); - /// 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. + /// Returns the null object. /// - /// TODO(turnidge): Document. - Object Dart_SetLibraryTagHandler( - Dart_LibraryTagHandler handler, - ) { - return _Dart_SetLibraryTagHandler( - handler, - ); + /// \return A handle to the null object. + Object Dart_Null() { + return _Dart_Null(); } - late final _Dart_SetLibraryTagHandlerPtr = - _lookup>( - 'Dart_SetLibraryTagHandler'); - late final _Dart_SetLibraryTagHandler = _Dart_SetLibraryTagHandlerPtr - .asFunction(); + late final _Dart_NullPtr = + _lookup>('Dart_Null'); + late final _Dart_Null = _Dart_NullPtr.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, + /// Is this object null? + bool Dart_IsNull( + Object object, ) { - return _Dart_SetDeferredLoadHandler( - handler, + return _Dart_IsNull( + object, ); } - late final _Dart_SetDeferredLoadHandlerPtr = _lookup< - ffi.NativeFunction>( - 'Dart_SetDeferredLoadHandler'); - late final _Dart_SetDeferredLoadHandler = _Dart_SetDeferredLoadHandlerPtr - .asFunction(); + late final _Dart_IsNullPtr = + _lookup>('Dart_IsNull'); + late final _Dart_IsNull = _Dart_IsNullPtr.asFunction(); - /// Notifies the VM that a deferred load completed successfully. This function - /// will eventually cause the corresponding `prefix.loadLibrary()` futures to - /// complete. + /// Returns the empty string 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 _Dart_DeferredLoadComplete( - loading_unit_id, - snapshot_data, - snapshot_instructions, - ); + /// \return A handle to the empty string object. + Object Dart_EmptyString() { + return _Dart_EmptyString(); } - 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_EmptyStringPtr = + _lookup>('Dart_EmptyString'); + late final _Dart_EmptyString = + _Dart_EmptyStringPtr.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. + /// Returns types that are not classes, and which therefore cannot be looked up + /// as library members by Dart_GetType. /// - /// 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, - ); + /// \return A handle to the dynamic, void or Never type. + Object Dart_TypeDynamic() { + return _Dart_TypeDynamic(); } - 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_TypeDynamicPtr = + _lookup>('Dart_TypeDynamic'); + late final _Dart_TypeDynamic = + _Dart_TypeDynamicPtr.asFunction(); - /// Canonicalizes a url with respect to some library. + 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 url is resolved with respect to the library's url and some url - /// normalizations are performed. + /// The result of the comparison is returned through the 'equal' + /// parameter. The return value itself is used to indicate success or + /// failure, not equality. /// - /// This canonicalization function should be sufficient for most - /// embedders to implement the Dart_kCanonicalizeUrl tag. + /// May generate an unhandled exception error. /// - /// \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 obj1 An object to be compared. + /// \param obj2 An object to be compared. + /// \param equal Returns the result of the equality comparison. /// - /// \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 A valid handle if no error occurs during the comparison. + Object Dart_ObjectEquals( + Object obj1, + Object obj2, + ffi.Pointer equal, ) { - return _Dart_DefaultCanonicalizeUrl( - base_url, - url, + return _Dart_ObjectEquals( + obj1, + obj2, + equal, ); } - late final _Dart_DefaultCanonicalizeUrlPtr = - _lookup>( - 'Dart_DefaultCanonicalizeUrl'); - late final _Dart_DefaultCanonicalizeUrl = _Dart_DefaultCanonicalizeUrlPtr - .asFunction(); + 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)>(); - /// Loads the root library for the current isolate. + /// Is this object an instance of some type? /// - /// Requires there to be no current root library. + /// The result of the test is returned through the 'instanceof' parameter. + /// The return value itself is used to indicate success or failure. /// - /// \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 object An object. + /// \param type A type. + /// \param instanceof Return true if 'object' is an instance of type 'type'. /// - /// \return A handle to the root library, or an error. - Object Dart_LoadScriptFromKernel( - ffi.Pointer kernel_buffer, - int kernel_size, + /// \return A valid handle if no error occurs during the operation. + Object Dart_ObjectIsType( + Object object, + Object type, + ffi.Pointer instanceof, ) { - return _Dart_LoadScriptFromKernel( - kernel_buffer, - kernel_size, + return _Dart_ObjectIsType( + object, + type, + instanceof, ); } - late final _Dart_LoadScriptFromKernelPtr = _lookup< + late final _Dart_ObjectIsTypePtr = _lookup< ffi.NativeFunction< - ffi.Handle Function(ffi.Pointer, - ffi.IntPtr)>>('Dart_LoadScriptFromKernel'); - late final _Dart_LoadScriptFromKernel = _Dart_LoadScriptFromKernelPtr - .asFunction, int)>(); + ffi.Handle Function(ffi.Handle, ffi.Handle, + ffi.Pointer)>>('Dart_ObjectIsType'); + late final _Dart_ObjectIsType = _Dart_ObjectIsTypePtr.asFunction< + Object Function(Object, Object, ffi.Pointer)>(); - /// Gets the library for the root script for the current isolate. + /// Query object type. /// - /// 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. + /// \param object Some Object. /// - /// \return Returns the root Library for the current isolate or Dart_Null(). - Object Dart_RootLibrary() { - return _Dart_RootLibrary(); + /// \return true if Object is of the specified type. + bool Dart_IsInstance( + Object object, + ) { + return _Dart_IsInstance( + object, + ); } - late final _Dart_RootLibraryPtr = - _lookup>('Dart_RootLibrary'); - late final _Dart_RootLibrary = - _Dart_RootLibraryPtr.asFunction(); + late final _Dart_IsInstancePtr = + _lookup>( + 'Dart_IsInstance'); + late final _Dart_IsInstance = + _Dart_IsInstancePtr.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, + bool Dart_IsNumber( + Object object, ) { - return _Dart_SetRootLibrary( - library1, + return _Dart_IsNumber( + object, ); } - late final _Dart_SetRootLibraryPtr = - _lookup>( - 'Dart_SetRootLibrary'); - late final _Dart_SetRootLibrary = - _Dart_SetRootLibraryPtr.asFunction(); + late final _Dart_IsNumberPtr = + _lookup>( + 'Dart_IsNumber'); + late final _Dart_IsNumber = + _Dart_IsNumberPtr.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, + bool Dart_IsInteger( + Object object, ) { - return _Dart_GetType( - library1, - class_name, - number_of_type_arguments, - type_arguments, + return _Dart_IsInteger( + object, ); } - 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_IsIntegerPtr = + _lookup>( + 'Dart_IsInteger'); + late final _Dart_IsInteger = + _Dart_IsIntegerPtr.asFunction(); - /// 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, + bool Dart_IsDouble( + Object object, ) { - return _Dart_GetNullableType( - library1, - class_name, - number_of_type_arguments, - type_arguments, + return _Dart_IsDouble( + object, ); } - 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)>(); + late final _Dart_IsDoublePtr = + _lookup>( + 'Dart_IsDouble'); + late final _Dart_IsDouble = + _Dart_IsDoublePtr.asFunction(); - /// 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, + bool Dart_IsBoolean( + Object object, ) { - return _Dart_GetNonNullableType( - library1, - class_name, - number_of_type_arguments, - type_arguments, + return _Dart_IsBoolean( + object, ); } - 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)>(); + late final _Dart_IsBooleanPtr = + _lookup>( + 'Dart_IsBoolean'); + late final _Dart_IsBoolean = + _Dart_IsBooleanPtr.asFunction(); - /// 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, + bool Dart_IsString( + Object object, ) { - return _Dart_TypeToNullableType( - type, + return _Dart_IsString( + object, ); } - 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, + late final _Dart_IsStringPtr = + _lookup>( + 'Dart_IsString'); + late final _Dart_IsString = + _Dart_IsStringPtr.asFunction(); + + bool Dart_IsStringLatin1( + Object object, ) { - return _Dart_TypeToNonNullableType( - type, + return _Dart_IsStringLatin1( + object, ); } - late final _Dart_TypeToNonNullableTypePtr = - _lookup>( - 'Dart_TypeToNonNullableType'); - late final _Dart_TypeToNonNullableType = - _Dart_TypeToNonNullableTypePtr.asFunction(); + late final _Dart_IsStringLatin1Ptr = + _lookup>( + 'Dart_IsStringLatin1'); + late final _Dart_IsStringLatin1 = + _Dart_IsStringLatin1Ptr.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, + bool Dart_IsExternalString( + Object object, ) { - return _Dart_IsNullableType( - type, - result, + return _Dart_IsExternalString( + object, ); } - 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)>(); + late final _Dart_IsExternalStringPtr = + _lookup>( + 'Dart_IsExternalString'); + late final _Dart_IsExternalString = + _Dart_IsExternalStringPtr.asFunction(); - Object Dart_IsNonNullableType( - Object type, - ffi.Pointer result, + bool Dart_IsList( + Object object, ) { - return _Dart_IsNonNullableType( - type, - result, + return _Dart_IsList( + object, ); } - 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_IsListPtr = + _lookup>('Dart_IsList'); + late final _Dart_IsList = _Dart_IsListPtr.asFunction(); - Object Dart_IsLegacyType( - Object type, - ffi.Pointer result, + bool Dart_IsMap( + Object object, ) { - return _Dart_IsLegacyType( - type, - result, + return _Dart_IsMap( + object, ); } - 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)>(); + late final _Dart_IsMapPtr = + _lookup>('Dart_IsMap'); + late final _Dart_IsMap = _Dart_IsMapPtr.asFunction(); - /// 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, + bool Dart_IsLibrary( + Object object, ) { - return _Dart_GetClass( - library1, - class_name, + return _Dart_IsLibrary( + object, ); } - late final _Dart_GetClassPtr = - _lookup>( - 'Dart_GetClass'); - late final _Dart_GetClass = - _Dart_GetClassPtr.asFunction(); + late final _Dart_IsLibraryPtr = + _lookup>( + 'Dart_IsLibrary'); + late final _Dart_IsLibrary = + _Dart_IsLibraryPtr.asFunction(); - /// Returns an import path to a Library, such as "file:///test.dart" or - /// "dart:core". - Object Dart_LibraryUrl( - Object library1, + bool Dart_IsType( + Object handle, ) { - return _Dart_LibraryUrl( - library1, + return _Dart_IsType( + handle, ); } - late final _Dart_LibraryUrlPtr = - _lookup>( - 'Dart_LibraryUrl'); - late final _Dart_LibraryUrl = - _Dart_LibraryUrlPtr.asFunction(); + late final _Dart_IsTypePtr = + _lookup>('Dart_IsType'); + late final _Dart_IsType = _Dart_IsTypePtr.asFunction(); - /// Returns a URL from which a Library was loaded. - Object Dart_LibraryResolvedUrl( - Object library1, + bool Dart_IsFunction( + Object handle, ) { - return _Dart_LibraryResolvedUrl( - library1, + return _Dart_IsFunction( + handle, ); } - 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_IsFunctionPtr = + _lookup>( + 'Dart_IsFunction'); + late final _Dart_IsFunction = + _Dart_IsFunctionPtr.asFunction(); - Object Dart_LookupLibrary( - Object url, + bool Dart_IsVariable( + Object handle, ) { - return _Dart_LookupLibrary( - url, + return _Dart_IsVariable( + handle, ); } - late final _Dart_LookupLibraryPtr = - _lookup>( - 'Dart_LookupLibrary'); - late final _Dart_LookupLibrary = - _Dart_LookupLibraryPtr.asFunction(); + late final _Dart_IsVariablePtr = + _lookup>( + 'Dart_IsVariable'); + late final _Dart_IsVariable = + _Dart_IsVariablePtr.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, + bool Dart_IsTypeVariable( + Object handle, ) { - return _Dart_LibraryHandleError( - library1, - error, + return _Dart_IsTypeVariable( + handle, ); } - late final _Dart_LibraryHandleErrorPtr = - _lookup>( - 'Dart_LibraryHandleError'); - late final _Dart_LibraryHandleError = - _Dart_LibraryHandleErrorPtr.asFunction(); + late final _Dart_IsTypeVariablePtr = + _lookup>( + 'Dart_IsTypeVariable'); + late final _Dart_IsTypeVariable = + _Dart_IsTypeVariablePtr.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, + bool Dart_IsClosure( + Object object, ) { - return _Dart_LoadLibraryFromKernel( - kernel_buffer, - kernel_buffer_size, + return _Dart_IsClosure( + object, ); } - late final _Dart_LoadLibraryFromKernelPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Pointer, - ffi.IntPtr)>>('Dart_LoadLibraryFromKernel'); - late final _Dart_LoadLibraryFromKernel = _Dart_LoadLibraryFromKernelPtr - .asFunction, int)>(); + late final _Dart_IsClosurePtr = + _lookup>( + 'Dart_IsClosure'); + late final _Dart_IsClosure = + _Dart_IsClosurePtr.asFunction(); - /// 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, + bool Dart_IsTypedData( + Object object, ) { - return _Dart_FinalizeLoading( - complete_futures, + return _Dart_IsTypedData( + object, ); } - late final _Dart_FinalizeLoadingPtr = - _lookup>( - 'Dart_FinalizeLoading'); - late final _Dart_FinalizeLoading = - _Dart_FinalizeLoadingPtr.asFunction(); + late final _Dart_IsTypedDataPtr = + _lookup>( + 'Dart_IsTypedData'); + late final _Dart_IsTypedData = + _Dart_IsTypedDataPtr.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( + bool Dart_IsByteBuffer( Object object, - ffi.Pointer> peer, ) { - return _Dart_GetPeer( + return _Dart_IsByteBuffer( 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>)>(); + late final _Dart_IsByteBufferPtr = + _lookup>( + 'Dart_IsByteBuffer'); + late final _Dart_IsByteBuffer = + _Dart_IsByteBufferPtr.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( + bool Dart_IsFuture( Object object, - ffi.Pointer peer, ) { - return _Dart_SetPeer( + return _Dart_IsFuture( 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)>(); + late final _Dart_IsFuturePtr = + _lookup>( + 'Dart_IsFuture'); + late final _Dart_IsFuture = + _Dart_IsFuturePtr.asFunction(); - bool Dart_IsKernelIsolate( - Dart_Isolate isolate, + /// 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_IsKernelIsolate( - isolate, + return _Dart_InstanceGetType( + instance, ); } - late final _Dart_IsKernelIsolatePtr = - _lookup>( - 'Dart_IsKernelIsolate'); - late final _Dart_IsKernelIsolate = - _Dart_IsKernelIsolatePtr.asFunction(); + late final _Dart_InstanceGetTypePtr = + _lookup>( + 'Dart_InstanceGetType'); + late final _Dart_InstanceGetType = + _Dart_InstanceGetTypePtr.asFunction(); - bool Dart_KernelIsolateIsRunning() { - return _Dart_KernelIsolateIsRunning(); + /// 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_KernelIsolateIsRunningPtr = - _lookup>( - 'Dart_KernelIsolateIsRunning'); - late final _Dart_KernelIsolateIsRunning = - _Dart_KernelIsolateIsRunningPtr.asFunction(); + late final _Dart_ClassNamePtr = + _lookup>( + 'Dart_ClassName'); + late final _Dart_ClassName = + _Dart_ClassNamePtr.asFunction(); - int Dart_KernelPort() { - return _Dart_KernelPort(); + /// 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_KernelPortPtr = - _lookup>('Dart_KernelPort'); - late final _Dart_KernelPort = - _Dart_KernelPortPtr.asFunction(); + late final _Dart_FunctionNamePtr = + _lookup>( + 'Dart_FunctionName'); + late final _Dart_FunctionName = + _Dart_FunctionNamePtr.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. + /// Returns a handle to the owner of a function. /// - /// 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. + /// 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. /// - /// 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 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_CompileToKernel( - script_uri, - platform_kernel, - platform_kernel_size, - incremental_compile, - snapshot_compile, - package_config, - verbosity, + return _Dart_FunctionOwner( + function, ); } - 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(); + late final _Dart_FunctionOwnerPtr = + _lookup>( + 'Dart_FunctionOwner'); + late final _Dart_FunctionOwner = + _Dart_FunctionOwnerPtr.asFunction(); - /// Sets the kernel buffer which will be used to load Dart SDK sources - /// dynamically at runtime. + /// Determines whether a function handle referes to a static function + /// of method. /// - /// \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. + /// For the purposes of the embedding API, a top-level function is + /// implicitly declared static. /// - /// \param platform_kernel_size The length of the platform_kernel buffer. - void Dart_SetDartLibrarySourcesKernel( - ffi.Pointer platform_kernel, - int platform_kernel_size, + /// \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_SetDartLibrarySourcesKernel( - platform_kernel, - platform_kernel_size, + return _Dart_FunctionIsStatic( + function, + is_static, ); } - late final _Dart_SetDartLibrarySourcesKernelPtr = _lookup< + late final _Dart_FunctionIsStaticPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.IntPtr)>>('Dart_SetDartLibrarySourcesKernel'); - late final _Dart_SetDartLibrarySourcesKernel = - _Dart_SetDartLibrarySourcesKernelPtr.asFunction< - void Function(ffi.Pointer, int)>(); + ffi.Handle Function( + ffi.Handle, ffi.Pointer)>>('Dart_FunctionIsStatic'); + late final _Dart_FunctionIsStatic = _Dart_FunctionIsStaticPtr.asFunction< + Object Function(Object, ffi.Pointer)>(); - /// 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. + /// Is this object a closure resulting from a tear-off (closurized method)? /// - /// \param kernel_buffer + /// 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 kernel_buffer_size A buffer which contains a kernel/DIL program. Must - /// remain valid until isolate shutdown. + /// \param object Some Object. /// - /// \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 true if Object is a tear-off. + bool Dart_IsTearOff( + Object object, ) { - return _Dart_DetectNullSafety( - script_uri, - package_config, - original_working_directory, - snapshot_data, - snapshot_instructions, - kernel_buffer, - kernel_buffer_size, + return _Dart_IsTearOff( + object, ); } - 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)>(); + late final _Dart_IsTearOffPtr = + _lookup>( + 'Dart_IsTearOff'); + late final _Dart_IsTearOff = + _Dart_IsTearOffPtr.asFunction(); - /// Returns true if isolate is the service isolate. - /// - /// \param isolate An isolate + /// Retrieves the function of a closure. /// - /// \return Returns true if 'isolate' is the service isolate. - bool Dart_IsServiceIsolate( - Dart_Isolate isolate, + /// \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_IsServiceIsolate( - isolate, + return _Dart_ClosureFunction( + closure, ); } - late final _Dart_IsServiceIsolatePtr = - _lookup>( - 'Dart_IsServiceIsolate'); - late final _Dart_IsServiceIsolate = - _Dart_IsServiceIsolatePtr.asFunction(); + late final _Dart_ClosureFunctionPtr = + _lookup>( + 'Dart_ClosureFunction'); + late final _Dart_ClosureFunction = + _Dart_ClosureFunctionPtr.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. + /// Returns a handle to the library which contains class. /// - /// \return Returns true if the profile is successfully written and false - /// otherwise. - bool Dart_WriteProfileToTimeline( - int main_port, - ffi.Pointer> error, + /// \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_WriteProfileToTimeline( - main_port, - error, + return _Dart_ClassLibrary( + cls_type, ); } - late final _Dart_WriteProfileToTimelinePtr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - Dart_Port, ffi.Pointer>)>>( - 'Dart_WriteProfileToTimeline'); - late final _Dart_WriteProfileToTimeline = _Dart_WriteProfileToTimelinePtr - .asFunction>)>(); + late final _Dart_ClassLibraryPtr = + _lookup>( + 'Dart_ClassLibrary'); + late final _Dart_ClassLibrary = + _Dart_ClassLibraryPtr.asFunction(); - /// Compiles all functions reachable from entry points and marks - /// the isolate to disallow future compilation. + /// Does this Integer fit into a 64-bit signed integer? /// - /// Entry points should be specified using `@pragma("vm:entry-point")` - /// annotation. + /// \param integer An integer. + /// \param fits Returns true if the integer fits into a 64-bit signed integer. /// - /// \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 A valid handle if no error occurs during the operation. + Object Dart_IntegerFitsIntoInt64( + Object integer, + ffi.Pointer fits, ) { - return _Dart_LoadingUnitLibraryUris( - loading_unit_id, + return _Dart_IntegerFitsIntoInt64( + integer, + fits, ); } - late final _Dart_LoadingUnitLibraryUrisPtr = - _lookup>( - 'Dart_LoadingUnitLibraryUris'); - late final _Dart_LoadingUnitLibraryUris = - _Dart_LoadingUnitLibraryUrisPtr.asFunction(); + late final _Dart_IntegerFitsIntoInt64Ptr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, ffi.Pointer)>>('Dart_IntegerFitsIntoInt64'); + late final _Dart_IntegerFitsIntoInt64 = _Dart_IntegerFitsIntoInt64Ptr + .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. + /// Does this Integer fit into a 64-bit unsigned integer? /// - /// If debug_callback_data is provided, debug_callback_data will be used with - /// the callback to provide separate debugging information. + /// \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_CreateAppAOTSnapshotAsAssembly( - Dart_StreamingWriteCallback callback, - ffi.Pointer callback_data, - bool stripped, - ffi.Pointer debug_callback_data, + Object Dart_IntegerFitsIntoUint64( + Object integer, + ffi.Pointer fits, ) { - return _Dart_CreateAppAOTSnapshotAsAssembly( - callback, - callback_data, - stripped, - debug_callback_data, + return _Dart_IntegerFitsIntoUint64( + integer, + fits, ); } - late final _Dart_CreateAppAOTSnapshotAsAssemblyPtr = _lookup< + late final _Dart_IntegerFitsIntoUint64Ptr = _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(ffi.Handle, + ffi.Pointer)>>('Dart_IntegerFitsIntoUint64'); + late final _Dart_IntegerFitsIntoUint64 = _Dart_IntegerFitsIntoUint64Ptr + .asFunction)>(); - Object Dart_CreateAppAOTSnapshotAsAssemblies( - Dart_CreateLoadingUnitCallback next_callback, - ffi.Pointer next_callback_data, - bool stripped, - Dart_StreamingWriteCallback write_callback, - Dart_StreamingCloseCallback close_callback, + /// 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_CreateAppAOTSnapshotAsAssemblies( - next_callback, - next_callback_data, - stripped, - write_callback, - close_callback, + return _Dart_NewInteger( + 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 _Dart_NewIntegerPtr = + _lookup>( + 'Dart_NewInteger'); + late final _Dart_NewInteger = + _Dart_NewIntegerPtr.asFunction(); - /// Creates a precompiled snapshot. - /// - A root library must have been loaded. - /// - Dart_Precompile must have been called. + /// Returns an Integer with the provided value. /// - /// Outputs an ELF shared library defining the symbols - /// - _kDartVmSnapshotData - /// - _kDartVmSnapshotInstructions - /// - _kDartIsolateSnapshotData - /// - _kDartIsolateSnapshotInstructions + /// \param value The unsigned value of the integer. /// - /// 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. + /// \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. /// - /// The callback will be invoked one or more times to provide the binary output. + /// \param value The value of the integer represented as a C string + /// containing a hexadecimal number. /// - /// If stripped is true, then the binary output will not include DWARF - /// debugging sections. + /// \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. /// - /// If debug_callback_data is provided, debug_callback_data will be used with - /// the callback to provide separate debugging information. + /// 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_CreateAppAOTSnapshotAsElf( - Dart_StreamingWriteCallback callback, - ffi.Pointer callback_data, - bool stripped, - ffi.Pointer debug_callback_data, + Object Dart_IntegerToInt64( + Object integer, + ffi.Pointer value, ) { - return _Dart_CreateAppAOTSnapshotAsElf( - callback, - callback_data, - stripped, - debug_callback_data, + return _Dart_IntegerToInt64( + integer, + value, ); } - late final _Dart_CreateAppAOTSnapshotAsElfPtr = _lookup< + late final _Dart_IntegerToInt64Ptr = _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.Handle, ffi.Pointer)>>('Dart_IntegerToInt64'); + late final _Dart_IntegerToInt64 = _Dart_IntegerToInt64Ptr.asFunction< + Object Function(Object, ffi.Pointer)>(); - Object Dart_CreateAppAOTSnapshotAsElfs( - Dart_CreateLoadingUnitCallback next_callback, - ffi.Pointer next_callback_data, - bool stripped, - Dart_StreamingWriteCallback write_callback, - Dart_StreamingCloseCallback close_callback, + /// 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_CreateAppAOTSnapshotAsElfs( - next_callback, - next_callback_data, - stripped, - write_callback, - close_callback, + return _Dart_IntegerToUint64( + integer, + value, ); } - late final _Dart_CreateAppAOTSnapshotAsElfsPtr = _lookup< + late final _Dart_IntegerToUint64Ptr = _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.Handle, ffi.Pointer)>>('Dart_IntegerToUint64'); + late final _Dart_IntegerToUint64 = _Dart_IntegerToUint64Ptr.asFunction< + Object Function(Object, 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, + /// 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_CreateVMAOTSnapshotAsAssembly( - callback, - callback_data, + return _Dart_IntegerToHexCString( + integer, + value, ); } - late final _Dart_CreateVMAOTSnapshotAsAssemblyPtr = _lookup< + late final _Dart_IntegerToHexCStringPtr = _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.Handle Function(ffi.Handle, + ffi.Pointer>)>>('Dart_IntegerToHexCString'); + late final _Dart_IntegerToHexCString = + _Dart_IntegerToHexCStringPtr.asFunction< + Object Function(Object, 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. + /// Returns a Double with the provided value. /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_SortClasses() { - return _Dart_SortClasses(); + /// \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_SortClassesPtr = - _lookup>('Dart_SortClasses'); - late final _Dart_SortClasses = - _Dart_SortClassesPtr.asFunction(); + late final _Dart_NewDoublePtr = + _lookup>( + 'Dart_NewDouble'); + late final _Dart_NewDouble = + _Dart_NewDoublePtr.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. + /// Gets the value of a Double /// - /// The buffers are scope allocated and are only valid until the next call to - /// Dart_ExitScope. + /// \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_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, + Object Dart_DoubleValue( + Object double_obj, + ffi.Pointer value, ) { - return _Dart_CreateAppJITSnapshotAsBlobs( - isolate_snapshot_data_buffer, - isolate_snapshot_data_size, - isolate_snapshot_instructions_buffer, - isolate_snapshot_instructions_size, + return _Dart_DoubleValue( + double_obj, + value, ); } - late final _Dart_CreateAppJITSnapshotAsBlobsPtr = _lookup< + late final _Dart_DoubleValuePtr = _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.Handle, ffi.Pointer)>>('Dart_DoubleValue'); + late final _Dart_DoubleValue = _Dart_DoubleValuePtr.asFunction< + Object Function(Object, 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, + /// 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_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_GetStaticMethodClosure( + library1, + cls_type, + function_name, ); } - late final _Dart_CreateCoreJITSnapshotAsBlobsPtr = _lookup< + late final _Dart_GetStaticMethodClosurePtr = _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)>(); + ffi.Handle Function(ffi.Handle, ffi.Handle, + ffi.Handle)>>('Dart_GetStaticMethodClosure'); + late final _Dart_GetStaticMethodClosure = _Dart_GetStaticMethodClosurePtr + .asFunction(); - /// Get obfuscation map for precompiled code. + /// Returns the True object. /// - /// Obfuscation map is encoded as a JSON array of pairs (original name, - /// obfuscated name). + /// Requires there to be a current isolate. /// - /// \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, - ); + /// \return A handle to the True object. + Object Dart_True() { + return _Dart_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)>(); + late final _Dart_TruePtr = + _lookup>('Dart_True'); + late final _Dart_True = _Dart_TruePtr.asFunction(); - /// 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(); + /// 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_IsPrecompiledRuntimePtr = - _lookup>( - 'Dart_IsPrecompiledRuntime'); - late final _Dart_IsPrecompiledRuntime = - _Dart_IsPrecompiledRuntimePtr.asFunction(); + late final _Dart_FalsePtr = + _lookup>('Dart_False'); + late final _Dart_False = _Dart_FalsePtr.asFunction(); - /// Print a native stack trace. Used for crash handling. + /// Returns a Boolean with the provided value. /// - /// 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 value true or false. + /// + /// \return The Boolean object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewBoolean( + bool value, ) { - return _Dart_DumpNativeStackTrace( - context, + return _Dart_NewBoolean( + value, ); } - late final _Dart_DumpNativeStackTracePtr = - _lookup)>>( - 'Dart_DumpNativeStackTrace'); - late final _Dart_DumpNativeStackTrace = _Dart_DumpNativeStackTracePtr - .asFunction)>(); + late final _Dart_NewBooleanPtr = + _lookup>( + 'Dart_NewBoolean'); + late final _Dart_NewBoolean = + _Dart_NewBooleanPtr.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(); + /// 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_PrepareToAbortPtr = - _lookup>('Dart_PrepareToAbort'); - late final _Dart_PrepareToAbort = - _Dart_PrepareToAbortPtr.asFunction(); + 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)>(); - /// 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). + /// Gets the length of a String. /// - /// \param port_id The destination port. - /// \param message The message to send. + /// \param str A String. + /// \param length Returns the length of the String. /// - /// \return True if the message was posted. - bool Dart_PostCObject( - int port_id, - ffi.Pointer message, + /// \return A valid handle if no error occurs during the operation. + Object Dart_StringLength( + Object str, + ffi.Pointer length, ) { - return _Dart_PostCObject( - port_id, - message, + return _Dart_StringLength( + str, + length, ); } - late final _Dart_PostCObjectPtr = _lookup< + late final _Dart_StringLengthPtr = _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_StringLength'); + late final _Dart_StringLength = _Dart_StringLengthPtr.asFunction< + Object Function(Object, ffi.Pointer)>(); - /// Posts a message on some port. The message will contain the integer 'message'. + /// 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 port_id The destination port. - /// \param message The message to send. + /// \param value A C String /// - /// \return True if the message was posted. - bool Dart_PostInteger( - int port_id, - int message, + /// \return The String object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewStringFromCString( + ffi.Pointer str, ) { - return _Dart_PostInteger( - port_id, - message, + return _Dart_NewStringFromCString( + str, ); } - late final _Dart_PostIntegerPtr = - _lookup>( - 'Dart_PostInteger'); - late final _Dart_PostInteger = - _Dart_PostIntegerPtr.asFunction(); + late final _Dart_NewStringFromCStringPtr = + _lookup)>>( + 'Dart_NewStringFromCString'); + late final _Dart_NewStringFromCString = _Dart_NewStringFromCStringPtr + .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. + /// Returns a String built from an array of UTF-8 encoded characters. /// - /// \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 utf8_array An array of UTF-8 encoded characters. + /// \param length The length of the codepoints array. /// - /// \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 The String object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewStringFromUTF8( + ffi.Pointer utf8_array, + int length, ) { - return _Dart_NewNativePort( - name, - handler, - handle_concurrently, + return _Dart_NewStringFromUTF8( + utf8_array, + length, ); } - late final _Dart_NewNativePortPtr = _lookup< + late final _Dart_NewStringFromUTF8Ptr = _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.Handle Function( + ffi.Pointer, ffi.IntPtr)>>('Dart_NewStringFromUTF8'); + late final _Dart_NewStringFromUTF8 = _Dart_NewStringFromUTF8Ptr.asFunction< + Object Function(ffi.Pointer, int)>(); - /// Closes the native port with the given id. + /// Returns a String built from an array of UTF-16 encoded characters. /// - /// The port must have been allocated by a call to Dart_NewNativePort. + /// \param utf16_array An array of UTF-16 encoded characters. + /// \param length The length of the codepoints array. /// - /// \param native_port_id The id of the native port to close. + /// \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. /// - /// \return Returns true if the port was closed successfully. - bool Dart_CloseNativePort( - int native_port_id, + /// \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_CloseNativePort( - native_port_id, + return _Dart_NewStringFromUTF32( + utf32_array, + length, ); } - late final _Dart_CloseNativePortPtr = - _lookup>( - 'Dart_CloseNativePort'); - late final _Dart_CloseNativePort = - _Dart_CloseNativePortPtr.asFunction(); + 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)>(); - /// Forces all loaded classes and functions to be compiled eagerly in - /// the current isolate.. + /// Returns a String which references an external array of + /// Latin-1 (ISO-8859-1) encoded characters. /// - /// TODO(turnidge): Document. - Object Dart_CompileAll() { - return _Dart_CompileAll(); + /// \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_CompileAllPtr = - _lookup>('Dart_CompileAll'); - late final _Dart_CompileAll = - _Dart_CompileAllPtr.asFunction(); + 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)>(); - /// Finalizes all classes. - Object Dart_FinalizeAllClasses() { - return _Dart_FinalizeAllClasses(); + /// 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_FinalizeAllClassesPtr = - _lookup>( - 'Dart_FinalizeAllClasses'); - late final _Dart_FinalizeAllClasses = - _Dart_FinalizeAllClassesPtr.asFunction(); + 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)>(); - /// This function is intentionally undocumented. + /// Gets the C string representation of a String. + /// (It is a sequence of UTF-8 encoded values with a '\0' termination.) /// - /// It should not be used outside internal tests. - ffi.Pointer Dart_ExecuteInternalCommand( - ffi.Pointer command, - ffi.Pointer arg, + /// \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_ExecuteInternalCommand( - command, - arg, + return _Dart_StringToCString( + str, + cstr, ); } - late final _Dart_ExecuteInternalCommandPtr = _lookup< + late final _Dart_StringToCStringPtr = _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)>(); + ffi.Handle Function(ffi.Handle, + ffi.Pointer>)>>('Dart_StringToCString'); + late final _Dart_StringToCString = _Dart_StringToCStringPtr.asFunction< + Object Function(Object, ffi.Pointer>)>(); - /// \mainpage Dynamically Linked Dart API + /// Gets a UTF-8 encoded representation of a String. /// - /// This exposes a subset of symbols from dart_api.h and dart_native_api.h - /// available in every Dart embedder through dynamic linking. + /// 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. /// - /// All symbols are postfixed with _DL to indicate that they are dynamically - /// linked and to prevent conflicts with the original symbol. + /// \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. /// - /// Link `dart_api_dl.c` file into your library and invoke - /// `Dart_InitializeApiDL` with `NativeApi.initializeApiDLData`. - int Dart_InitializeApiDL( - ffi.Pointer data, + /// \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_InitializeApiDL( - data, + return _Dart_StringToUTF8( + str, + utf8_array, + length, ); } - late final _Dart_InitializeApiDLPtr = - _lookup)>>( - 'Dart_InitializeApiDL'); - late final _Dart_InitializeApiDL = _Dart_InitializeApiDLPtr.asFunction< - int Function(ffi.Pointer)>(); + 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 ffi.Pointer _Dart_PostCObject_DL = - _lookup('Dart_PostCObject_DL'); + /// 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, + ); + } - Dart_PostCObject_Type get Dart_PostCObject_DL => _Dart_PostCObject_DL.value; + 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)>(); - set Dart_PostCObject_DL(Dart_PostCObject_Type value) => - _Dart_PostCObject_DL.value = value; + /// 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 ffi.Pointer _Dart_PostInteger_DL = - _lookup('Dart_PostInteger_DL'); + 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)>(); - Dart_PostInteger_Type get Dart_PostInteger_DL => _Dart_PostInteger_DL.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_StringStorageSize( + str, + size, + ); + } - set Dart_PostInteger_DL(Dart_PostInteger_Type value) => - _Dart_PostInteger_DL.value = value; + 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 ffi.Pointer _Dart_NewNativePort_DL = - _lookup('Dart_NewNativePort_DL'); + /// 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, + ); + } - Dart_NewNativePort_Type get Dart_NewNativePort_DL => - _Dart_NewNativePort_DL.value; + 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>)>(); - set Dart_NewNativePort_DL(Dart_NewNativePort_Type value) => - _Dart_NewNativePort_DL.value = 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_NewList( + length, + ); + } - late final ffi.Pointer _Dart_CloseNativePort_DL = - _lookup('Dart_CloseNativePort_DL'); + late final _Dart_NewListPtr = + _lookup>( + 'Dart_NewList'); + late final _Dart_NewList = + _Dart_NewListPtr.asFunction(); - Dart_CloseNativePort_Type get Dart_CloseNativePort_DL => - _Dart_CloseNativePort_DL.value; + /// 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, + ); + } - set Dart_CloseNativePort_DL(Dart_CloseNativePort_Type value) => - _Dart_CloseNativePort_DL.value = value; + late final _Dart_NewListOfPtr = + _lookup>( + 'Dart_NewListOf'); + late final _Dart_NewListOf = + _Dart_NewListOfPtr.asFunction(); - late final ffi.Pointer _Dart_IsError_DL = - _lookup('Dart_IsError_DL'); + /// 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, + ); + } - Dart_IsError_Type get Dart_IsError_DL => _Dart_IsError_DL.value; + late final _Dart_NewListOfTypePtr = + _lookup>( + 'Dart_NewListOfType'); + late final _Dart_NewListOfType = + _Dart_NewListOfTypePtr.asFunction(); - set Dart_IsError_DL(Dart_IsError_Type value) => - _Dart_IsError_DL.value = value; + /// 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 ffi.Pointer _Dart_IsApiError_DL = - _lookup('Dart_IsApiError_DL'); + 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(); - Dart_IsApiError_Type get Dart_IsApiError_DL => _Dart_IsApiError_DL.value; + /// 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, + ); + } - set Dart_IsApiError_DL(Dart_IsApiError_Type value) => - _Dart_IsApiError_DL.value = value; + 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 ffi.Pointer - _Dart_IsUnhandledExceptionError_DL = - _lookup( - 'Dart_IsUnhandledExceptionError_DL'); + /// 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, + ); + } - Dart_IsUnhandledExceptionError_Type get Dart_IsUnhandledExceptionError_DL => - _Dart_IsUnhandledExceptionError_DL.value; + late final _Dart_ListGetAtPtr = + _lookup>( + 'Dart_ListGetAt'); + late final _Dart_ListGetAt = + _Dart_ListGetAtPtr.asFunction(); - set Dart_IsUnhandledExceptionError_DL( - Dart_IsUnhandledExceptionError_Type value) => - _Dart_IsUnhandledExceptionError_DL.value = value; + /// 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 ffi.Pointer - _Dart_IsCompilationError_DL = - _lookup('Dart_IsCompilationError_DL'); + 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)>(); - Dart_IsCompilationError_Type get Dart_IsCompilationError_DL => - _Dart_IsCompilationError_DL.value; + /// 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, + ); + } - set Dart_IsCompilationError_DL(Dart_IsCompilationError_Type value) => - _Dart_IsCompilationError_DL.value = 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(); - late final ffi.Pointer _Dart_IsFatalError_DL = - _lookup('Dart_IsFatalError_DL'); + /// 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, + ); + } - Dart_IsFatalError_Type get Dart_IsFatalError_DL => - _Dart_IsFatalError_DL.value; + 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)>(); - set Dart_IsFatalError_DL(Dart_IsFatalError_Type value) => - _Dart_IsFatalError_DL.value = value; + /// 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 ffi.Pointer _Dart_GetError_DL = - _lookup('Dart_GetError_DL'); + 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)>(); - Dart_GetError_Type get Dart_GetError_DL => _Dart_GetError_DL.value; + /// 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, + ); + } - set Dart_GetError_DL(Dart_GetError_Type value) => - _Dart_GetError_DL.value = value; + late final _Dart_MapGetAtPtr = + _lookup>( + 'Dart_MapGetAt'); + late final _Dart_MapGetAt = + _Dart_MapGetAtPtr.asFunction(); - late final ffi.Pointer - _Dart_ErrorHasException_DL = - _lookup('Dart_ErrorHasException_DL'); + /// 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, + ); + } - Dart_ErrorHasException_Type get Dart_ErrorHasException_DL => - _Dart_ErrorHasException_DL.value; + late final _Dart_MapContainsKeyPtr = + _lookup>( + 'Dart_MapContainsKey'); + late final _Dart_MapContainsKey = + _Dart_MapContainsKeyPtr.asFunction(); - set Dart_ErrorHasException_DL(Dart_ErrorHasException_Type value) => - _Dart_ErrorHasException_DL.value = value; + /// 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 ffi.Pointer - _Dart_ErrorGetException_DL = - _lookup('Dart_ErrorGetException_DL'); + late final _Dart_MapKeysPtr = + _lookup>( + 'Dart_MapKeys'); + late final _Dart_MapKeys = + _Dart_MapKeysPtr.asFunction(); - Dart_ErrorGetException_Type get Dart_ErrorGetException_DL => - _Dart_ErrorGetException_DL.value; + /// 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, + ); + } - set Dart_ErrorGetException_DL(Dart_ErrorGetException_Type value) => - _Dart_ErrorGetException_DL.value = value; + late final _Dart_GetTypeOfTypedDataPtr = + _lookup>( + 'Dart_GetTypeOfTypedData'); + late final _Dart_GetTypeOfTypedData = + _Dart_GetTypeOfTypedDataPtr.asFunction(); - 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 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 __objc_msgSend_470( - obj, - sel, - sendPort, + return _Dart_GetTypeOfExternalTypedData( + 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_GetTypeOfExternalTypedDataPtr = + _lookup>( + 'Dart_GetTypeOfExternalTypedData'); + late final _Dart_GetTypeOfExternalTypedData = + _Dart_GetTypeOfExternalTypedDataPtr.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, + /// 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 __objc_msgSend_471( - obj, - sel, - task, - config, + return _Dart_NewTypedData( + type, + length, ); } - 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_NewTypedDataPtr = + _lookup>( + 'Dart_NewTypedData'); + late final _Dart_NewTypedData = + _Dart_NewTypedDataPtr.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, + /// 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 __objc_msgSend_472( - obj, - sel, - session, - task, + return _Dart_NewExternalTypedData( + type, + data, + length, ); } - late final __objc_msgSend_472Ptr = _lookup< + late final _Dart_NewExternalTypedDataPtr = _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.Int32, ffi.Pointer, + ffi.IntPtr)>>('Dart_NewExternalTypedData'); + late final _Dart_NewExternalTypedData = _Dart_NewExternalTypedDataPtr + .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, + /// 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 __objc_msgSend_473( - obj, - sel, + return _Dart_NewExternalTypedDataWithFinalizer( + type, + data, + length, + peer, + external_allocation_size, + callback, ); } - late final __objc_msgSend_473Ptr = _lookup< + late final _Dart_NewExternalTypedDataWithFinalizerPtr = _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.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 _class_NSLock1 = _getClass1("NSLock"); - late final _sel_lock1 = _registerName1("lock"); - ffi.Pointer _objc_msgSend_474( - ffi.Pointer obj, - ffi.Pointer sel, + /// 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 __objc_msgSend_474( - obj, - sel, + return _Dart_NewByteBuffer( + typed_data, ); } - 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 _Dart_NewByteBufferPtr = + _lookup>( + 'Dart_NewByteBuffer'); + late final _Dart_NewByteBuffer = + _Dart_NewByteBufferPtr.asFunction(); - 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, + /// 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 __objc_msgSend_475( - obj, - sel, - session, - task, - response, - request, + return _Dart_TypedDataAcquireData( + object, + type, + data, + len, ); } - late final __objc_msgSend_475Ptr = _lookup< + late final _Dart_TypedDataAcquireDataPtr = _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, + ffi.Pointer>, + ffi.Pointer)>>('Dart_TypedDataAcquireData'); + late final _Dart_TypedDataAcquireData = + _Dart_TypedDataAcquireDataPtr.asFunction< + Object Function(Object, 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, + /// 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 __objc_msgSend_476( - obj, - sel, - request, + return _Dart_TypedDataReleaseData( + object, ); } - 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, + 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 __objc_msgSend_477( - obj, - sel, + return _Dart_GetDataFromByteBuffer( + byte_buffer, ); } - 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_GetDataFromByteBufferPtr = + _lookup>( + 'Dart_GetDataFromByteBuffer'); + late final _Dart_GetDataFromByteBuffer = + _Dart_GetDataFromByteBufferPtr.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, + /// 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 __objc_msgSend_478( - obj, - sel, - session, - task, - response, + return _Dart_New( + type, + constructor_name, + number_of_arguments, + arguments, ); } - late final __objc_msgSend_478Ptr = _lookup< + late final _Dart_NewPtr = _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.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)>(); - late final _sel_finishWithDisposition_1 = - _registerName1("finishWithDisposition:"); - void _objc_msgSend_479( - ffi.Pointer obj, - ffi.Pointer sel, - int disposition, + /// 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 __objc_msgSend_479( - obj, - sel, - disposition, + return _Dart_Allocate( + type, ); } - 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 _Dart_AllocatePtr = + _lookup>( + 'Dart_Allocate'); + late final _Dart_Allocate = + _Dart_AllocatePtr.asFunction(); - late final _sel_disposition1 = _registerName1("disposition"); - int _objc_msgSend_480( - ffi.Pointer obj, - ffi.Pointer sel, + /// 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 __objc_msgSend_480( - obj, - sel, + return _Dart_AllocateWithNativeFields( + type, + num_native_fields, + native_fields, ); } - late final __objc_msgSend_480Ptr = _lookup< + late final _Dart_AllocateWithNativeFieldsPtr = _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.Handle Function(ffi.Handle, ffi.IntPtr, + ffi.Pointer)>>('Dart_AllocateWithNativeFields'); + late final _Dart_AllocateWithNativeFields = _Dart_AllocateWithNativeFieldsPtr + .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, + /// 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 __objc_msgSend_481( - obj, - sel, - session, - task, - data, + return _Dart_Invoke( + target, + name, + number_of_arguments, + arguments, ); } - late final __objc_msgSend_481Ptr = _lookup< + late final _Dart_InvokePtr = _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.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)>(); - 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, + /// 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 __objc_msgSend_482( - obj, - sel, - session, - task, - error, + return _Dart_InvokeClosure( + closure, + number_of_arguments, + arguments, ); } - late final __objc_msgSend_482Ptr = _lookup< + late final _Dart_InvokeClosurePtr = _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)>(); + 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 _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, + /// 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 __objc_msgSend_483( - obj, - sel, - session, - downloadTask, - location, + return _Dart_InvokeConstructor( + object, + name, + number_of_arguments, + arguments, ); } - late final __objc_msgSend_483Ptr = _lookup< + late final _Dart_InvokeConstructorPtr = _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"); -} + 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)>(); -class __mbstate_t extends ffi.Union { - @ffi.Array.multi([128]) - external ffi.Array __mbstate8; + /// 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, + ); + } - @ffi.LongLong() - external int _mbstateL; -} + late final _Dart_GetFieldPtr = + _lookup>( + 'Dart_GetField'); + late final _Dart_GetField = + _Dart_GetFieldPtr.asFunction(); -class __darwin_pthread_handler_rec extends ffi.Struct { - external ffi - .Pointer)>> - __routine; + /// 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, + ); + } - external ffi.Pointer __arg; + 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(); - external ffi.Pointer<__darwin_pthread_handler_rec> __next; -} + /// 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, + ); + } -class _opaque_pthread_attr_t extends ffi.Struct { - @ffi.Long() - external int __sig; + late final _Dart_ThrowExceptionPtr = + _lookup>( + 'Dart_ThrowException'); + late final _Dart_ThrowException = + _Dart_ThrowExceptionPtr.asFunction(); - @ffi.Array.multi([56]) - external ffi.Array __opaque; -} + /// 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, + ); + } -class _opaque_pthread_cond_t extends ffi.Struct { - @ffi.Long() - external int __sig; + late final _Dart_ReThrowExceptionPtr = + _lookup>( + 'Dart_ReThrowException'); + late final _Dart_ReThrowException = + _Dart_ReThrowExceptionPtr.asFunction(); - @ffi.Array.multi([40]) - external ffi.Array __opaque; -} + /// Gets the number of native instance fields in an object. + Object Dart_GetNativeInstanceFieldCount( + Object obj, + ffi.Pointer count, + ) { + return _Dart_GetNativeInstanceFieldCount( + obj, + count, + ); + } -class _opaque_pthread_condattr_t extends ffi.Struct { - @ffi.Long() - external int __sig; + 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)>(); - @ffi.Array.multi([8]) - external ffi.Array __opaque; -} + /// 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, + ); + } -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; + 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)>(); -class objc_class extends ffi.Opaque {} + /// 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, + ); + } -class objc_object extends ffi.Struct { - external ffi.Pointer isa; -} + 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(); -class ObjCObject extends ffi.Opaque {} + /// Extracts current isolate group data from the native arguments structure. + ffi.Pointer Dart_GetNativeIsolateGroupData( + Dart_NativeArguments args, + ) { + return _Dart_GetNativeIsolateGroupData( + args, + ); + } -class objc_selector extends ffi.Opaque {} + 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)>(); -class ObjCSel extends ffi.Opaque {} + /// 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, + ); + } -typedef objc_objectptr_t = 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, + ffi.Pointer, + ffi.Pointer)>(); -class _NSZone extends ffi.Opaque {} + /// Gets the native argument at some index. + Object Dart_GetNativeArgument( + Dart_NativeArguments args, + int index, + ) { + return _Dart_GetNativeArgument( + args, + index, + ); + } -class _ObjCWrapper implements ffi.Finalizable { - final ffi.Pointer _id; - final NativeCupertinoHttp _lib; - bool _pendingRelease; + late final _Dart_GetNativeArgumentPtr = _lookup< + ffi + .NativeFunction>( + 'Dart_GetNativeArgument'); + late final _Dart_GetNativeArgument = _Dart_GetNativeArgumentPtr.asFunction< + Object Function(Dart_NativeArguments, int)>(); - _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); - } + /// Gets the number of native arguments. + int Dart_GetNativeArgumentCount( + Dart_NativeArguments args, + ) { + return _Dart_GetNativeArgumentCount( + args, + ); } - /// 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_GetNativeArgumentCountPtr = + _lookup>( + 'Dart_GetNativeArgumentCount'); + late final _Dart_GetNativeArgumentCount = _Dart_GetNativeArgumentCountPtr + .asFunction(); - @override - bool operator ==(Object other) { - return other is _ObjCWrapper && _id == other._id; + /// 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, + ); } - @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_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)>(); - /// 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); + /// Gets the native field of the receiver. + Object Dart_GetNativeReceiver( + Dart_NativeArguments args, + ffi.Pointer value, + ) { + return _Dart_GetNativeReceiver( + args, + value, + ); } - /// 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_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)>(); - /// 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); + /// 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 void load(NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_1(_lib._class_NSObject1, _lib._sel_load1); - } + 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 void initialize(NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_1(_lib._class_NSObject1, _lib._sel_initialize1); + /// 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, + ); } - NSObject init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSObject._(_ret, _lib, retain: true, 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 NSObject new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSObject1, _lib._sel_new1); - return NSObject._(_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 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_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 NSObject alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSObject1, _lib._sel_alloc1); - return NSObject._(_ret, _lib, retain: false, 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, + ); } - void dealloc() { - return _lib._objc_msgSend_1(_id, _lib._sel_dealloc1); - } + 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)>(); - void finalize() { - return _lib._objc_msgSend_1(_id, _lib._sel_finalize1); + /// 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, + ); } - NSObject copy() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_copy1); - return NSObject._(_ret, _lib, retain: false, release: true); - } + late final _Dart_SetReturnValuePtr = _lookup< + ffi + .NativeFunction>( + 'Dart_SetReturnValue'); + late final _Dart_SetReturnValue = _Dart_SetReturnValuePtr.asFunction< + void Function(Dart_NativeArguments, Object)>(); - NSObject mutableCopy() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_mutableCopy1); - return NSObject._(_ret, _lib, retain: false, release: true); + void Dart_SetWeakHandleReturnValue( + Dart_NativeArguments args, + Dart_WeakPersistentHandle rval, + ) { + return _Dart_SetWeakHandleReturnValue( + args, + rval, + ); } - 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_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)>(); - 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); + void Dart_SetBooleanReturnValue( + Dart_NativeArguments args, + bool retval, + ) { + return _Dart_SetBooleanReturnValue( + args, + retval, + ); } - static bool instancesRespondToSelector_( - NativeCupertinoHttp _lib, ffi.Pointer aSelector) { - return _lib._objc_msgSend_4(_lib._class_NSObject1, - _lib._sel_instancesRespondToSelector_1, aSelector); - } + late final _Dart_SetBooleanReturnValuePtr = _lookup< + ffi + .NativeFunction>( + 'Dart_SetBooleanReturnValue'); + late final _Dart_SetBooleanReturnValue = _Dart_SetBooleanReturnValuePtr + .asFunction(); - static bool conformsToProtocol_( - NativeCupertinoHttp _lib, Protocol? protocol) { - return _lib._objc_msgSend_5(_lib._class_NSObject1, - _lib._sel_conformsToProtocol_1, protocol?._id ?? ffi.nullptr); + void Dart_SetIntegerReturnValue( + Dart_NativeArguments args, + int retval, + ) { + return _Dart_SetIntegerReturnValue( + args, + retval, + ); } - IMP methodForSelector_(ffi.Pointer aSelector) { - return _lib._objc_msgSend_6(_id, _lib._sel_methodForSelector_1, aSelector); - } + late final _Dart_SetIntegerReturnValuePtr = _lookup< + ffi + .NativeFunction>( + 'Dart_SetIntegerReturnValue'); + late final _Dart_SetIntegerReturnValue = _Dart_SetIntegerReturnValuePtr + .asFunction(); - static IMP instanceMethodForSelector_( - NativeCupertinoHttp _lib, ffi.Pointer aSelector) { - return _lib._objc_msgSend_6(_lib._class_NSObject1, - _lib._sel_instanceMethodForSelector_1, aSelector); + void Dart_SetDoubleReturnValue( + Dart_NativeArguments args, + double retval, + ) { + return _Dart_SetDoubleReturnValue( + args, + retval, + ); } - void doesNotRecognizeSelector_(ffi.Pointer aSelector) { - return _lib._objc_msgSend_7( - _id, _lib._sel_doesNotRecognizeSelector_1, aSelector); - } + late final _Dart_SetDoubleReturnValuePtr = _lookup< + ffi + .NativeFunction>( + 'Dart_SetDoubleReturnValue'); + late final _Dart_SetDoubleReturnValue = _Dart_SetDoubleReturnValuePtr + .asFunction(); - 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); + /// 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, + ); } - void forwardInvocation_(NSInvocation? anInvocation) { - return _lib._objc_msgSend_9( - _id, _lib._sel_forwardInvocation_1, anInvocation?._id ?? ffi.nullptr); - } + late final _Dart_SetEnvironmentCallbackPtr = _lookup< + ffi.NativeFunction>( + 'Dart_SetEnvironmentCallback'); + late final _Dart_SetEnvironmentCallback = _Dart_SetEnvironmentCallbackPtr + .asFunction(); - 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); + /// 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, + ); } - 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_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)>(); - bool allowsWeakReference() { - return _lib._objc_msgSend_11(_id, _lib._sel_allowsWeakReference1); + /// 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, + ); } - bool retainWeakReference() { - return _lib._objc_msgSend_11(_id, _lib._sel_retainWeakReference1); - } + 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)>(); - static bool isSubclassOfClass_(NativeCupertinoHttp _lib, NSObject aClass) { - return _lib._objc_msgSend_0( - _lib._class_NSObject1, _lib._sel_isSubclassOfClass_1, aClass._id); + /// 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, + ); } - static bool resolveClassMethod_( - NativeCupertinoHttp _lib, ffi.Pointer sel) { - return _lib._objc_msgSend_4( - _lib._class_NSObject1, _lib._sel_resolveClassMethod_1, sel); - } + 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)>(); - static bool resolveInstanceMethod_( - NativeCupertinoHttp _lib, ffi.Pointer sel) { - return _lib._objc_msgSend_4( - _lib._class_NSObject1, _lib._sel_resolveInstanceMethod_1, sel); + /// 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, + ); } - static int hash(NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_12(_lib._class_NSObject1, _lib._sel_hash1); - } + 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 superclass(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSObject1, _lib._sel_superclass1); - 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, + ); } - 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_SetLibraryTagHandlerPtr = + _lookup>( + 'Dart_SetLibraryTagHandler'); + late final _Dart_SetLibraryTagHandler = _Dart_SetLibraryTagHandlerPtr + .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); + /// 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, + ); } - 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_SetDeferredLoadHandlerPtr = _lookup< + ffi.NativeFunction>( + 'Dart_SetDeferredLoadHandler'); + late final _Dart_SetDeferredLoadHandler = _Dart_SetDeferredLoadHandlerPtr + .asFunction(); - static int version(NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_81(_lib._class_NSObject1, _lib._sel_version1); + /// 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 void setVersion_(NativeCupertinoHttp _lib, int aVersion) { - return _lib._objc_msgSend_275( - _lib._class_NSObject1, _lib._sel_setVersion_1, aVersion); - } + 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)>(); - NSObject get classForCoder { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_classForCoder1); - return NSObject._(_ret, _lib, retain: true, release: true); + /// 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, + ); } - 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_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)>(); - 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); + /// 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, + ); } - static void poseAsClass_(NativeCupertinoHttp _lib, NSObject aClass) { - return _lib._objc_msgSend_200( - _lib._class_NSObject1, _lib._sel_poseAsClass_1, aClass._id); - } + late final _Dart_DefaultCanonicalizeUrlPtr = + _lookup>( + 'Dart_DefaultCanonicalizeUrl'); + late final _Dart_DefaultCanonicalizeUrl = _Dart_DefaultCanonicalizeUrlPtr + .asFunction(); - NSObject get autoContentAccessingProxy { - final _ret = - _lib._objc_msgSend_2(_id, _lib._sel_autoContentAccessingProxy1); - return NSObject._(_ret, _lib, retain: true, release: true); + /// 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, + ); } - 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_LoadScriptFromKernelPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Pointer, + ffi.IntPtr)>>('Dart_LoadScriptFromKernel'); + late final _Dart_LoadScriptFromKernel = _Dart_LoadScriptFromKernelPtr + .asFunction, int)>(); - void URLResourceDidFinishLoading_(NSURL? sender) { - return _lib._objc_msgSend_277(_id, _lib._sel_URLResourceDidFinishLoading_1, - sender?._id ?? ffi.nullptr); + /// 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(); } - void URLResourceDidCancelLoading_(NSURL? sender) { - return _lib._objc_msgSend_277(_id, _lib._sel_URLResourceDidCancelLoading_1, - sender?._id ?? ffi.nullptr); - } + late final _Dart_RootLibraryPtr = + _lookup>('Dart_RootLibrary'); + late final _Dart_RootLibrary = + _Dart_RootLibraryPtr.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); + /// 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, + ); } - /// 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_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. /// - /// - (void)didPresentErrorWithRecovery:(BOOL)didRecover contextInfo:(void *)contextInfo; + /// \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. /// - /// 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 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, + ); } -} - -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_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)>(); - /// 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); + /// 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, + ); } - /// 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_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)>(); - /// 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); + /// 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, + ); } -} - -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_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)>(); - /// 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); + /// 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, + ); } - /// 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_TypeToNullableTypePtr = + _lookup>( + 'Dart_TypeToNullableType'); + late final _Dart_TypeToNullableType = + _Dart_TypeToNullableTypePtr.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); + /// 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, + ); } -} -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_TypeToNonNullableTypePtr = + _lookup>( + 'Dart_TypeToNonNullableType'); + late final _Dart_TypeToNonNullableType = + _Dart_TypeToNonNullableTypePtr.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); + /// 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 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_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)>(); - /// 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); + Object Dart_IsNonNullableType( + Object type, + ffi.Pointer result, + ) { + return _Dart_IsNonNullableType( + type, + result, + ); } -} - -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_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 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); + Object Dart_IsLegacyType( + Object type, + ffi.Pointer result, + ) { + return _Dart_IsLegacyType( + type, + result, + ); } - /// 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_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)>(); - /// 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); + /// 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, + ); } - 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_GetClassPtr = + _lookup>( + 'Dart_GetClass'); + late final _Dart_GetClass = + _Dart_GetClassPtr.asFunction(); - @override - String toString() { - final data = - dataUsingEncoding_(0x94000100 /* NSUTF16LittleEndianStringEncoding */); - return data.bytes.cast().toDartString(length: length); + /// Returns an import path to a Library, such as "file:///test.dart" or + /// "dart:core". + Object Dart_LibraryUrl( + Object library1, + ) { + return _Dart_LibraryUrl( + library1, + ); } - int get length { - return _lib._objc_msgSend_12(_id, _lib._sel_length1); - } + late final _Dart_LibraryUrlPtr = + _lookup>( + 'Dart_LibraryUrl'); + late final _Dart_LibraryUrl = + _Dart_LibraryUrlPtr.asFunction(); - int characterAtIndex_(int index) { - return _lib._objc_msgSend_13(_id, _lib._sel_characterAtIndex_1, index); + /// Returns a URL from which a Library was loaded. + Object Dart_LibraryResolvedUrl( + Object library1, + ) { + return _Dart_LibraryResolvedUrl( + library1, + ); } - @override - NSString init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSString._(_ret, _lib, retain: true, release: true); - } + late final _Dart_LibraryResolvedUrlPtr = + _lookup>( + 'Dart_LibraryResolvedUrl'); + late final _Dart_LibraryResolvedUrl = + _Dart_LibraryResolvedUrlPtr.asFunction(); - 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); + /// \return An array of libraries. + Object Dart_GetLoadedLibraries() { + return _Dart_GetLoadedLibraries(); } - 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_GetLoadedLibrariesPtr = + _lookup>( + 'Dart_GetLoadedLibraries'); + late final _Dart_GetLoadedLibraries = + _Dart_GetLoadedLibrariesPtr.asFunction(); - NSString substringToIndex_(int to) { - final _ret = _lib._objc_msgSend_15(_id, _lib._sel_substringToIndex_1, to); - return NSString._(_ret, _lib, retain: true, release: true); + Object Dart_LookupLibrary( + Object url, + ) { + return _Dart_LookupLibrary( + url, + ); } - 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 _Dart_LookupLibraryPtr = + _lookup>( + 'Dart_LookupLibrary'); + late final _Dart_LookupLibrary = + _Dart_LookupLibraryPtr.asFunction(); - void getCharacters_range_(ffi.Pointer buffer, NSRange range) { - return _lib._objc_msgSend_17( - _id, _lib._sel_getCharacters_range_1, buffer, range); + /// 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, + ); } - int compare_(NSString? string) { - return _lib._objc_msgSend_18( - _id, _lib._sel_compare_1, string?._id ?? ffi.nullptr); - } + late final _Dart_LibraryHandleErrorPtr = + _lookup>( + 'Dart_LibraryHandleError'); + late final _Dart_LibraryHandleError = + _Dart_LibraryHandleErrorPtr.asFunction(); - int compare_options_(NSString? string, int mask) { - return _lib._objc_msgSend_19( - _id, _lib._sel_compare_options_1, string?._id ?? ffi.nullptr, mask); + /// 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, + ); } - 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); - } + late final _Dart_LoadLibraryFromKernelPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Pointer, + ffi.IntPtr)>>('Dart_LoadLibraryFromKernel'); + late final _Dart_LoadLibraryFromKernel = _Dart_LoadLibraryFromKernelPtr + .asFunction, int)>(); - 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); + /// 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, + ); } - int caseInsensitiveCompare_(NSString? string) { - return _lib._objc_msgSend_18( - _id, _lib._sel_caseInsensitiveCompare_1, string?._id ?? ffi.nullptr); - } + late final _Dart_FinalizeLoadingPtr = + _lookup>( + 'Dart_FinalizeLoading'); + late final _Dart_FinalizeLoading = + _Dart_FinalizeLoadingPtr.asFunction(); - int localizedCompare_(NSString? string) { - return _lib._objc_msgSend_18( - _id, _lib._sel_localizedCompare_1, string?._id ?? ffi.nullptr); + /// 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, + ); } - int localizedCaseInsensitiveCompare_(NSString? string) { - return _lib._objc_msgSend_18( - _id, - _lib._sel_localizedCaseInsensitiveCompare_1, - string?._id ?? ffi.nullptr); - } + 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>)>(); - int localizedStandardCompare_(NSString? string) { - return _lib._objc_msgSend_18( - _id, _lib._sel_localizedStandardCompare_1, string?._id ?? ffi.nullptr); + /// 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, + ); } - bool isEqualToString_(NSString? aString) { - return _lib._objc_msgSend_22( - _id, _lib._sel_isEqualToString_1, aString?._id ?? ffi.nullptr); - } + 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 hasPrefix_(NSString? str) { - return _lib._objc_msgSend_22( - _id, _lib._sel_hasPrefix_1, str?._id ?? ffi.nullptr); + bool Dart_IsKernelIsolate( + Dart_Isolate isolate, + ) { + return _Dart_IsKernelIsolate( + isolate, + ); } - bool hasSuffix_(NSString? str) { - return _lib._objc_msgSend_22( - _id, _lib._sel_hasSuffix_1, str?._id ?? ffi.nullptr); - } + late final _Dart_IsKernelIsolatePtr = + _lookup>( + 'Dart_IsKernelIsolate'); + late final _Dart_IsKernelIsolate = + _Dart_IsKernelIsolatePtr.asFunction(); - 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 Dart_KernelIsolateIsRunning() { + return _Dart_KernelIsolateIsRunning(); } - bool containsString_(NSString? str) { - return _lib._objc_msgSend_22( - _id, _lib._sel_containsString_1, str?._id ?? ffi.nullptr); - } + late final _Dart_KernelIsolateIsRunningPtr = + _lookup>( + 'Dart_KernelIsolateIsRunning'); + late final _Dart_KernelIsolateIsRunning = + _Dart_KernelIsolateIsRunningPtr.asFunction(); - bool localizedCaseInsensitiveContainsString_(NSString? str) { - return _lib._objc_msgSend_22( - _id, - _lib._sel_localizedCaseInsensitiveContainsString_1, - str?._id ?? ffi.nullptr); + int Dart_KernelPort() { + return _Dart_KernelPort(); } - bool localizedStandardContainsString_(NSString? str) { - return _lib._objc_msgSend_22(_id, - _lib._sel_localizedStandardContainsString_1, str?._id ?? ffi.nullptr); - } + late final _Dart_KernelPortPtr = + _lookup>('Dart_KernelPort'); + late final _Dart_KernelPort = + _Dart_KernelPortPtr.asFunction(); - NSRange localizedStandardRangeOfString_(NSString? str) { - return _lib._objc_msgSend_24(_id, - _lib._sel_localizedStandardRangeOfString_1, str?._id ?? ffi.nullptr); + /// 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, + ); } - NSRange rangeOfString_(NSString? searchString) { - return _lib._objc_msgSend_24( - _id, _lib._sel_rangeOfString_1, searchString?._id ?? ffi.nullptr); - } + 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)>(); - NSRange rangeOfString_options_(NSString? searchString, int mask) { - return _lib._objc_msgSend_25(_id, _lib._sel_rangeOfString_options_1, - searchString?._id ?? ffi.nullptr, mask); + Dart_KernelCompilationResult Dart_KernelListDependencies() { + return _Dart_KernelListDependencies(); } - 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); - } + late final _Dart_KernelListDependenciesPtr = + _lookup>( + 'Dart_KernelListDependencies'); + late final _Dart_KernelListDependencies = _Dart_KernelListDependenciesPtr + .asFunction(); - 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); + /// 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, + ); } - 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 _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)>(); - NSRange rangeOfComposedCharacterSequenceAtIndex_(int index) { - return _lib._objc_msgSend_231( - _id, _lib._sel_rangeOfComposedCharacterSequenceAtIndex_1, index); + /// 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, + ); } - NSRange rangeOfComposedCharacterSequencesForRange_(NSRange range) { - return _lib._objc_msgSend_232( - _id, _lib._sel_rangeOfComposedCharacterSequencesForRange_1, range); - } + 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)>(); - 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); + /// 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, + ); } - 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); - } + late final _Dart_IsServiceIsolatePtr = + _lookup>( + 'Dart_IsServiceIsolate'); + late final _Dart_IsServiceIsolate = + _Dart_IsServiceIsolatePtr.asFunction(); - double get doubleValue { - return _lib._objc_msgSend_85(_id, _lib._sel_doubleValue1); + /// 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, + ); } - double get floatValue { - return _lib._objc_msgSend_84(_id, _lib._sel_floatValue1); - } + late final _Dart_WriteProfileToTimelinePtr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + Dart_Port, ffi.Pointer>)>>( + 'Dart_WriteProfileToTimeline'); + late final _Dart_WriteProfileToTimeline = _Dart_WriteProfileToTimelinePtr + .asFunction>)>(); - int get intValue { - return _lib._objc_msgSend_79(_id, _lib._sel_intValue1); + /// 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(); } - int get integerValue { - return _lib._objc_msgSend_81(_id, _lib._sel_integerValue1); - } + late final _Dart_PrecompilePtr = + _lookup>('Dart_Precompile'); + late final _Dart_Precompile = + _Dart_PrecompilePtr.asFunction(); - int get longLongValue { - return _lib._objc_msgSend_82(_id, _lib._sel_longLongValue1); + Object Dart_LoadingUnitLibraryUris( + int loading_unit_id, + ) { + return _Dart_LoadingUnitLibraryUris( + loading_unit_id, + ); } - bool get boolValue { - return _lib._objc_msgSend_11(_id, _lib._sel_boolValue1); - } + late final _Dart_LoadingUnitLibraryUrisPtr = + _lookup>( + 'Dart_LoadingUnitLibraryUris'); + late final _Dart_LoadingUnitLibraryUris = + _Dart_LoadingUnitLibraryUrisPtr.asFunction(); - 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); + /// 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, + ); } - 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 _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)>(); - 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); + 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, + ); } - 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); - } + 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)>(); - 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); + /// 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 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 _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)>(); - 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); + 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 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 _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)>(); - 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); + /// 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, + ); } - 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_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)>(); - NSRange lineRangeForRange_(NSRange range) { - return _lib._objc_msgSend_232(_id, _lib._sel_lineRangeForRange_1, range); + /// 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 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_SortClassesPtr = + _lookup>('Dart_SortClasses'); + late final _Dart_SortClasses = + _Dart_SortClassesPtr.asFunction(); - NSRange paragraphRangeForRange_(NSRange range) { - return _lib._objc_msgSend_232( - _id, _lib._sel_paragraphRangeForRange_1, range); + /// 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, + ); } - 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_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)>(); - void enumerateLinesUsingBlock_(ObjCBlock14 block) { - return _lib._objc_msgSend_236( - _id, _lib._sel_enumerateLinesUsingBlock_1, block._id); + /// 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, + ); } - ffi.Pointer get UTF8String { - return _lib._objc_msgSend_53(_id, _lib._sel_UTF8String1); - } + 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)>(); - int get fastestEncoding { - return _lib._objc_msgSend_12(_id, _lib._sel_fastestEncoding1); + /// 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, + ); } - int get smallestEncoding { - return _lib._objc_msgSend_12(_id, _lib._sel_smallestEncoding1); - } + 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)>(); - 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 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(); } - 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_IsPrecompiledRuntimePtr = + _lookup>( + 'Dart_IsPrecompiledRuntime'); + late final _Dart_IsPrecompiledRuntime = + _Dart_IsPrecompiledRuntimePtr.asFunction(); - bool canBeConvertedToEncoding_(int encoding) { - return _lib._objc_msgSend_117( - _id, _lib._sel_canBeConvertedToEncoding_1, encoding); + /// 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, + ); } - ffi.Pointer cStringUsingEncoding_(int encoding) { - return _lib._objc_msgSend_239( - _id, _lib._sel_cStringUsingEncoding_1, encoding); - } + late final _Dart_DumpNativeStackTracePtr = + _lookup)>>( + 'Dart_DumpNativeStackTrace'); + late final _Dart_DumpNativeStackTrace = _Dart_DumpNativeStackTracePtr + .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); + /// Indicate that the process is about to abort, and the Dart VM should not + /// attempt to cleanup resources. + void Dart_PrepareToAbort() { + return _Dart_PrepareToAbort(); } - 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_PrepareToAbortPtr = + _lookup>('Dart_PrepareToAbort'); + late final _Dart_PrepareToAbort = + _Dart_PrepareToAbortPtr.asFunction(); - int maximumLengthOfBytesUsingEncoding_(int enc) { - return _lib._objc_msgSend_114( - _id, _lib._sel_maximumLengthOfBytesUsingEncoding_1, enc); + /// 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, + ); } - int lengthOfBytesUsingEncoding_(int enc) { - return _lib._objc_msgSend_114( - _id, _lib._sel_lengthOfBytesUsingEncoding_1, enc); - } + 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)>(); - static ffi.Pointer getAvailableStringEncodings( - NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_242( - _lib._class_NSString1, _lib._sel_availableStringEncodings1); + /// 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, + ); } - 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_PostIntegerPtr = + _lookup>( + 'Dart_PostInteger'); + late final _Dart_PostInteger = + _Dart_PostIntegerPtr.asFunction(); - static int getDefaultCStringEncoding(NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSString1, _lib._sel_defaultCStringEncoding1); + /// 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, + ); } - 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_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)>(); - 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); + /// 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, + ); } - 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_CloseNativePortPtr = + _lookup>( + 'Dart_CloseNativePort'); + late final _Dart_CloseNativePort = + _Dart_CloseNativePortPtr.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); + /// Forces all loaded classes and functions to be compiled eagerly in + /// the current isolate.. + /// + /// TODO(turnidge): Document. + Object Dart_CompileAll() { + return _Dart_CompileAll(); } - 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_CompileAllPtr = + _lookup>('Dart_CompileAll'); + late final _Dart_CompileAll = + _Dart_CompileAllPtr.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); + /// Finalizes all classes. + Object Dart_FinalizeAllClasses() { + return _Dart_FinalizeAllClasses(); } - 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_FinalizeAllClassesPtr = + _lookup>( + 'Dart_FinalizeAllClasses'); + late final _Dart_FinalizeAllClasses = + _Dart_FinalizeAllClassesPtr.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); + /// 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, + ); } - 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_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)>(); - 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); + /// \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, + ); } - 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_InitializeApiDLPtr = + _lookup)>>( + 'Dart_InitializeApiDL'); + late final _Dart_InitializeApiDL = _Dart_InitializeApiDLPtr.asFunction< + int Function(ffi.Pointer)>(); - 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); - } + late final ffi.Pointer _Dart_PostCObject_DL = + _lookup('Dart_PostCObject_DL'); - 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); - } + Dart_PostCObject_Type get Dart_PostCObject_DL => _Dart_PostCObject_DL.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); - } + set Dart_PostCObject_DL(Dart_PostCObject_Type value) => + _Dart_PostCObject_DL.value = 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 ffi.Pointer _Dart_PostInteger_DL = + _lookup('Dart_PostInteger_DL'); - 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); - } + Dart_PostInteger_Type get Dart_PostInteger_DL => _Dart_PostInteger_DL.value; - int get hash { - return _lib._objc_msgSend_12(_id, _lib._sel_hash1); - } + set Dart_PostInteger_DL(Dart_PostInteger_Type value) => + _Dart_PostInteger_DL.value = 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 ffi.Pointer _Dart_NewNativePort_DL = + _lookup('Dart_NewNativePort_DL'); - 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); - } + Dart_NewNativePort_Type get Dart_NewNativePort_DL => + _Dart_NewNativePort_DL.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); - } + set Dart_NewNativePort_DL(Dart_NewNativePort_Type value) => + _Dart_NewNativePort_DL.value = value; - 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); - } + late final ffi.Pointer _Dart_CloseNativePort_DL = + _lookup('Dart_CloseNativePort_DL'); - 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); - } + Dart_CloseNativePort_Type get Dart_CloseNativePort_DL => + _Dart_CloseNativePort_DL.value; - 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); - } + set Dart_CloseNativePort_DL(Dart_CloseNativePort_Type value) => + _Dart_CloseNativePort_DL.value = 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 ffi.Pointer _Dart_IsError_DL = + _lookup('Dart_IsError_DL'); - 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); - } + Dart_IsError_Type get Dart_IsError_DL => _Dart_IsError_DL.value; - 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); - } + set Dart_IsError_DL(Dart_IsError_Type value) => + _Dart_IsError_DL.value = value; - 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); - } + late final ffi.Pointer _Dart_IsApiError_DL = + _lookup('Dart_IsApiError_DL'); - 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); - } + Dart_IsApiError_Type get Dart_IsApiError_DL => _Dart_IsApiError_DL.value; - 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); - } + set Dart_IsApiError_DL(Dart_IsApiError_Type value) => + _Dart_IsApiError_DL.value = value; - 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 ffi.Pointer + _Dart_IsUnhandledExceptionError_DL = + _lookup( + 'Dart_IsUnhandledExceptionError_DL'); - 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); - } + Dart_IsUnhandledExceptionError_Type get Dart_IsUnhandledExceptionError_DL => + _Dart_IsUnhandledExceptionError_DL.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); - } + set Dart_IsUnhandledExceptionError_DL( + Dart_IsUnhandledExceptionError_Type value) => + _Dart_IsUnhandledExceptionError_DL.value = value; - 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); - } + late final ffi.Pointer + _Dart_IsCompilationError_DL = + _lookup('Dart_IsCompilationError_DL'); - 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); - } + Dart_IsCompilationError_Type get Dart_IsCompilationError_DL => + _Dart_IsCompilationError_DL.value; - 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); - } + set Dart_IsCompilationError_DL(Dart_IsCompilationError_Type value) => + _Dart_IsCompilationError_DL.value = value; - 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 ffi.Pointer _Dart_IsFatalError_DL = + _lookup('Dart_IsFatalError_DL'); - 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); - } + Dart_IsFatalError_Type get Dart_IsFatalError_DL => + _Dart_IsFatalError_DL.value; - 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); - } + set Dart_IsFatalError_DL(Dart_IsFatalError_Type value) => + _Dart_IsFatalError_DL.value = value; - 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); - } + late final ffi.Pointer _Dart_GetError_DL = + _lookup('Dart_GetError_DL'); - 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); - } + Dart_GetError_Type get Dart_GetError_DL => _Dart_GetError_DL.value; - 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); - } + set Dart_GetError_DL(Dart_GetError_Type value) => + _Dart_GetError_DL.value = value; - 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 ffi.Pointer + _Dart_ErrorHasException_DL = + _lookup('Dart_ErrorHasException_DL'); - 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); - } + Dart_ErrorHasException_Type get Dart_ErrorHasException_DL => + _Dart_ErrorHasException_DL.value; - 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); - } + set Dart_ErrorHasException_DL(Dart_ErrorHasException_Type value) => + _Dart_ErrorHasException_DL.value = value; - 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); - } + late final ffi.Pointer + _Dart_ErrorGetException_DL = + _lookup('Dart_ErrorGetException_DL'); - 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); - } + Dart_ErrorGetException_Type get Dart_ErrorGetException_DL => + _Dart_ErrorGetException_DL.value; - 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); - } + set Dart_ErrorGetException_DL(Dart_ErrorGetException_Type value) => + _Dart_ErrorGetException_DL.value = value; - NSObject propertyList() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_propertyList1); - return NSObject._(_ret, _lib, retain: true, release: true); - } + late final ffi.Pointer + _Dart_ErrorGetStackTrace_DL = + _lookup('Dart_ErrorGetStackTrace_DL'); - NSDictionary propertyListFromStringsFileFormat() { - final _ret = _lib._objc_msgSend_180( - _id, _lib._sel_propertyListFromStringsFileFormat1); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } + Dart_ErrorGetStackTrace_Type get Dart_ErrorGetStackTrace_DL => + _Dart_ErrorGetStackTrace_DL.value; - ffi.Pointer cString() { - return _lib._objc_msgSend_53(_id, _lib._sel_cString1); - } + set Dart_ErrorGetStackTrace_DL(Dart_ErrorGetStackTrace_Type value) => + _Dart_ErrorGetStackTrace_DL.value = value; - ffi.Pointer lossyCString() { - return _lib._objc_msgSend_53(_id, _lib._sel_lossyCString1); - } + late final ffi.Pointer _Dart_NewApiError_DL = + _lookup('Dart_NewApiError_DL'); - int cStringLength() { - return _lib._objc_msgSend_12(_id, _lib._sel_cStringLength1); - } + Dart_NewApiError_Type get Dart_NewApiError_DL => _Dart_NewApiError_DL.value; - void getCString_(ffi.Pointer bytes) { - return _lib._objc_msgSend_270(_id, _lib._sel_getCString_1, bytes); - } + set Dart_NewApiError_DL(Dart_NewApiError_Type value) => + _Dart_NewApiError_DL.value = value; - void getCString_maxLength_(ffi.Pointer bytes, int maxLength) { - return _lib._objc_msgSend_271( - _id, _lib._sel_getCString_maxLength_1, bytes, maxLength); - } + late final ffi.Pointer + _Dart_NewCompilationError_DL = + _lookup('Dart_NewCompilationError_DL'); - 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); - } + Dart_NewCompilationError_Type get Dart_NewCompilationError_DL => + _Dart_NewCompilationError_DL.value; - bool writeToFile_atomically_(NSString? path, bool useAuxiliaryFile) { - return _lib._objc_msgSend_37(_id, _lib._sel_writeToFile_atomically_1, - path?._id ?? ffi.nullptr, useAuxiliaryFile); - } + set Dart_NewCompilationError_DL(Dart_NewCompilationError_Type value) => + _Dart_NewCompilationError_DL.value = value; - 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 ffi.Pointer + _Dart_NewUnhandledExceptionError_DL = + _lookup( + 'Dart_NewUnhandledExceptionError_DL'); - 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); - } + Dart_NewUnhandledExceptionError_Type get Dart_NewUnhandledExceptionError_DL => + _Dart_NewUnhandledExceptionError_DL.value; - 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); - } + set Dart_NewUnhandledExceptionError_DL( + Dart_NewUnhandledExceptionError_Type value) => + _Dart_NewUnhandledExceptionError_DL.value = value; - 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 ffi.Pointer _Dart_PropagateError_DL = + _lookup('Dart_PropagateError_DL'); - 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); - } + Dart_PropagateError_Type get Dart_PropagateError_DL => + _Dart_PropagateError_DL.value; - 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); - } + set Dart_PropagateError_DL(Dart_PropagateError_Type value) => + _Dart_PropagateError_DL.value = value; - 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); - } + late final ffi.Pointer + _Dart_HandleFromPersistent_DL = + _lookup('Dart_HandleFromPersistent_DL'); - 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); - } + Dart_HandleFromPersistent_Type get Dart_HandleFromPersistent_DL => + _Dart_HandleFromPersistent_DL.value; - 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); - } + set Dart_HandleFromPersistent_DL(Dart_HandleFromPersistent_Type value) => + _Dart_HandleFromPersistent_DL.value = 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); - } + late final ffi.Pointer + _Dart_HandleFromWeakPersistent_DL = + _lookup( + 'Dart_HandleFromWeakPersistent_DL'); - void getCharacters_(ffi.Pointer buffer) { - return _lib._objc_msgSend_274(_id, _lib._sel_getCharacters_1, buffer); - } + Dart_HandleFromWeakPersistent_Type get Dart_HandleFromWeakPersistent_DL => + _Dart_HandleFromWeakPersistent_DL.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 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); - } + set Dart_HandleFromWeakPersistent_DL( + Dart_HandleFromWeakPersistent_Type value) => + _Dart_HandleFromWeakPersistent_DL.value = value; - /// 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); - } + late final ffi.Pointer + _Dart_NewPersistentHandle_DL = + _lookup('Dart_NewPersistentHandle_DL'); - NSString stringByAddingPercentEscapesUsingEncoding_(int enc) { - final _ret = _lib._objc_msgSend_15( - _id, _lib._sel_stringByAddingPercentEscapesUsingEncoding_1, enc); - return NSString._(_ret, _lib, retain: true, release: true); - } + Dart_NewPersistentHandle_Type get Dart_NewPersistentHandle_DL => + _Dart_NewPersistentHandle_DL.value; - 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 Dart_NewPersistentHandle_DL(Dart_NewPersistentHandle_Type value) => + _Dart_NewPersistentHandle_DL.value = 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); - } + late final ffi.Pointer + _Dart_SetPersistentHandle_DL = + _lookup('Dart_SetPersistentHandle_DL'); - 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); - } -} + Dart_SetPersistentHandle_Type get Dart_SetPersistentHandle_DL => + _Dart_SetPersistentHandle_DL.value; -extension StringToNSString on String { - NSString toNSString(NativeCupertinoHttp lib) => NSString(lib, this); -} + set Dart_SetPersistentHandle_DL(Dart_SetPersistentHandle_Type value) => + _Dart_SetPersistentHandle_DL.value = value; -typedef unichar = ffi.UnsignedShort; + late final ffi.Pointer + _Dart_DeletePersistentHandle_DL = + _lookup( + 'Dart_DeletePersistentHandle_DL'); -class NSCoder extends _ObjCWrapper { - NSCoder._(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 [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); - } + set Dart_DeletePersistentHandle_DL(Dart_DeletePersistentHandle_Type value) => + _Dart_DeletePersistentHandle_DL.value = value; - /// 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 ffi.Pointer + _Dart_NewWeakPersistentHandle_DL = + _lookup( + 'Dart_NewWeakPersistentHandle_DL'); - /// 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; + Dart_NewWeakPersistentHandle_Type get Dart_NewWeakPersistentHandle_DL => + _Dart_NewWeakPersistentHandle_DL.value; -class _NSRange extends ffi.Struct { - @NSUInteger() - external int location; + set Dart_NewWeakPersistentHandle_DL( + Dart_NewWeakPersistentHandle_Type value) => + _Dart_NewWeakPersistentHandle_DL.value = value; - @NSUInteger() - external int length; -} + late final ffi.Pointer + _Dart_DeleteWeakPersistentHandle_DL = + _lookup( + 'Dart_DeleteWeakPersistentHandle_DL'); -abstract class NSComparisonResult { - static const int NSOrderedAscending = -1; - static const int NSOrderedSame = 0; - static const int NSOrderedDescending = 1; -} + Dart_DeleteWeakPersistentHandle_Type get Dart_DeleteWeakPersistentHandle_DL => + _Dart_DeleteWeakPersistentHandle_DL.value; -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; -} + set Dart_DeleteWeakPersistentHandle_DL( + Dart_DeleteWeakPersistentHandle_Type value) => + _Dart_DeleteWeakPersistentHandle_DL.value = value; -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 ffi.Pointer + _Dart_UpdateExternalSize_DL = + _lookup('Dart_UpdateExternalSize_DL'); - /// 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); - } + Dart_UpdateExternalSize_Type get Dart_UpdateExternalSize_DL => + _Dart_UpdateExternalSize_DL.value; - /// 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); - } + set Dart_UpdateExternalSize_DL(Dart_UpdateExternalSize_Type value) => + _Dart_UpdateExternalSize_DL.value = 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); - } -} + late final ffi.Pointer + _Dart_NewFinalizableHandle_DL = + _lookup('Dart_NewFinalizableHandle_DL'); -class NSCharacterSet extends NSObject { - NSCharacterSet._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + Dart_NewFinalizableHandle_Type get Dart_NewFinalizableHandle_DL => + _Dart_NewFinalizableHandle_DL.value; - /// 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); - } + set Dart_NewFinalizableHandle_DL(Dart_NewFinalizableHandle_Type value) => + _Dart_NewFinalizableHandle_DL.value = value; - /// 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 ffi.Pointer + _Dart_DeleteFinalizableHandle_DL = + _lookup( + 'Dart_DeleteFinalizableHandle_DL'); - /// 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); - } + Dart_DeleteFinalizableHandle_Type get Dart_DeleteFinalizableHandle_DL => + _Dart_DeleteFinalizableHandle_DL.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); - } + set Dart_DeleteFinalizableHandle_DL( + Dart_DeleteFinalizableHandle_Type value) => + _Dart_DeleteFinalizableHandle_DL.value = value; - 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); - } + late final ffi.Pointer + _Dart_UpdateFinalizableExternalSize_DL = + _lookup( + 'Dart_UpdateFinalizableExternalSize_DL'); - 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); - } + Dart_UpdateFinalizableExternalSize_Type + get Dart_UpdateFinalizableExternalSize_DL => + _Dart_UpdateFinalizableExternalSize_DL.value; - 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); - } + set Dart_UpdateFinalizableExternalSize_DL( + Dart_UpdateFinalizableExternalSize_Type value) => + _Dart_UpdateFinalizableExternalSize_DL.value = value; - 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 ffi.Pointer _Dart_Post_DL = + _lookup('Dart_Post_DL'); - 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); - } + Dart_Post_Type get Dart_Post_DL => _Dart_Post_DL.value; - 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); - } + set Dart_Post_DL(Dart_Post_Type value) => _Dart_Post_DL.value = value; - 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); - } + late final ffi.Pointer _Dart_NewSendPort_DL = + _lookup('Dart_NewSendPort_DL'); - 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); - } + Dart_NewSendPort_Type get Dart_NewSendPort_DL => _Dart_NewSendPort_DL.value; - 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 Dart_NewSendPort_DL(Dart_NewSendPort_Type value) => + _Dart_NewSendPort_DL.value = 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); - } + late final ffi.Pointer _Dart_SendPortGetId_DL = + _lookup('Dart_SendPortGetId_DL'); - 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); - } + Dart_SendPortGetId_Type get Dart_SendPortGetId_DL => + _Dart_SendPortGetId_DL.value; - 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); - } + set Dart_SendPortGetId_DL(Dart_SendPortGetId_Type value) => + _Dart_SendPortGetId_DL.value = value; - 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); - } + late final ffi.Pointer _Dart_EnterScope_DL = + _lookup('Dart_EnterScope_DL'); - 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); - } + Dart_EnterScope_Type get Dart_EnterScope_DL => _Dart_EnterScope_DL.value; - 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 Dart_EnterScope_DL(Dart_EnterScope_Type value) => + _Dart_EnterScope_DL.value = value; - 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 ffi.Pointer _Dart_ExitScope_DL = + _lookup('Dart_ExitScope_DL'); - 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); - } + Dart_ExitScope_Type get Dart_ExitScope_DL => _Dart_ExitScope_DL.value; - 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); - } + set Dart_ExitScope_DL(Dart_ExitScope_Type value) => + _Dart_ExitScope_DL.value = value; - 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); + late final _class_CUPHTTPTaskConfiguration1 = + _getClass1("CUPHTTPTaskConfiguration"); + late final _sel_initWithPort_1 = _registerName1("initWithPort:"); + ffi.Pointer _objc_msgSend_496( + ffi.Pointer obj, + ffi.Pointer sel, + int sendPort, + ) { + return __objc_msgSend_496( + obj, + sel, + sendPort, + ); } - bool characterIsMember_(int aCharacter) { - return _lib._objc_msgSend_224( - _id, _lib._sel_characterIsMember_1, aCharacter); - } + late final __objc_msgSend_496Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, Dart_Port)>>('objc_msgSend'); + late final __objc_msgSend_496 = __objc_msgSend_496Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - 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); + late final _sel_sendPort1 = _registerName1("sendPort"); + late final _class_CUPHTTPClientDelegate1 = + _getClass1("CUPHTTPClientDelegate"); + late final _sel_registerTask_withConfiguration_1 = + _registerName1("registerTask:withConfiguration:"); + void _objc_msgSend_497( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer task, + ffi.Pointer config, + ) { + return __objc_msgSend_497( + obj, + sel, + task, + config, + ); } - 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 __objc_msgSend_497Ptr = _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< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - bool longCharacterIsMember_(int theLongChar) { - return _lib._objc_msgSend_225( - _id, _lib._sel_longCharacterIsMember_1, theLongChar); + late final _class_CUPHTTPForwardedDelegate1 = + _getClass1("CUPHTTPForwardedDelegate"); + late final _sel_initWithSession_task_1 = + _registerName1("initWithSession:task:"); + ffi.Pointer _objc_msgSend_498( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer session, + ffi.Pointer task, + ) { + return __objc_msgSend_498( + obj, + sel, + session, + task, + ); } - bool isSupersetOfSet_(NSCharacterSet? theOtherSet) { - return _lib._objc_msgSend_226( - _id, _lib._sel_isSupersetOfSet_1, theOtherSet?._id ?? ffi.nullptr); - } + 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_498 = __objc_msgSend_498Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - bool hasMemberInPlane_(int thePlane) { - return _lib._objc_msgSend_227(_id, _lib._sel_hasMemberInPlane_1, thePlane); + 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 obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_499( + obj, + sel, + ); } - /// 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 __objc_msgSend_499Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_499 = __objc_msgSend_499Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - /// 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); + late final _class_NSLock1 = _getClass1("NSLock"); + late final _sel_lock1 = _registerName1("lock"); + ffi.Pointer _objc_msgSend_500( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_500( + obj, + sel, + ); } - /// 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 __objc_msgSend_500Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_500 = __objc_msgSend_500Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - /// 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); + late final _class_CUPHTTPForwardedRedirect1 = + _getClass1("CUPHTTPForwardedRedirect"); + late final _sel_initWithSession_task_response_request_1 = + _registerName1("initWithSession:task:response:request:"); + ffi.Pointer _objc_msgSend_501( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer session, + ffi.Pointer task, + ffi.Pointer response, + ffi.Pointer request, + ) { + return __objc_msgSend_501( + obj, + sel, + session, + task, + response, + request, + ); } - /// 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 __objc_msgSend_501Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_501 = __objc_msgSend_501Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - /// 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); + late final _sel_finishWithRequest_1 = _registerName1("finishWithRequest:"); + ffi.Pointer _objc_msgSend_502( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_502( + obj, + sel, + ); } - 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 __objc_msgSend_502Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_502 = __objc_msgSend_502Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - 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); + 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_503( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer session, + ffi.Pointer task, + ffi.Pointer response, + ) { + return __objc_msgSend_503( + obj, + sel, + session, + task, + response, + ); } -} -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 __objc_msgSend_503Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_503 = __objc_msgSend_503Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + 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); + late final _sel_finishWithDisposition_1 = + _registerName1("finishWithDisposition:"); + void _objc_msgSend_504( + ffi.Pointer obj, + ffi.Pointer sel, + int disposition, + ) { + return __objc_msgSend_504( + obj, + sel, + disposition, + ); } - /// 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 __objc_msgSend_504Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_504 = __objc_msgSend_504Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - /// 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); + late final _sel_disposition1 = _registerName1("disposition"); + int _objc_msgSend_505( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_505( + obj, + sel, + ); } - int get length { - return _lib._objc_msgSend_12(_id, _lib._sel_length1); - } + late final __objc_msgSend_505Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_505 = __objc_msgSend_505Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - /// 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 _class_CUPHTTPForwardedData1 = _getClass1("CUPHTTPForwardedData"); + late final _sel_initWithSession_task_data_1 = + _registerName1("initWithSession:task:data:"); + ffi.Pointer _objc_msgSend_506( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer session, + ffi.Pointer task, + ffi.Pointer data, + ) { + return __objc_msgSend_506( + obj, + sel, + session, + task, + data, + ); } - 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 __objc_msgSend_506Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_506 = __objc_msgSend_506Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - void getBytes_length_(ffi.Pointer buffer, int length) { - return _lib._objc_msgSend_33( - _id, _lib._sel_getBytes_length_1, buffer, length); + late final _class_CUPHTTPForwardedComplete1 = + _getClass1("CUPHTTPForwardedComplete"); + late final _sel_initWithSession_task_error_1 = + _registerName1("initWithSession:task:error:"); + ffi.Pointer _objc_msgSend_507( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer session, + ffi.Pointer task, + ffi.Pointer error, + ) { + return __objc_msgSend_507( + obj, + sel, + session, + task, + error, + ); } - void getBytes_range_(ffi.Pointer buffer, NSRange range) { - return _lib._objc_msgSend_34( - _id, _lib._sel_getBytes_range_1, buffer, range); - } + late final __objc_msgSend_507Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_507 = __objc_msgSend_507Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - bool isEqualToData_(NSData? other) { - return _lib._objc_msgSend_35( - _id, _lib._sel_isEqualToData_1, other?._id ?? ffi.nullptr); + late final _class_CUPHTTPForwardedFinishedDownloading1 = + _getClass1("CUPHTTPForwardedFinishedDownloading"); + late final _sel_initWithSession_downloadTask_url_1 = + _registerName1("initWithSession:downloadTask:url:"); + ffi.Pointer _objc_msgSend_508( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer session, + ffi.Pointer downloadTask, + ffi.Pointer location, + ) { + return __objc_msgSend_508( + obj, + sel, + session, + downloadTask, + location, + ); } - NSData subdataWithRange_(NSRange range) { - final _ret = - _lib._objc_msgSend_36(_id, _lib._sel_subdataWithRange_1, range); - return NSData._(_ret, _lib, retain: true, release: true); - } + late final __objc_msgSend_508Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_508 = __objc_msgSend_508Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - 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 _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_509( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer session, + ffi.Pointer webSocketTask, + ffi.Pointer protocol, + ) { + return __objc_msgSend_509( + obj, + sel, + session, + webSocketTask, + protocol, + ); } - /// 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); - } + late final __objc_msgSend_509Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_509 = __objc_msgSend_509Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - 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 _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_510( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer session, + ffi.Pointer webSocketTask, + int closeCode, + ffi.Pointer reason, + ) { + return __objc_msgSend_510( + obj, + sel, + session, + webSocketTask, + closeCode, + reason, + ); } - 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); - } + late final __objc_msgSend_510Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_510 = __objc_msgSend_510Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); - 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); + /// Creates a `Dart_CObject` containing the given `NSObject` pointer as an int. + Dart_CObject NSObjectToCObject( + ffi.Pointer n, + ) { + return _NSObjectToCObject( + n, + ); } - /// '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); - } + late final _NSObjectToCObjectPtr = _lookup< + ffi.NativeFunction)>>( + 'NSObjectToCObject'); + late final _NSObjectToCObject = _NSObjectToCObjectPtr.asFunction< + Dart_CObject Function(ffi.Pointer)>(); - 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); + /// 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, + ); } - 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); - } + 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)>(); - 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); + /// 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, + ); } - 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); - } + late final _CUPHTTPReceiveMessagePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, Dart_Port)>>('CUPHTTPReceiveMessage'); + late final _CUPHTTPReceiveMessage = _CUPHTTPReceiveMessagePtr.asFunction< + void Function(ffi.Pointer, int)>(); - 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 ffi.Pointer _NSStreamSocketSecurityLevelKey = + _lookup('NSStreamSocketSecurityLevelKey'); - 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); - } + NSStreamPropertyKey get NSStreamSocketSecurityLevelKey => + _NSStreamSocketSecurityLevelKey.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); - } + set NSStreamSocketSecurityLevelKey(NSStreamPropertyKey value) => + _NSStreamSocketSecurityLevelKey.value = value; - 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); - } + late final ffi.Pointer + _NSStreamSocketSecurityLevelNone = + _lookup('NSStreamSocketSecurityLevelNone'); - 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); - } + NSStreamSocketSecurityLevel get NSStreamSocketSecurityLevelNone => + _NSStreamSocketSecurityLevelNone.value; - 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); - } + set NSStreamSocketSecurityLevelNone(NSStreamSocketSecurityLevel value) => + _NSStreamSocketSecurityLevelNone.value = value; - 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 ffi.Pointer + _NSStreamSocketSecurityLevelSSLv2 = + _lookup('NSStreamSocketSecurityLevelSSLv2'); - 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); - } + NSStreamSocketSecurityLevel get NSStreamSocketSecurityLevelSSLv2 => + _NSStreamSocketSecurityLevelSSLv2.value; - 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 NSStreamSocketSecurityLevelSSLv2(NSStreamSocketSecurityLevel value) => + _NSStreamSocketSecurityLevelSSLv2.value = value; - 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); - } + late final ffi.Pointer + _NSStreamSocketSecurityLevelSSLv3 = + _lookup('NSStreamSocketSecurityLevelSSLv3'); - 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); - } + NSStreamSocketSecurityLevel get NSStreamSocketSecurityLevelSSLv3 => + _NSStreamSocketSecurityLevelSSLv3.value; - 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 NSStreamSocketSecurityLevelSSLv3(NSStreamSocketSecurityLevel value) => + _NSStreamSocketSecurityLevelSSLv3.value = 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); - } + late final ffi.Pointer + _NSStreamSocketSecurityLevelTLSv1 = + _lookup('NSStreamSocketSecurityLevelTLSv1'); - 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); - } + NSStreamSocketSecurityLevel get NSStreamSocketSecurityLevelTLSv1 => + _NSStreamSocketSecurityLevelTLSv1.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); - } + set NSStreamSocketSecurityLevelTLSv1(NSStreamSocketSecurityLevel value) => + _NSStreamSocketSecurityLevelTLSv1.value = value; - /// 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 ffi.Pointer + _NSStreamSocketSecurityLevelNegotiatedSSL = + _lookup( + 'NSStreamSocketSecurityLevelNegotiatedSSL'); - /// 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); - } + NSStreamSocketSecurityLevel get NSStreamSocketSecurityLevelNegotiatedSSL => + _NSStreamSocketSecurityLevelNegotiatedSSL.value; - /// 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); - } + set NSStreamSocketSecurityLevelNegotiatedSSL( + NSStreamSocketSecurityLevel value) => + _NSStreamSocketSecurityLevelNegotiatedSSL.value = value; - /// 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 ffi.Pointer + _NSStreamSOCKSProxyConfigurationKey = + _lookup('NSStreamSOCKSProxyConfigurationKey'); - 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); - } + NSStreamPropertyKey get NSStreamSOCKSProxyConfigurationKey => + _NSStreamSOCKSProxyConfigurationKey.value; - void getBytes_(ffi.Pointer buffer) { - return _lib._objc_msgSend_59(_id, _lib._sel_getBytes_1, buffer); - } + set NSStreamSOCKSProxyConfigurationKey(NSStreamPropertyKey value) => + _NSStreamSOCKSProxyConfigurationKey.value = value; - 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); - } + late final ffi.Pointer + _NSStreamSOCKSProxyHostKey = + _lookup('NSStreamSOCKSProxyHostKey'); - 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); - } + NSStreamSOCKSProxyConfiguration get NSStreamSOCKSProxyHostKey => + _NSStreamSOCKSProxyHostKey.value; - /// 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); - } + set NSStreamSOCKSProxyHostKey(NSStreamSOCKSProxyConfiguration value) => + _NSStreamSOCKSProxyHostKey.value = value; - NSString base64Encoding() { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_base64Encoding1); - return NSString._(_ret, _lib, retain: true, release: true); - } + late final ffi.Pointer + _NSStreamSOCKSProxyPortKey = + _lookup('NSStreamSOCKSProxyPortKey'); - 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); - } + NSStreamSOCKSProxyConfiguration get NSStreamSOCKSProxyPortKey => + _NSStreamSOCKSProxyPortKey.value; - 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); - } -} + set NSStreamSOCKSProxyPortKey(NSStreamSOCKSProxyConfiguration value) => + _NSStreamSOCKSProxyPortKey.value = value; -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 ffi.Pointer + _NSStreamSOCKSProxyVersionKey = + _lookup('NSStreamSOCKSProxyVersionKey'); - /// 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); - } + NSStreamSOCKSProxyConfiguration get NSStreamSOCKSProxyVersionKey => + _NSStreamSOCKSProxyVersionKey.value; - /// 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); - } + set NSStreamSOCKSProxyVersionKey(NSStreamSOCKSProxyConfiguration value) => + _NSStreamSOCKSProxyVersionKey.value = value; - /// 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); - } + late final ffi.Pointer + _NSStreamSOCKSProxyUserKey = + _lookup('NSStreamSOCKSProxyUserKey'); - /// 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); - } + NSStreamSOCKSProxyConfiguration get NSStreamSOCKSProxyUserKey => + _NSStreamSOCKSProxyUserKey.value; - /// 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); - } + set NSStreamSOCKSProxyUserKey(NSStreamSOCKSProxyConfiguration value) => + _NSStreamSOCKSProxyUserKey.value = value; - /// 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 ffi.Pointer + _NSStreamSOCKSProxyPasswordKey = + _lookup('NSStreamSOCKSProxyPasswordKey'); - 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); - } + NSStreamSOCKSProxyConfiguration get NSStreamSOCKSProxyPasswordKey => + _NSStreamSOCKSProxyPasswordKey.value; - /// 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); - } + set NSStreamSOCKSProxyPasswordKey(NSStreamSOCKSProxyConfiguration value) => + _NSStreamSOCKSProxyPasswordKey.value = value; - /// 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); - } + late final ffi.Pointer + _NSStreamSOCKSProxyVersion4 = + _lookup('NSStreamSOCKSProxyVersion4'); - /// 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); - } + NSStreamSOCKSProxyVersion get NSStreamSOCKSProxyVersion4 => + _NSStreamSOCKSProxyVersion4.value; - 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); - } + set NSStreamSOCKSProxyVersion4(NSStreamSOCKSProxyVersion value) => + _NSStreamSOCKSProxyVersion4.value = value; - /// 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 ffi.Pointer + _NSStreamSOCKSProxyVersion5 = + _lookup('NSStreamSOCKSProxyVersion5'); - /// 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); - } + NSStreamSOCKSProxyVersion get NSStreamSOCKSProxyVersion5 => + _NSStreamSOCKSProxyVersion5.value; - /// 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); - } + set NSStreamSOCKSProxyVersion5(NSStreamSOCKSProxyVersion value) => + _NSStreamSOCKSProxyVersion5.value = value; - /// 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); - } + late final ffi.Pointer + _NSStreamDataWrittenToMemoryStreamKey = + _lookup('NSStreamDataWrittenToMemoryStreamKey'); - 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); - } + NSStreamPropertyKey get NSStreamDataWrittenToMemoryStreamKey => + _NSStreamDataWrittenToMemoryStreamKey.value; - 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); - } + set NSStreamDataWrittenToMemoryStreamKey(NSStreamPropertyKey value) => + _NSStreamDataWrittenToMemoryStreamKey.value = value; - 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 ffi.Pointer _NSStreamFileCurrentOffsetKey = + _lookup('NSStreamFileCurrentOffsetKey'); - /// 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); - } + NSStreamPropertyKey get NSStreamFileCurrentOffsetKey => + _NSStreamFileCurrentOffsetKey.value; - /// 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); - } + set NSStreamFileCurrentOffsetKey(NSStreamPropertyKey value) => + _NSStreamFileCurrentOffsetKey.value = value; - /// 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); - } + late final ffi.Pointer _NSStreamSocketSSLErrorDomain = + _lookup('NSStreamSocketSSLErrorDomain'); - /// 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); - } + NSErrorDomain1 get NSStreamSocketSSLErrorDomain => + _NSStreamSocketSSLErrorDomain.value; - /// 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); - } + set NSStreamSocketSSLErrorDomain(NSErrorDomain1 value) => + _NSStreamSocketSSLErrorDomain.value = value; - 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 ffi.Pointer _NSStreamSOCKSErrorDomain = + _lookup('NSStreamSOCKSErrorDomain'); - /// 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); - } + NSErrorDomain1 get NSStreamSOCKSErrorDomain => + _NSStreamSOCKSErrorDomain.value; - /// 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); - } + set NSStreamSOCKSErrorDomain(NSErrorDomain1 value) => + _NSStreamSOCKSErrorDomain.value = value; - /// 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); - } + late final ffi.Pointer _NSStreamNetworkServiceType = + _lookup('NSStreamNetworkServiceType'); - /// 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); - } + NSStreamPropertyKey get NSStreamNetworkServiceType => + _NSStreamNetworkServiceType.value; - 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); - } + set NSStreamNetworkServiceType(NSStreamPropertyKey value) => + _NSStreamNetworkServiceType.value = value; - /// 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 ffi.Pointer + _NSStreamNetworkServiceTypeVoIP = + _lookup( + 'NSStreamNetworkServiceTypeVoIP'); - 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); - } + NSStreamNetworkServiceTypeValue get NSStreamNetworkServiceTypeVoIP => + _NSStreamNetworkServiceTypeVoIP.value; - 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 NSStreamNetworkServiceTypeVoIP(NSStreamNetworkServiceTypeValue value) => + _NSStreamNetworkServiceTypeVoIP.value = value; - 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); - } + late final ffi.Pointer + _NSStreamNetworkServiceTypeVideo = + _lookup( + 'NSStreamNetworkServiceTypeVideo'); - 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); - } + NSStreamNetworkServiceTypeValue get NSStreamNetworkServiceTypeVideo => + _NSStreamNetworkServiceTypeVideo.value; - 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 NSStreamNetworkServiceTypeVideo(NSStreamNetworkServiceTypeValue value) => + _NSStreamNetworkServiceTypeVideo.value = value; - 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 ffi.Pointer + _NSStreamNetworkServiceTypeBackground = + _lookup( + 'NSStreamNetworkServiceTypeBackground'); - 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); - } + NSStreamNetworkServiceTypeValue get NSStreamNetworkServiceTypeBackground => + _NSStreamNetworkServiceTypeBackground.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); - } + set NSStreamNetworkServiceTypeBackground( + NSStreamNetworkServiceTypeValue value) => + _NSStreamNetworkServiceTypeBackground.value = 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); - } + late final ffi.Pointer + _NSStreamNetworkServiceTypeVoice = + _lookup( + 'NSStreamNetworkServiceTypeVoice'); - /// 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); - } + NSStreamNetworkServiceTypeValue get NSStreamNetworkServiceTypeVoice => + _NSStreamNetworkServiceTypeVoice.value; - /// 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); - } + set NSStreamNetworkServiceTypeVoice(NSStreamNetworkServiceTypeValue value) => + _NSStreamNetworkServiceTypeVoice.value = value; - /// 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 ffi.Pointer + _NSStreamNetworkServiceTypeCallSignaling = + _lookup( + 'NSStreamNetworkServiceTypeCallSignaling'); - 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); - } + NSStreamNetworkServiceTypeValue get NSStreamNetworkServiceTypeCallSignaling => + _NSStreamNetworkServiceTypeCallSignaling.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); - } + set NSStreamNetworkServiceTypeCallSignaling( + NSStreamNetworkServiceTypeValue value) => + _NSStreamNetworkServiceTypeCallSignaling.value = value; - /// 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); + late final _class_CUPHTTPStreamToNSInputStreamAdapter1 = + _getClass1("CUPHTTPStreamToNSInputStreamAdapter"); + late final _sel_addData_1 = _registerName1("addData:"); + int _objc_msgSend_511( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer data, + ) { + return __objc_msgSend_511( + obj, + sel, + data, + ); } - /// 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 __objc_msgSend_511Ptr = _lookup< + ffi.NativeFunction< + NSUInteger Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_511 = __objc_msgSend_511Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - /// 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 _sel_setDone1 = _registerName1("setDone"); + late final _sel_setError_1 = _registerName1("setError:"); + void _objc_msgSend_512( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer error, + ) { + return __objc_msgSend_512( + obj, + sel, + error, + ); } - /// 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 __objc_msgSend_512Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_512 = __objc_msgSend_512Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); +} - /// 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); - } +final class __mbstate_t extends ffi.Union { + @ffi.Array.multi([128]) + external ffi.Array __mbstate8; - /// 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.LongLong() + external int _mbstateL; +} - /// 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); - } +final class __darwin_pthread_handler_rec extends ffi.Struct { + external ffi + .Pointer)>> + __routine; - /// 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); - } + external ffi.Pointer __arg; - /// 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); - } + external ffi.Pointer<__darwin_pthread_handler_rec> __next; +} - /// 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); - } +final class _opaque_pthread_attr_t extends ffi.Struct { + @ffi.Long() + external int __sig; - /// 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.Array.multi([56]) + external ffi.Array __opaque; +} - /// 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); - } +final class _opaque_pthread_cond_t extends ffi.Struct { + @ffi.Long() + external int __sig; - /// 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.Array.multi([40]) + external ffi.Array __opaque; +} - /// 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); - } +final class _opaque_pthread_condattr_t extends ffi.Struct { + @ffi.Long() + external int __sig; - /// 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.Array.multi([8]) + external ffi.Array __opaque; +} - /// 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); - } +final class _opaque_pthread_mutex_t extends ffi.Struct { + @ffi.Long() + external int __sig; - /// 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.Array.multi([56]) + external ffi.Array __opaque; +} - /// 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); - } +final class _opaque_pthread_mutexattr_t extends ffi.Struct { + @ffi.Long() + external int __sig; - /// 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.Array.multi([8]) + external ffi.Array __opaque; +} - /// 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); - } +final class _opaque_pthread_once_t extends ffi.Struct { + @ffi.Long() + external int __sig; - 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.Array.multi([8]) + external ffi.Array __opaque; +} - bool checkPromisedItemIsReachableAndReturnError_( - ffi.Pointer> error) { - return _lib._objc_msgSend_183( - _id, _lib._sel_checkPromisedItemIsReachableAndReturnError_1, error); - } +final class _opaque_pthread_rwlock_t extends ffi.Struct { + @ffi.Long() + external int __sig; - /// 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.Array.multi([192]) + external ffi.Array __opaque; +} - 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 class _opaque_pthread_rwlockattr_t extends ffi.Struct { + @ffi.Long() + external int __sig; - 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.Array.multi([16]) + external ffi.Array __opaque; +} - 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); - } +final class _opaque_pthread_t extends ffi.Struct { + @ffi.Long() + external int __sig; - 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); - } + external ffi.Pointer<__darwin_pthread_handler_rec> __cleanup_stack; - 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.Array.multi([8176]) + external ffi.Array __opaque; +} - 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 class idtype_t { + static const int P_ALL = 0; + static const int P_PID = 1; + static const int P_PGID = 2; +} - 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); - } +final class __darwin_arm_exception_state extends ffi.Struct { + @__uint32_t() + external int __exception; - 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); - } + @__uint32_t() + external int __fsr; - /// 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); - } + @__uint32_t() + external int __far; +} - 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); - } +typedef __uint32_t = ffi.UnsignedInt; - /// 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); - } +final class __darwin_arm_exception_state64 extends ffi.Struct { + @__uint64_t() + external int __far; - /// 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); - } + @__uint32_t() + external int __esr; - 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); - } + @__uint32_t() + external int __exception; +} - /// 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); - } +typedef __uint64_t = ffi.UnsignedLongLong; - bool setProperty_forKey_(NSObject property, NSString? propertyKey) { - return _lib._objc_msgSend_199(_id, _lib._sel_setProperty_forKey_1, - property._id, propertyKey?._id ?? ffi.nullptr); - } +final class __darwin_arm_thread_state extends ffi.Struct { + @ffi.Array.multi([13]) + external ffi.Array<__uint32_t> __r; - /// 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); - } + @__uint32_t() + external int __sp; - 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); - } + @__uint32_t() + external int __lr; - 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); - } -} + @__uint32_t() + external int __pc; -class NSNumber extends NSValue { - NSNumber._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + @__uint32_t() + external int __cpsr; +} - /// 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 class __darwin_arm_thread_state64 extends ffi.Struct { + @ffi.Array.multi([29]) + external ffi.Array<__uint64_t> __x; - /// 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); - } + @__uint64_t() + external int __fp; - /// 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); - } + @__uint64_t() + external int __lr; - @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); - } + @__uint64_t() + external int __sp; - NSNumber initWithChar_(int value) { - final _ret = _lib._objc_msgSend_62(_id, _lib._sel_initWithChar_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } + @__uint64_t() + external int __pc; - NSNumber initWithUnsignedChar_(int value) { - final _ret = - _lib._objc_msgSend_63(_id, _lib._sel_initWithUnsignedChar_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } + @__uint32_t() + external int __cpsr; - NSNumber initWithShort_(int value) { - final _ret = _lib._objc_msgSend_64(_id, _lib._sel_initWithShort_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } + @__uint32_t() + external int __pad; +} - 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 class __darwin_arm_vfp_state extends ffi.Struct { + @ffi.Array.multi([64]) + external ffi.Array<__uint32_t> __r; - NSNumber initWithInt_(int value) { - final _ret = _lib._objc_msgSend_66(_id, _lib._sel_initWithInt_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } + @__uint32_t() + external int __fpscr; +} - NSNumber initWithUnsignedInt_(int value) { - final _ret = - _lib._objc_msgSend_67(_id, _lib._sel_initWithUnsignedInt_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } +final class __darwin_arm_neon_state64 extends ffi.Opaque {} - NSNumber initWithLong_(int value) { - final _ret = _lib._objc_msgSend_68(_id, _lib._sel_initWithLong_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } +final class __darwin_arm_neon_state extends ffi.Opaque {} - NSNumber initWithUnsignedLong_(int value) { - final _ret = - _lib._objc_msgSend_69(_id, _lib._sel_initWithUnsignedLong_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } +final class __arm_pagein_state extends ffi.Struct { + @ffi.Int() + external int __pagein_error; +} - NSNumber initWithLongLong_(int value) { - final _ret = - _lib._objc_msgSend_70(_id, _lib._sel_initWithLongLong_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } +final class __arm_legacy_debug_state extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array<__uint32_t> __bvr; - 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.Array.multi([16]) + external ffi.Array<__uint32_t> __bcr; - 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.Array.multi([16]) + external ffi.Array<__uint32_t> __wvr; - 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.Array.multi([16]) + external ffi.Array<__uint32_t> __wcr; +} - NSNumber initWithBool_(bool value) { - final _ret = _lib._objc_msgSend_74(_id, _lib._sel_initWithBool_1, value); - return NSNumber._(_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; - 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.Array.multi([16]) + external ffi.Array<__uint32_t> __bcr; - 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.Array.multi([16]) + external ffi.Array<__uint32_t> __wvr; - int get charValue { - return _lib._objc_msgSend_75(_id, _lib._sel_charValue1); - } + @ffi.Array.multi([16]) + external ffi.Array<__uint32_t> __wcr; - int get unsignedCharValue { - return _lib._objc_msgSend_76(_id, _lib._sel_unsignedCharValue1); - } + @__uint64_t() + external int __mdscr_el1; +} - int get shortValue { - return _lib._objc_msgSend_77(_id, _lib._sel_shortValue1); - } +final class __darwin_arm_debug_state64 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array<__uint64_t> __bvr; - int get unsignedShortValue { - return _lib._objc_msgSend_78(_id, _lib._sel_unsignedShortValue1); - } + @ffi.Array.multi([16]) + external ffi.Array<__uint64_t> __bcr; - int get intValue { - return _lib._objc_msgSend_79(_id, _lib._sel_intValue1); - } + @ffi.Array.multi([16]) + external ffi.Array<__uint64_t> __wvr; - int get unsignedIntValue { - return _lib._objc_msgSend_80(_id, _lib._sel_unsignedIntValue1); - } + @ffi.Array.multi([16]) + external ffi.Array<__uint64_t> __wcr; - int get longValue { - return _lib._objc_msgSend_81(_id, _lib._sel_longValue1); - } + @__uint64_t() + external int __mdscr_el1; +} - int get unsignedLongValue { - return _lib._objc_msgSend_12(_id, _lib._sel_unsignedLongValue1); - } +final class __darwin_arm_cpmu_state64 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array<__uint64_t> __ctrs; +} - int get longLongValue { - return _lib._objc_msgSend_82(_id, _lib._sel_longLongValue1); - } +final class __darwin_mcontext32 extends ffi.Struct { + external __darwin_arm_exception_state __es; - int get unsignedLongLongValue { - return _lib._objc_msgSend_83(_id, _lib._sel_unsignedLongLongValue1); - } + external __darwin_arm_thread_state __ss; - double get floatValue { - return _lib._objc_msgSend_84(_id, _lib._sel_floatValue1); - } + external __darwin_arm_vfp_state __fs; +} - double get doubleValue { - return _lib._objc_msgSend_85(_id, _lib._sel_doubleValue1); - } +final class __darwin_mcontext64 extends ffi.Opaque {} - bool get boolValue { - return _lib._objc_msgSend_11(_id, _lib._sel_boolValue1); - } +final class __darwin_sigaltstack extends ffi.Struct { + external ffi.Pointer ss_sp; - int get integerValue { - return _lib._objc_msgSend_81(_id, _lib._sel_integerValue1); - } + @__darwin_size_t() + external int ss_size; - int get unsignedIntegerValue { - return _lib._objc_msgSend_12(_id, _lib._sel_unsignedIntegerValue1); - } + @ffi.Int() + external int ss_flags; +} - 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); - } +typedef __darwin_size_t = ffi.UnsignedLong; - int compare_(NSNumber? otherNumber) { - return _lib._objc_msgSend_86( - _id, _lib._sel_compare_1, otherNumber?._id ?? ffi.nullptr); - } +final class __darwin_ucontext extends ffi.Struct { + @ffi.Int() + external int uc_onstack; - bool isEqualToNumber_(NSNumber? number) { - return _lib._objc_msgSend_87( - _id, _lib._sel_isEqualToNumber_1, number?._id ?? ffi.nullptr); - } + @__darwin_sigset_t() + external int uc_sigmask; - 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); - } + external __darwin_sigaltstack uc_stack; - 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); - } + external ffi.Pointer<__darwin_ucontext> uc_link; - 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); - } + @__darwin_size_t() + external int uc_mcsize; - 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); - } + external ffi.Pointer<__darwin_mcontext64> uc_mcontext; +} - 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); - } +typedef __darwin_sigset_t = __uint32_t; - 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); - } +final class sigval extends ffi.Union { + @ffi.Int() + external int sival_int; - 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); - } + external ffi.Pointer sival_ptr; +} - 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); - } +final class sigevent extends ffi.Struct { + @ffi.Int() + external int sigev_notify; - 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.Int() + external int sigev_signo; - 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); - } + external sigval sigev_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); - } + external ffi.Pointer> + sigev_notify_function; - 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); - } + external ffi.Pointer sigev_notify_attributes; +} - 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); - } +typedef pthread_attr_t = __darwin_pthread_attr_t; +typedef __darwin_pthread_attr_t = _opaque_pthread_attr_t; - 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); - } +final class __siginfo extends ffi.Struct { + @ffi.Int() + external int si_signo; - 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.Int() + external int si_errno; - 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.Int() + external int si_code; - 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); - } + @pid_t() + external int si_pid; - 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); - } + @uid_t() + external int si_uid; - 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.Int() + external int si_status; - 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); - } + external ffi.Pointer si_addr; - 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); - } + external sigval si_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); - } + @ffi.Long() + external int si_band; - 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.Array.multi([7]) + external ffi.Array __pad; } -class NSValue extends NSObject { - NSValue._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +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; - /// 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); - } +final class __sigaction_u extends ffi.Union { + external ffi.Pointer> + __sa_handler; - /// 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); - } + external ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int, ffi.Pointer<__siginfo>, ffi.Pointer)>> + __sa_sigaction; +} - /// 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); - } +final class __sigaction extends ffi.Struct { + external __sigaction_u __sigaction_u1; - void getValue_size_(ffi.Pointer value, int size) { - return _lib._objc_msgSend_33(_id, _lib._sel_getValue_size_1, value, size); - } + external ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Int, ffi.Int, + ffi.Pointer, ffi.Pointer)>> sa_tramp; - ffi.Pointer get objCType { - return _lib._objc_msgSend_53(_id, _lib._sel_objCType1); - } + @sigset_t() + external int sa_mask; - 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); - } + @ffi.Int() + external int sa_flags; +} - 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 siginfo_t = __siginfo; +typedef sigset_t = __darwin_sigset_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 sigaction extends ffi.Struct { + external __sigaction_u __sigaction_u1; - 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); - } + @sigset_t() + external int sa_mask; - 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); - } + @ffi.Int() + external int sa_flags; +} - NSObject get nonretainedObjectValue { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_nonretainedObjectValue1); - return NSObject._(_ret, _lib, retain: true, release: true); - } +final class sigvec extends ffi.Struct { + external ffi.Pointer> + sv_handler; - 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.Int() + external int sv_mask; - ffi.Pointer get pointerValue { - return _lib._objc_msgSend_31(_id, _lib._sel_pointerValue1); - } + @ffi.Int() + external int sv_flags; +} - bool isEqualToValue_(NSValue? value) { - return _lib._objc_msgSend_58( - _id, _lib._sel_isEqualToValue_1, value?._id ?? ffi.nullptr); - } +final class sigstack extends ffi.Struct { + external ffi.Pointer ss_sp; - void getValue_(ffi.Pointer value) { - return _lib._objc_msgSend_59(_id, _lib._sel_getValue_1, value); - } + @ffi.Int() + external int ss_onstack; +} - 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); - } +final class timeval extends ffi.Struct { + @__darwin_time_t() + external int tv_sec; - NSRange get rangeValue { - return _lib._objc_msgSend_61(_id, _lib._sel_rangeValue1); - } + @__darwin_suseconds_t() + external int tv_usec; +} - 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); - } +typedef __darwin_time_t = ffi.Long; +typedef __darwin_suseconds_t = __int32_t; - 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 rusage extends ffi.Struct { + external timeval ru_utime; -typedef NSInteger = ffi.Long; + external timeval ru_stime; -class NSError extends NSObject { - NSError._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + @ffi.Long() + external int ru_maxrss; - /// 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); - } + @ffi.Long() + external int ru_ixrss; - /// 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); - } + @ffi.Long() + external int ru_idrss; - /// 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); - } + @ffi.Long() + external int ru_isrss; - /// 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); - } + @ffi.Long() + external int ru_minflt; - 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.Long() + external int ru_majflt; - /// 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); - } + @ffi.Long() + external int ru_nswap; - int get code { - return _lib._objc_msgSend_81(_id, _lib._sel_code1); - } + @ffi.Long() + external int ru_inblock; - /// 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); - } + @ffi.Long() + external int ru_oublock; - /// 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); - } + @ffi.Long() + external int ru_msgsnd; - /// 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); - } + @ffi.Long() + external int ru_msgrcv; - /// 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); - } + @ffi.Long() + external int ru_nsignals; - /// 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.Long() + external int ru_nvcsw; - /// 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.Long() + external int ru_nivcsw; +} - /// 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 class rusage_info_v0 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array ri_uuid; - /// 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); - } + @ffi.Uint64() + external int ri_user_time; - /// 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); - } + @ffi.Uint64() + external int ri_system_time; - 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.Uint64() + external int ri_pkg_idle_wkups; - 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.Uint64() + external int ri_interrupt_wkups; - 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.Uint64() + external int ri_pageins; -typedef NSErrorDomain = ffi.Pointer; + @ffi.Uint64() + external int ri_wired_size; -/// 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); + @ffi.Uint64() + external int ri_resident_size; - /// 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); - } + @ffi.Uint64() + external int ri_phys_footprint; - /// 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.Uint64() + external int ri_proc_start_abstime; - /// 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); - } + @ffi.Uint64() + external int ri_proc_exit_abstime; +} - int get count { - return _lib._objc_msgSend_12(_id, _lib._sel_count1); - } +final class rusage_info_v1 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array ri_uuid; - 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); - } + @ffi.Uint64() + external int ri_user_time; - NSEnumerator keyEnumerator() { - final _ret = _lib._objc_msgSend_92(_id, _lib._sel_keyEnumerator1); - return NSEnumerator._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_system_time; - @override - NSDictionary init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_pkg_idle_wkups; - 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.Uint64() + external int ri_interrupt_wkups; - 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); - } + @ffi.Uint64() + external int ri_pageins; - 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); - } + @ffi.Uint64() + external int ri_wired_size; - 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); - } + @ffi.Uint64() + external int ri_resident_size; - 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.Uint64() + external int ri_phys_footprint; - 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_proc_start_abstime; - 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); - } + @ffi.Uint64() + external int ri_proc_exit_abstime; - 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); - } + @ffi.Uint64() + external int ri_child_user_time; - bool isEqualToDictionary_(NSDictionary? otherDictionary) { - return _lib._objc_msgSend_163(_id, _lib._sel_isEqualToDictionary_1, - otherDictionary?._id ?? ffi.nullptr); - } + @ffi.Uint64() + external int ri_child_system_time; - NSEnumerator objectEnumerator() { - final _ret = _lib._objc_msgSend_92(_id, _lib._sel_objectEnumerator1); - return NSEnumerator._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_child_pkg_idle_wkups; - 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); - } + @ffi.Uint64() + external int ri_child_interrupt_wkups; - /// 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.Uint64() + external int ri_child_pageins; - 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); - } + @ffi.Uint64() + external int ri_child_elapsed_abstime; +} - /// 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); - } +final class rusage_info_v2 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array ri_uuid; - 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); - } + @ffi.Uint64() + external int ri_user_time; - void enumerateKeysAndObjectsUsingBlock_(ObjCBlock8 block) { - return _lib._objc_msgSend_166( - _id, _lib._sel_enumerateKeysAndObjectsUsingBlock_1, block._id); - } + @ffi.Uint64() + external int ri_system_time; - void enumerateKeysAndObjectsWithOptions_usingBlock_( - int opts, ObjCBlock8 block) { - return _lib._objc_msgSend_167( - _id, - _lib._sel_enumerateKeysAndObjectsWithOptions_usingBlock_1, - opts, - block._id); - } + @ffi.Uint64() + external int ri_pkg_idle_wkups; - NSArray keysSortedByValueUsingComparator_(NSComparator cmptr) { - final _ret = _lib._objc_msgSend_141( - _id, _lib._sel_keysSortedByValueUsingComparator_1, cmptr); - return NSArray._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_interrupt_wkups; - 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); - } + @ffi.Uint64() + external int ri_pageins; - 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.Uint64() + external int ri_wired_size; - 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); - } + @ffi.Uint64() + external int ri_resident_size; - /// 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); - } + @ffi.Uint64() + external int ri_phys_footprint; - /// 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); - } + @ffi.Uint64() + external int ri_proc_start_abstime; - 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); - } + @ffi.Uint64() + external int ri_proc_exit_abstime; - 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); - } + @ffi.Uint64() + external int ri_child_user_time; - 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); - } + @ffi.Uint64() + external int ri_child_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_child_pkg_idle_wkups; - /// 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); - } + @ffi.Uint64() + external int ri_child_interrupt_wkups; - 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); - } + @ffi.Uint64() + external int ri_child_pageins; - 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); - } + @ffi.Uint64() + external int ri_child_elapsed_abstime; - 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); - } + @ffi.Uint64() + external int ri_diskio_bytesread; - 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); - } + @ffi.Uint64() + external int ri_diskio_byteswritten; +} - 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 class rusage_info_v3 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array ri_uuid; - 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); - } + @ffi.Uint64() + external int ri_user_time; - 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); - } + @ffi.Uint64() + external int ri_system_time; - 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); - } + @ffi.Uint64() + external int ri_pkg_idle_wkups; - 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); - } + @ffi.Uint64() + external int ri_interrupt_wkups; - 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.Uint64() + external int ri_pageins; - /// 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.Uint64() + external int ri_wired_size; - /// 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); - } + @ffi.Uint64() + external int ri_resident_size; - /// 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); - } + @ffi.Uint64() + external int ri_phys_footprint; - 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); - } + @ffi.Uint64() + external int ri_proc_start_abstime; - 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); - } + @ffi.Uint64() + external int ri_proc_exit_abstime; - 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.Uint64() + external int ri_child_user_time; -class NSEnumerator extends NSObject { - NSEnumerator._(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 [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.Uint64() + external int ri_child_pkg_idle_wkups; - /// 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); - } + @ffi.Uint64() + external int ri_child_interrupt_wkups; - /// 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.Uint64() + external int ri_child_pageins; - NSObject nextObject() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_nextObject1); - return NSObject._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_child_elapsed_abstime; - 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.Uint64() + external int ri_diskio_bytesread; - 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); - } + @ffi.Uint64() + external int ri_diskio_byteswritten; - 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.Uint64() + external int ri_cpu_time_qos_default; -/// 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); + @ffi.Uint64() + external int ri_cpu_time_qos_maintenance; - /// 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.Uint64() + external int ri_cpu_time_qos_background; - /// 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); - } + @ffi.Uint64() + external int ri_cpu_time_qos_utility; - /// 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.Uint64() + external int ri_cpu_time_qos_legacy; - int get count { - return _lib._objc_msgSend_12(_id, _lib._sel_count1); - } + @ffi.Uint64() + external int ri_cpu_time_qos_user_initiated; - 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.Uint64() + external int ri_cpu_time_qos_user_interactive; - @override - NSArray init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSArray._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_billed_system_time; - 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); - } + @ffi.Uint64() + external int ri_serviced_system_time; +} - 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); - } +final class rusage_info_v4 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array ri_uuid; - 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); - } + @ffi.Uint64() + external int ri_user_time; - 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); - } + @ffi.Uint64() + external int ri_system_time; - 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); - } + @ffi.Uint64() + external int ri_pkg_idle_wkups; - bool containsObject_(NSObject anObject) { - return _lib._objc_msgSend_0(_id, _lib._sel_containsObject_1, anObject._id); - } + @ffi.Uint64() + external int ri_interrupt_wkups; - 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_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_wired_size; - 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); - } + @ffi.Uint64() + external int ri_resident_size; - 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.Uint64() + external int ri_phys_footprint; - void getObjects_range_( - ffi.Pointer> objects, NSRange range) { - return _lib._objc_msgSend_101( - _id, _lib._sel_getObjects_range_1, objects, range); - } + @ffi.Uint64() + external int ri_proc_start_abstime; - int indexOfObject_(NSObject anObject) { - return _lib._objc_msgSend_102(_id, _lib._sel_indexOfObject_1, anObject._id); - } + @ffi.Uint64() + external int ri_proc_exit_abstime; - int indexOfObject_inRange_(NSObject anObject, NSRange range) { - return _lib._objc_msgSend_103( - _id, _lib._sel_indexOfObject_inRange_1, anObject._id, range); - } + @ffi.Uint64() + external int ri_child_user_time; - int indexOfObjectIdenticalTo_(NSObject anObject) { - return _lib._objc_msgSend_102( - _id, _lib._sel_indexOfObjectIdenticalTo_1, anObject._id); - } + @ffi.Uint64() + external int ri_child_system_time; - int indexOfObjectIdenticalTo_inRange_(NSObject anObject, NSRange range) { - return _lib._objc_msgSend_103( - _id, _lib._sel_indexOfObjectIdenticalTo_inRange_1, anObject._id, range); - } + @ffi.Uint64() + external int ri_child_pkg_idle_wkups; - bool isEqualToArray_(NSArray? otherArray) { - return _lib._objc_msgSend_104( - _id, _lib._sel_isEqualToArray_1, otherArray?._id ?? ffi.nullptr); - } + @ffi.Uint64() + external int ri_child_interrupt_wkups; - NSObject get firstObject { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_firstObject1); - return NSObject._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_child_pageins; - NSObject get lastObject { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_lastObject1); - return NSObject._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_child_elapsed_abstime; - NSEnumerator objectEnumerator() { - final _ret = _lib._objc_msgSend_92(_id, _lib._sel_objectEnumerator1); - return NSEnumerator._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_diskio_bytesread; - NSEnumerator reverseObjectEnumerator() { - final _ret = _lib._objc_msgSend_92(_id, _lib._sel_reverseObjectEnumerator1); - return NSEnumerator._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_diskio_byteswritten; - 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); - } + @ffi.Uint64() + external int ri_cpu_time_qos_default; - 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.Uint64() + external int ri_cpu_time_qos_maintenance; - 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); - } + @ffi.Uint64() + external int ri_cpu_time_qos_background; - 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); - } + @ffi.Uint64() + external int ri_cpu_time_qos_utility; - 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.Uint64() + external int ri_cpu_time_qos_legacy; - /// 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.Uint64() + external int ri_cpu_time_qos_user_initiated; - void makeObjectsPerformSelector_(ffi.Pointer aSelector) { - return _lib._objc_msgSend_7( - _id, _lib._sel_makeObjectsPerformSelector_1, aSelector); - } + @ffi.Uint64() + external int ri_cpu_time_qos_user_interactive; - void makeObjectsPerformSelector_withObject_( - ffi.Pointer aSelector, NSObject argument) { - return _lib._objc_msgSend_110( - _id, - _lib._sel_makeObjectsPerformSelector_withObject_1, - aSelector, - argument._id); - } + @ffi.Uint64() + external int ri_billed_system_time; - 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); - } + @ffi.Uint64() + external int ri_serviced_system_time; - 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.Uint64() + external int ri_logical_writes; - void enumerateObjectsUsingBlock_(ObjCBlock3 block) { - return _lib._objc_msgSend_132( - _id, _lib._sel_enumerateObjectsUsingBlock_1, block._id); - } + @ffi.Uint64() + external int ri_lifetime_max_phys_footprint; - void enumerateObjectsWithOptions_usingBlock_(int opts, ObjCBlock3 block) { - return _lib._objc_msgSend_133(_id, - _lib._sel_enumerateObjectsWithOptions_usingBlock_1, opts, block._id); - } + @ffi.Uint64() + external int ri_instructions; - 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); - } + @ffi.Uint64() + external int ri_cycles; - int indexOfObjectPassingTest_(ObjCBlock4 predicate) { - return _lib._objc_msgSend_135( - _id, _lib._sel_indexOfObjectPassingTest_1, predicate._id); - } + @ffi.Uint64() + external int ri_billed_energy; - int indexOfObjectWithOptions_passingTest_(int opts, ObjCBlock4 predicate) { - return _lib._objc_msgSend_136(_id, - _lib._sel_indexOfObjectWithOptions_passingTest_1, opts, predicate._id); - } + @ffi.Uint64() + external int ri_serviced_energy; - 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.Uint64() + external int ri_interval_max_phys_footprint; - 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); - } + @ffi.Uint64() + external int ri_runnable_time; +} - 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); - } +final class rusage_info_v5 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array ri_uuid; - 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.Uint64() + external int ri_user_time; - 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.Uint64() + external int ri_system_time; - 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.Uint64() + external int ri_pkg_idle_wkups; - /// 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); - } + @ffi.Uint64() + external int ri_interrupt_wkups; - 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); - } + @ffi.Uint64() + external int ri_pageins; - 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); - } + @ffi.Uint64() + external int ri_wired_size; - 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.Uint64() + external int ri_resident_size; - 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); - } + @ffi.Uint64() + external int ri_phys_footprint; - 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.Uint64() + external int ri_proc_start_abstime; - 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.Uint64() + external int ri_proc_exit_abstime; - 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.Uint64() + external int ri_child_user_time; - 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.Uint64() + external int ri_child_system_time; - /// 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.Uint64() + external int ri_child_pkg_idle_wkups; - /// 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.Uint64() + external int ri_child_interrupt_wkups; - 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); - } + @ffi.Uint64() + external int ri_child_pageins; - 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.Uint64() + external int ri_child_elapsed_abstime; - /// 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.Uint64() + external int ri_diskio_bytesread; - 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.Uint64() + external int ri_diskio_byteswritten; - /// 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.Uint64() + external int ri_cpu_time_qos_default; - /// 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.Uint64() + external int ri_cpu_time_qos_maintenance; - 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.Uint64() + external int ri_cpu_time_qos_background; - 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.Uint64() + external int ri_cpu_time_qos_utility; - 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.Uint64() + external int ri_cpu_time_qos_legacy; - 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_cpu_time_qos_user_initiated; - 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_cpu_time_qos_user_interactive; - 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.Uint64() + external int ri_billed_system_time; - 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.Uint64() + external int ri_serviced_system_time; -class NSIndexSet extends NSObject { - NSIndexSet._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + @ffi.Uint64() + external int ri_logical_writes; - /// 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.Uint64() + external int ri_lifetime_max_phys_footprint; - /// 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.Uint64() + external int ri_instructions; - /// 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.Uint64() + external int ri_cycles; - 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); - } + @ffi.Uint64() + external int ri_billed_energy; - 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); - } + @ffi.Uint64() + external int ri_serviced_energy; - 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.Uint64() + external int ri_interval_max_phys_footprint; - NSIndexSet initWithIndexesInRange_(NSRange range) { - final _ret = - _lib._objc_msgSend_111(_id, _lib._sel_initWithIndexesInRange_1, range); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_runnable_time; - 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.Uint64() + external int ri_flags; +} - NSIndexSet initWithIndex_(int value) { - final _ret = _lib._objc_msgSend_94(_id, _lib._sel_initWithIndex_1, value); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } +final class rusage_info_v6 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array ri_uuid; - bool isEqualToIndexSet_(NSIndexSet? indexSet) { - return _lib._objc_msgSend_113( - _id, _lib._sel_isEqualToIndexSet_1, indexSet?._id ?? ffi.nullptr); - } + @ffi.Uint64() + external int ri_user_time; - int get count { - return _lib._objc_msgSend_12(_id, _lib._sel_count1); - } + @ffi.Uint64() + external int ri_system_time; - int get firstIndex { - return _lib._objc_msgSend_12(_id, _lib._sel_firstIndex1); - } + @ffi.Uint64() + external int ri_pkg_idle_wkups; - int get lastIndex { - return _lib._objc_msgSend_12(_id, _lib._sel_lastIndex1); - } + @ffi.Uint64() + external int ri_interrupt_wkups; - int indexGreaterThanIndex_(int value) { - return _lib._objc_msgSend_114( - _id, _lib._sel_indexGreaterThanIndex_1, value); - } + @ffi.Uint64() + external int ri_pageins; - int indexLessThanIndex_(int value) { - return _lib._objc_msgSend_114(_id, _lib._sel_indexLessThanIndex_1, value); - } + @ffi.Uint64() + external int ri_wired_size; - int indexGreaterThanOrEqualToIndex_(int value) { - return _lib._objc_msgSend_114( - _id, _lib._sel_indexGreaterThanOrEqualToIndex_1, value); - } + @ffi.Uint64() + external int ri_resident_size; - int indexLessThanOrEqualToIndex_(int value) { - return _lib._objc_msgSend_114( - _id, _lib._sel_indexLessThanOrEqualToIndex_1, value); - } + @ffi.Uint64() + external int ri_phys_footprint; - 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); - } + @ffi.Uint64() + external int ri_proc_start_abstime; - int countOfIndexesInRange_(NSRange range) { - return _lib._objc_msgSend_116( - _id, _lib._sel_countOfIndexesInRange_1, range); - } + @ffi.Uint64() + external int ri_proc_exit_abstime; - bool containsIndex_(int value) { - return _lib._objc_msgSend_117(_id, _lib._sel_containsIndex_1, value); - } + @ffi.Uint64() + external int ri_child_user_time; - bool containsIndexesInRange_(NSRange range) { - return _lib._objc_msgSend_118( - _id, _lib._sel_containsIndexesInRange_1, range); - } + @ffi.Uint64() + external int ri_child_system_time; - bool containsIndexes_(NSIndexSet? indexSet) { - return _lib._objc_msgSend_113( - _id, _lib._sel_containsIndexes_1, indexSet?._id ?? ffi.nullptr); - } + @ffi.Uint64() + external int ri_child_pkg_idle_wkups; - bool intersectsIndexesInRange_(NSRange range) { - return _lib._objc_msgSend_118( - _id, _lib._sel_intersectsIndexesInRange_1, range); - } + @ffi.Uint64() + external int ri_child_interrupt_wkups; - void enumerateIndexesUsingBlock_(ObjCBlock block) { - return _lib._objc_msgSend_119( - _id, _lib._sel_enumerateIndexesUsingBlock_1, block._id); - } + @ffi.Uint64() + external int ri_child_pageins; - void enumerateIndexesWithOptions_usingBlock_(int opts, ObjCBlock block) { - return _lib._objc_msgSend_120(_id, - _lib._sel_enumerateIndexesWithOptions_usingBlock_1, opts, block._id); - } + @ffi.Uint64() + external int ri_child_elapsed_abstime; - 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.Uint64() + external int ri_diskio_bytesread; - int indexPassingTest_(ObjCBlock1 predicate) { - return _lib._objc_msgSend_122( - _id, _lib._sel_indexPassingTest_1, predicate._id); - } + @ffi.Uint64() + external int ri_diskio_byteswritten; - int indexWithOptions_passingTest_(int opts, ObjCBlock1 predicate) { - return _lib._objc_msgSend_123( - _id, _lib._sel_indexWithOptions_passingTest_1, opts, predicate._id); - } + @ffi.Uint64() + external int ri_cpu_time_qos_default; - 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); - } + @ffi.Uint64() + external int ri_cpu_time_qos_maintenance; - 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); - } + @ffi.Uint64() + external int ri_cpu_time_qos_background; - 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); - } + @ffi.Uint64() + external int ri_cpu_time_qos_utility; - 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.Uint64() + external int ri_cpu_time_qos_legacy; - void enumerateRangesUsingBlock_(ObjCBlock2 block) { - return _lib._objc_msgSend_128( - _id, _lib._sel_enumerateRangesUsingBlock_1, block._id); - } + @ffi.Uint64() + external int ri_cpu_time_qos_user_initiated; - void enumerateRangesWithOptions_usingBlock_(int opts, ObjCBlock2 block) { - return _lib._objc_msgSend_129(_id, - _lib._sel_enumerateRangesWithOptions_usingBlock_1, opts, block._id); - } + @ffi.Uint64() + external int ri_cpu_time_qos_user_interactive; - 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.Uint64() + external int ri_billed_system_time; - 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.Uint64() + external int ri_serviced_system_time; - 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.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; } -typedef NSRangePointer = ffi.Pointer; +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; +} class _ObjCBlockBase implements ffi.Finalizable { final ffi.Pointer<_ObjCBlock> _id; @@ -63089,7 +60793,7 @@ class _ObjCBlockBase implements ffi.Finalizable { _lib._Block_copy(_id.cast()); } if (release) { - _lib._objc_releaseFinalizer11.attach(this, _id.cast(), detach: this); + _lib._objc_releaseFinalizer2.attach(this, _id.cast(), detach: this); } } @@ -63099,7 +60803,7 @@ class _ObjCBlockBase implements ffi.Finalizable { if (_pendingRelease) { _pendingRelease = false; _lib._Block_release(_id.cast()); - _lib._objc_releaseFinalizer11.detach(this); + _lib._objc_releaseFinalizer2.detach(this); } else { throw StateError( 'Released an ObjC block that was unowned or already released.'); @@ -63113,16 +60817,15 @@ class _ObjCBlockBase implements ffi.Finalizable { @override int get hashCode => _id.hashCode; + + /// Return a pointer to this object. + ffi.Pointer<_ObjCBlock> get pointer => _id; } -void _ObjCBlock_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, int arg0, ffi.Pointer arg1) { +void _ObjCBlock_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block) { 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); + .cast>() + .asFunction()(); } final _ObjCBlock_closureRegistry = {}; @@ -63133,9 +60836,8 @@ ffi.Pointer _ObjCBlock_registerClosure(Function 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); +void _ObjCBlock_closureTrampoline(ffi.Pointer<_ObjCBlock> block) { + return _ObjCBlock_closureRegistry[block.ref.target.address]!(); } class ObjCBlock extends _ObjCBlockBase { @@ -63143,18 +60845,12 @@ class ObjCBlock extends _ObjCBlockBase { : 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) + ObjCBlock.fromFunctionPointer(NativeCupertinoHttp lib, + ffi.Pointer> ptr) : this._( lib._newBlock1( _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - NSUInteger arg0, ffi.Pointer arg1)>( + ffi.Void Function(ffi.Pointer<_ObjCBlock> block)>( _ObjCBlock_fnPtrTrampoline) .cast(), ptr.cast()), @@ -63162,33 +60858,26 @@ class ObjCBlock extends _ObjCBlockBase { static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock.fromFunction(NativeCupertinoHttp lib, - void Function(int arg0, ffi.Pointer arg1) fn) + ObjCBlock.fromFunction(NativeCupertinoHttp lib, void Function() fn) : this._( lib._newBlock1( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - NSUInteger arg0, ffi.Pointer arg1)>( + ffi.Void Function(ffi.Pointer<_ObjCBlock> block)>( _ObjCBlock_closureTrampoline) .cast(), _ObjCBlock_registerClosure(fn)), lib); static ffi.Pointer? _dartFuncTrampoline; - void call(int arg0, ffi.Pointer arg1) { + void call() { 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 + .NativeFunction block)>>() + .asFunction block)>()(_id); } - - ffi.Pointer<_ObjCBlock> get pointer => _id; } -class _ObjCBlockDesc extends ffi.Struct { +final class _ObjCBlockDesc extends ffi.Struct { @ffi.UnsignedLong() external int reserved; @@ -63202,7 +60891,7 @@ class _ObjCBlockDesc extends ffi.Struct { external ffi.Pointer signature; } -class _ObjCBlock extends ffi.Struct { +final class _ObjCBlock extends ffi.Struct { external ffi.Pointer isa; @ffi.Int() @@ -63218,19 +60907,16 @@ class _ObjCBlock extends ffi.Struct { 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) { +int _ObjCBlock1_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1) { return block.ref.target .cast< ffi.NativeFunction< - ffi.Bool Function(NSUInteger arg0, ffi.Pointer arg1)>>() + ffi.Int Function( + ffi.Pointer arg0, ffi.Pointer arg1)>>() .asFunction< - bool Function(int arg0, ffi.Pointer arg1)>()(arg0, arg1); + int Function(ffi.Pointer arg0, + ffi.Pointer arg1)>()(arg0, arg1); } final _ObjCBlock1_closureRegistry = {}; @@ -63241,8 +60927,8 @@ ffi.Pointer _ObjCBlock1_registerClosure(Function fn) { return ffi.Pointer.fromAddress(id); } -bool _ObjCBlock1_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, int arg0, ffi.Pointer arg1) { +int _ObjCBlock1_closureTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1) { return _ObjCBlock1_closureRegistry[block.ref.target.address]!(arg0, arg1); } @@ -63253,14 +60939,19 @@ class ObjCBlock1 extends _ObjCBlockBase { /// Creates a block from a C function pointer. ObjCBlock1.fromFunctionPointer( NativeCupertinoHttp lib, - ffi.Pointer arg1)>> + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer arg0, 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) + ffi.Int Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>( + _ObjCBlock1_fnPtrTrampoline, 0) .cast(), ptr.cast()), lib); @@ -63268,4182 +60959,3769 @@ class ObjCBlock1 extends _ObjCBlockBase { /// Creates a block from a Dart function. ObjCBlock1.fromFunction(NativeCupertinoHttp lib, - bool Function(int arg0, ffi.Pointer arg1) fn) + int Function(ffi.Pointer 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) + 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; - bool call(int arg0, ffi.Pointer arg1) { + int call(ffi.Pointer arg0, ffi.Pointer arg1) { return _id.ref.invoke .cast< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer<_ObjCBlock> block, - NSUInteger arg0, ffi.Pointer arg1)>>() + ffi.Int Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1)>>() .asFunction< - bool Function(ffi.Pointer<_ObjCBlock> block, int arg0, - ffi.Pointer 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; } -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); -} +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 _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); +final class fd_set extends ffi.Struct { + @ffi.Array.multi([32]) + external ffi.Array<__int32_t> fds_bits; } -void _ObjCBlock2_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, NSRange arg0, ffi.Pointer arg1) { - return _ObjCBlock2_closureRegistry[block.ref.target.address]!(arg0, arg1); +final class objc_class extends ffi.Opaque {} + +final class objc_object extends ffi.Struct { + external ffi.Pointer isa; } -class ObjCBlock2 extends _ObjCBlockBase { - ObjCBlock2._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +final class ObjCObject extends ffi.Opaque {} - /// 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; +final class objc_selector extends ffi.Opaque {} - /// 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); +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); + } } - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + /// 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.'); + } + } -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); -} + @override + bool operator ==(Object other) { + return other is _ObjCWrapper && _id == other._id; + } -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); -} + @override + int get hashCode => _id.hashCode; -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); + /// Return a pointer to this object. + ffi.Pointer get pointer => _id; } -class ObjCBlock3 extends _ObjCBlockBase { - ObjCBlock3._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +class NSObject extends _ObjCWrapper { + NSObject._(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. - 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 [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); + } - /// 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); + /// 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); } - 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; + /// 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 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); + static void load(NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_1(_lib._class_NSObject1, _lib._sel_load1); } - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + static void initialize(NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_1(_lib._class_NSObject1, _lib._sel_initialize1); + } -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); -} + NSObject init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSObject._(_ret, _lib, retain: true, release: true); + } -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); -} + 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); + } -int _ObjCBlock5_closureTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1) { - return _ObjCBlock5_closureRegistry[block.ref.target.address]!(arg0, arg1); -} + 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 ObjCBlock5 extends _ObjCBlockBase { - ObjCBlock5._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, 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); + } - /// 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; + void dealloc() { + return _lib._objc_msgSend_1(_id, _lib._sel_dealloc1); + } - /// 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); + void finalize() { + return _lib._objc_msgSend_1(_id, _lib._sel_finalize1); } - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + NSObject copy() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_copy1); + return NSObject._(_ret, _lib, retain: false, release: true); + } -abstract class NSSortOptions { - static const int NSSortConcurrent = 1; - static const int NSSortStable = 16; -} + NSObject mutableCopy() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_mutableCopy1); + return NSObject._(_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 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 NSOrderedCollectionDifference extends NSObject { - NSOrderedCollectionDifference._( - ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + 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); + } - /// 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 bool instancesRespondToSelector_( + NativeCupertinoHttp _lib, ffi.Pointer aSelector) { + return _lib._objc_msgSend_4(_lib._class_NSObject1, + _lib._sel_instancesRespondToSelector_1, aSelector); } - /// 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 bool conformsToProtocol_( + NativeCupertinoHttp _lib, Protocol? protocol) { + return _lib._objc_msgSend_5(_lib._class_NSObject1, + _lib._sel_conformsToProtocol_1, protocol?._id ?? ffi.nullptr); } - /// 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); + IMP methodForSelector_(ffi.Pointer aSelector) { + return _lib._objc_msgSend_6(_id, _lib._sel_methodForSelector_1, aSelector); } - 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 IMP instanceMethodForSelector_( + NativeCupertinoHttp _lib, ffi.Pointer aSelector) { + return _lib._objc_msgSend_6(_lib._class_NSObject1, + _lib._sel_instanceMethodForSelector_1, aSelector); } - 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); + void doesNotRecognizeSelector_(ffi.Pointer aSelector) { + return _lib._objc_msgSend_7( + _id, _lib._sel_doesNotRecognizeSelector_1, aSelector); } - 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 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? get insertions { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_insertions1); - return _ret.address == 0 - ? null - : 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); } - 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); + 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); } - bool get hasChanges { - return _lib._objc_msgSend_11(_id, _lib._sel_hasChanges1); + 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); } - 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); + bool allowsWeakReference() { + return _lib._objc_msgSend_11(_id, _lib._sel_allowsWeakReference1); } - NSOrderedCollectionDifference inverseDifference() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_inverseDifference1); - return NSOrderedCollectionDifference._(_ret, _lib, - retain: true, release: true); + bool retainWeakReference() { + return _lib._objc_msgSend_11(_id, _lib._sel_retainWeakReference1); } - 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 bool isSubclassOfClass_(NativeCupertinoHttp _lib, NSObject aClass) { + return _lib._objc_msgSend_0( + _lib._class_NSObject1, _lib._sel_isSubclassOfClass_1, aClass._id); } - 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 bool resolveClassMethod_( + NativeCupertinoHttp _lib, ffi.Pointer sel) { + return _lib._objc_msgSend_4( + _lib._class_NSObject1, _lib._sel_resolveClassMethod_1, sel); } -} -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 bool resolveInstanceMethod_( + NativeCupertinoHttp _lib, ffi.Pointer sel) { + return _lib._objc_msgSend_4( + _lib._class_NSObject1, _lib._sel_resolveInstanceMethod_1, sel); + } -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 int hash(NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_12(_lib._class_NSObject1, _lib._sel_hash1); + } -ffi.Pointer _ObjCBlock6_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { - return _ObjCBlock6_closureRegistry[block.ref.target.address]!(arg0); -} + 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); + } -class ObjCBlock6 extends _ObjCBlockBase { - ObjCBlock6._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, 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); + } - /// 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 NSString description(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_32(_lib._class_NSObject1, _lib._sel_description1); + return NSString._(_ret, _lib, retain: true, 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 NSString debugDescription(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_32( + _lib._class_NSObject1, _lib._sel_debugDescription1); + return NSString._(_ret, _lib, retain: true, release: true); } - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + static int version(NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_81(_lib._class_NSObject1, _lib._sel_version1); + } -class NSOrderedCollectionChange extends NSObject { - NSOrderedCollectionChange._( - ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + static void setVersion_(NativeCupertinoHttp _lib, int aVersion) { + return _lib._objc_msgSend_279( + _lib._class_NSObject1, _lib._sel_setVersion_1, aVersion); + } - /// 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); + NSObject get classForCoder { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_classForCoder1); + return NSObject._(_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); + 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); } - /// 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); + 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 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 void poseAsClass_(NativeCupertinoHttp _lib, NSObject aClass) { + return _lib._objc_msgSend_200( + _lib._class_NSObject1, _lib._sel_poseAsClass_1, aClass._id); } - 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); + NSObject get autoContentAccessingProxy { + final _ret = + _lib._objc_msgSend_2(_id, _lib._sel_autoContentAccessingProxy1); return NSObject._(_ret, _lib, retain: true, release: true); } - int get changeType { - return _lib._objc_msgSend_150(_id, _lib._sel_changeType1); + 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); } - int get index { - return _lib._objc_msgSend_12(_id, _lib._sel_index1); + void URLResourceDidFinishLoading_(NSURL? sender) { + return _lib._objc_msgSend_281(_id, _lib._sel_URLResourceDidFinishLoading_1, + sender?._id ?? ffi.nullptr); } - int get associatedIndex { - return _lib._objc_msgSend_12(_id, _lib._sel_associatedIndex1); + void URLResourceDidCancelLoading_(NSURL? sender) { + return _lib._objc_msgSend_281(_id, _lib._sel_URLResourceDidCancelLoading_1, + sender?._id ?? ffi.nullptr); } - @override - NSObject init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSObject._(_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); } - 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); + /// 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); } - NSOrderedCollectionChange initWithObject_type_index_associatedIndex_( - NSObject anObject, int type, int index, int associatedIndex) { - final _ret = _lib._objc_msgSend_152( + /// 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_initWithObject_type_index_associatedIndex_1, - anObject._id, - type, - index, - associatedIndex); - return NSOrderedCollectionChange._(_ret, _lib, retain: true, release: true); + _lib._sel_attemptRecoveryFromError_optionIndex_1, + error?._id ?? ffi.nullptr, + recoveryOptionIndex); } +} - 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); +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); } - 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 [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); } -} -abstract class NSCollectionChangeType { - static const int NSCollectionChangeInsert = 0; - static const int NSCollectionChangeRemove = 1; + /// 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); + } } -abstract class NSOrderedCollectionDifferenceCalculationOptions { - static const int NSOrderedCollectionDifferenceCalculationOmitInsertedObjects = - 1; - static const int NSOrderedCollectionDifferenceCalculationOmitRemovedObjects = - 2; - static const int NSOrderedCollectionDifferenceCalculationInferMoves = 4; -} +typedef IMP = ffi.Pointer>; -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 NSInvocation extends _ObjCWrapper { + NSInvocation._(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 [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); + } -bool _ObjCBlock7_closureTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1) { - return _ObjCBlock7_closureRegistry[block.ref.target.address]!(arg0, arg1); + /// 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 ObjCBlock7 extends _ObjCBlockBase { - ObjCBlock7._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, 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); - /// 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; + /// 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); + } - /// 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); + /// 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.Pointer<_ObjCBlock> get pointer => _id; + /// 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 _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); -} +typedef NSUInteger = ffi.UnsignedLong; -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); -} +class NSString extends NSObject { + NSString._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -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); -} + /// 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 ObjCBlock8 extends _ObjCBlockBase { - ObjCBlock8._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, 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 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; + /// 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); + } - /// 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); + 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; } - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + @override + String toString() { + final data = + dataUsingEncoding_(0x94000100 /* NSUTF16LittleEndianStringEncoding */); + return data.bytes.cast().toDartString(length: length); + } -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); -} + int get length { + return _lib._objc_msgSend_12(_id, _lib._sel_length1); + } -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); -} + int characterAtIndex_(int index) { + return _lib._objc_msgSend_13(_id, _lib._sel_characterAtIndex_1, index); + } -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); -} + @override + NSString init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSString._(_ret, _lib, retain: true, release: true); + } -class ObjCBlock9 extends _ObjCBlockBase { - ObjCBlock9._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, 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); + } - /// 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; + NSString substringFromIndex_(int from) { + final _ret = + _lib._objc_msgSend_15(_id, _lib._sel_substringFromIndex_1, from); + return NSString._(_ret, _lib, retain: true, 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); + 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.Pointer<_ObjCBlock> get pointer => _id; -} + NSString substringWithRange_(NSRange range) { + final _ret = + _lib._objc_msgSend_16(_id, _lib._sel_substringWithRange_1, range); + return NSString._(_ret, _lib, retain: true, release: true); + } -class NSFastEnumerationState extends ffi.Struct { - @ffi.UnsignedLong() - external int state; + void getCharacters_range_(ffi.Pointer buffer, NSRange range) { + return _lib._objc_msgSend_17( + _id, _lib._sel_getCharacters_range_1, buffer, range); + } - external ffi.Pointer> itemsPtr; + int compare_(NSString? string) { + return _lib._objc_msgSend_18( + _id, _lib._sel_compare_1, string?._id ?? ffi.nullptr); + } - external ffi.Pointer mutationsPtr; + int compare_options_(NSString? string, int mask) { + return _lib._objc_msgSend_19( + _id, _lib._sel_compare_options_1, string?._id ?? ffi.nullptr, mask); + } - @ffi.Array.multi([5]) - external ffi.Array extra; -} + 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.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); -} + 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.Pointer _ObjCBlock10_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSErrorUserInfoKey arg1) { - return _ObjCBlock10_closureRegistry[block.ref.target.address]!(arg0, arg1); -} + int caseInsensitiveCompare_(NSString? string) { + return _lib._objc_msgSend_18( + _id, _lib._sel_caseInsensitiveCompare_1, string?._id ?? ffi.nullptr); + } -class ObjCBlock10 extends _ObjCBlockBase { - ObjCBlock10._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); + int localizedCompare_(NSString? string) { + return _lib._objc_msgSend_18( + _id, _lib._sel_localizedCompare_1, string?._id ?? ffi.nullptr); + } - /// 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; + int localizedCaseInsensitiveCompare_(NSString? string) { + return _lib._objc_msgSend_18( + _id, + _lib._sel_localizedCaseInsensitiveCompare_1, + string?._id ?? ffi.nullptr); + } - /// 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); + int localizedStandardCompare_(NSString? string) { + return _lib._objc_msgSend_18( + _id, _lib._sel_localizedStandardCompare_1, string?._id ?? ffi.nullptr); } - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + bool isEqualToString_(NSString? aString) { + return _lib._objc_msgSend_22( + _id, _lib._sel_isEqualToString_1, aString?._id ?? ffi.nullptr); + } -typedef NSErrorUserInfoKey = ffi.Pointer; -typedef NSURLResourceKey = ffi.Pointer; + bool hasPrefix_(NSString? str) { + return _lib._objc_msgSend_22( + _id, _lib._sel_hasPrefix_1, str?._id ?? ffi.nullptr); + } -/// 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; + bool hasSuffix_(NSString? str) { + return _lib._objc_msgSend_22( + _id, _lib._sel_hasSuffix_1, str?._id ?? ffi.nullptr); + } - /// 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 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); + } - /// include the properties required by writeBookmarkData:toURL:options: in the bookmark data created - static const int NSURLBookmarkCreationSuitableForBookmarkFile = 1024; + bool containsString_(NSString? str) { + return _lib._objc_msgSend_22( + _id, _lib._sel_containsString_1, str?._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; + bool localizedCaseInsensitiveContainsString_(NSString? str) { + return _lib._objc_msgSend_22( + _id, + _lib._sel_localizedCaseInsensitiveContainsString_1, + str?._id ?? ffi.nullptr); + } - /// if used with kCFURLBookmarkCreationWithSecurityScope, at resolution time only read access to the resource will be granted - static const int NSURLBookmarkCreationSecurityScopeAllowOnlyReadAccess = 4096; -} + bool localizedStandardContainsString_(NSString? str) { + return _lib._objc_msgSend_22(_id, + _lib._sel_localizedStandardContainsString_1, str?._id ?? ffi.nullptr); + } -abstract class NSURLBookmarkResolutionOptions { - /// don't perform any user interaction during bookmark resolution - static const int NSURLBookmarkResolutionWithoutUI = 256; + NSRange localizedStandardRangeOfString_(NSString? str) { + return _lib._objc_msgSend_24(_id, + _lib._sel_localizedStandardRangeOfString_1, str?._id ?? ffi.nullptr); + } - /// don't mount a volume during bookmark resolution - static const int NSURLBookmarkResolutionWithoutMounting = 512; + NSRange rangeOfString_(NSString? searchString) { + return _lib._objc_msgSend_24( + _id, _lib._sel_rangeOfString_1, searchString?._id ?? ffi.nullptr); + } - /// 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; -} + NSRange rangeOfString_options_(NSString? searchString, int mask) { + return _lib._objc_msgSend_25(_id, _lib._sel_rangeOfString_options_1, + searchString?._id ?? ffi.nullptr, mask); + } -typedef NSURLBookmarkFileCreationOptions = NSUInteger; + 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 NSURLHandle extends NSObject { - NSURLHandle._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + 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 [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); + NSRange rangeOfCharacterFromSet_(NSCharacterSet? searchSet) { + return _lib._objc_msgSend_228(_id, _lib._sel_rangeOfCharacterFromSet_1, + searchSet?._id ?? ffi.nullptr); } - /// 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); + NSRange rangeOfCharacterFromSet_options_( + NSCharacterSet? searchSet, int mask) { + return _lib._objc_msgSend_229( + _id, + _lib._sel_rangeOfCharacterFromSet_options_1, + searchSet?._id ?? ffi.nullptr, + mask); } - /// 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); + 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); } - static void registerURLHandleClass_( - NativeCupertinoHttp _lib, NSObject anURLHandleSubclass) { - return _lib._objc_msgSend_200(_lib._class_NSURLHandle1, - _lib._sel_registerURLHandleClass_1, anURLHandleSubclass._id); + NSRange rangeOfComposedCharacterSequenceAtIndex_(int index) { + return _lib._objc_msgSend_231( + _id, _lib._sel_rangeOfComposedCharacterSequenceAtIndex_1, index); } - 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); + NSRange rangeOfComposedCharacterSequencesForRange_(NSRange range) { + return _lib._objc_msgSend_232( + _id, _lib._sel_rangeOfComposedCharacterSequencesForRange_1, range); } - int status() { - return _lib._objc_msgSend_202(_id, _lib._sel_status1); + 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 failureReason() { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_failureReason1); + 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 addClient_(NSObject? client) { - return _lib._objc_msgSend_200( - _id, _lib._sel_addClient_1, client?._id ?? ffi.nullptr); + double get doubleValue { + return _lib._objc_msgSend_85(_id, _lib._sel_doubleValue1); } - void removeClient_(NSObject? client) { - return _lib._objc_msgSend_200( - _id, _lib._sel_removeClient_1, client?._id ?? ffi.nullptr); + double get floatValue { + return _lib._objc_msgSend_84(_id, _lib._sel_floatValue1); } - void loadInBackground() { - return _lib._objc_msgSend_1(_id, _lib._sel_loadInBackground1); + int get intValue { + return _lib._objc_msgSend_79(_id, _lib._sel_intValue1); } - void cancelLoadInBackground() { - return _lib._objc_msgSend_1(_id, _lib._sel_cancelLoadInBackground1); + int get integerValue { + return _lib._objc_msgSend_81(_id, _lib._sel_integerValue1); } - NSData resourceData() { - final _ret = _lib._objc_msgSend_51(_id, _lib._sel_resourceData1); - return NSData._(_ret, _lib, retain: true, release: true); + int get longLongValue { + return _lib._objc_msgSend_82(_id, _lib._sel_longLongValue1); } - NSData availableResourceData() { - final _ret = _lib._objc_msgSend_51(_id, _lib._sel_availableResourceData1); - return NSData._(_ret, _lib, retain: true, release: true); + bool get boolValue { + return _lib._objc_msgSend_11(_id, _lib._sel_boolValue1); } - int expectedResourceDataSize() { - return _lib._objc_msgSend_82(_id, _lib._sel_expectedResourceDataSize1); + 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); } - void flushCachedData() { - return _lib._objc_msgSend_1(_id, _lib._sel_flushCachedData1); + 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); } - void backgroundLoadDidFailWithReason_(NSString? reason) { - return _lib._objc_msgSend_188( - _id, - _lib._sel_backgroundLoadDidFailWithReason_1, - reason?._id ?? ffi.nullptr); + 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); } - void didLoadBytes_loadComplete_(NSData? newBytes, bool yorn) { - return _lib._objc_msgSend_203(_id, _lib._sel_didLoadBytes_loadComplete_1, - newBytes?._id ?? ffi.nullptr, yorn); + 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 bool canInitWithURL_(NativeCupertinoHttp _lib, NSURL? anURL) { - return _lib._objc_msgSend_204(_lib._class_NSURLHandle1, - _lib._sel_canInitWithURL_1, anURL?._id ?? ffi.nullptr); + 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 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); + 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); } - 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); + 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); } - 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); + 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); } - 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); + 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); } - bool writeProperty_forKey_(NSObject propertyValue, NSString? propertyKey) { - return _lib._objc_msgSend_199(_id, _lib._sel_writeProperty_forKey_1, - propertyValue._id, propertyKey?._id ?? ffi.nullptr); + 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); } - bool writeData_(NSData? data) { - return _lib._objc_msgSend_35( - _id, _lib._sel_writeData_1, data?._id ?? ffi.nullptr); + NSRange lineRangeForRange_(NSRange range) { + return _lib._objc_msgSend_232(_id, _lib._sel_lineRangeForRange_1, range); } - NSData loadInForeground() { - final _ret = _lib._objc_msgSend_51(_id, _lib._sel_loadInForeground1); - return NSData._(_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); } - void beginLoadInBackground() { - return _lib._objc_msgSend_1(_id, _lib._sel_beginLoadInBackground1); + NSRange paragraphRangeForRange_(NSRange range) { + return _lib._objc_msgSend_232( + _id, _lib._sel_paragraphRangeForRange_1, range); } - void endLoadInBackground() { - return _lib._objc_msgSend_1(_id, _lib._sel_endLoadInBackground1); + 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 NSURLHandle new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSURLHandle1, _lib._sel_new1); - return NSURLHandle._(_ret, _lib, retain: false, release: true); + void enumerateLinesUsingBlock_(ObjCBlock16 block) { + return _lib._objc_msgSend_236( + _id, _lib._sel_enumerateLinesUsingBlock_1, block._id); } - 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.Pointer get UTF8String { + return _lib._objc_msgSend_53(_id, _lib._sel_UTF8String1); } -} -abstract class NSURLHandleStatus { - static const int NSURLHandleNotLoaded = 0; - static const int NSURLHandleLoadSucceeded = 1; - static const int NSURLHandleLoadInProgress = 2; - static const int NSURLHandleLoadFailed = 3; -} + int get fastestEncoding { + return _lib._objc_msgSend_12(_id, _lib._sel_fastestEncoding1); + } -abstract class NSDataWritingOptions { - /// Hint to use auxiliary file when saving; equivalent to atomically:YES - static const int NSDataWritingAtomic = 1; + int get smallestEncoding { + return _lib._objc_msgSend_12(_id, _lib._sel_smallestEncoding1); + } - /// 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 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); + } - /// Deprecated name for NSDataWritingAtomic - static const int NSAtomicWrite = 1; -} + NSData dataUsingEncoding_(int encoding) { + final _ret = + _lib._objc_msgSend_238(_id, _lib._sel_dataUsingEncoding_1, encoding); + return NSData._(_ret, _lib, retain: true, release: true); + } -/// Data Search Options -abstract class NSDataSearchOptions { - static const int NSDataSearchBackwards = 1; - static const int NSDataSearchAnchored = 2; -} + bool canBeConvertedToEncoding_(int encoding) { + return _lib._objc_msgSend_117( + _id, _lib._sel_canBeConvertedToEncoding_1, encoding); + } -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.Pointer cStringUsingEncoding_(int encoding) { + return _lib._objc_msgSend_239( + _id, _lib._sel_cStringUsingEncoding_1, encoding); + } -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 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); + } -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); -} + 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); + } -class ObjCBlock11 extends _ObjCBlockBase { - ObjCBlock11._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); + int maximumLengthOfBytesUsingEncoding_(int enc) { + return _lib._objc_msgSend_114( + _id, _lib._sel_maximumLengthOfBytesUsingEncoding_1, enc); + } - /// 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; + int lengthOfBytesUsingEncoding_(int enc) { + return _lib._objc_msgSend_114( + _id, _lib._sel_lengthOfBytesUsingEncoding_1, enc); + } - /// 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); + static ffi.Pointer getAvailableStringEncodings( + NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_242( + _lib._class_NSString1, _lib._sel_availableStringEncodings1); } - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + 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); + } -/// Read/Write Options -abstract class NSDataReadingOptions { - /// Hint to map the file in if possible and safe - static const int NSDataReadingMappedIfSafe = 1; + static int getDefaultCStringEncoding(NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSString1, _lib._sel_defaultCStringEncoding1); + } - /// Hint to get the file not to be cached in the kernel - static const int NSDataReadingUncached = 2; + 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); + } - /// Hint to map the file in if possible. This takes precedence over NSDataReadingMappedIfSafe if both are given. - static const int NSDataReadingMappedAlways = 8; + 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); + } - /// Deprecated name for NSDataReadingMappedIfSafe - static const int NSDataReadingMapped = 1; + 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); + } - /// Deprecated name for NSDataReadingMapped - static const int NSMappedRead = 1; + 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); + } - /// Deprecated name for NSDataReadingUncached - static const int NSUncachedRead = 2; -} + 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); + } -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); -} + 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 _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); -} + 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); + } -void _ObjCBlock12_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, int arg1) { - return _ObjCBlock12_closureRegistry[block.ref.target.address]!(arg0, arg1); -} + 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); + } -class ObjCBlock12 extends _ObjCBlockBase { - ObjCBlock12._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, 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); + } - /// 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 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); + } - /// 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); + 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.Pointer<_ObjCBlock> get pointer => _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); + } -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; -} + 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); + } -/// 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; + 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); + } - /// 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; -} + 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); + } -/// 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; + 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); + } - /// 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; + int get hash { + return _lib._objc_msgSend_12(_id, _lib._sel_hash1); + } - /// 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; + 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); + } - /// 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; -} + 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); + } -typedef UTF32Char = UInt32; -typedef UInt32 = ffi.UnsignedInt; + 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); + } -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; -} + 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 _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); -} + 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); + } -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); -} + 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 _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); -} + 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); + } -class ObjCBlock13 extends _ObjCBlockBase { - ObjCBlock13._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, 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); + } - /// 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; + 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); + } - /// 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); + 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); } - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + 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); + } -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); -} + 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); + } -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); -} + 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); + } -class ObjCBlock14 extends _ObjCBlockBase { - ObjCBlock14._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, 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); + } - /// 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; + 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); + } - /// 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); + 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); } - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + 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); + } -typedef NSStringEncoding = NSUInteger; + 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); + } -abstract class NSStringEncodingConversionOptions { - static const int NSStringEncodingConversionAllowLossy = 1; - static const int NSStringEncodingConversionExternalRepresentation = 2; -} + 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); + } -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); -} + 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); + } -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); -} + 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); + } -void _ObjCBlock15_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, int arg1) { - return _ObjCBlock15_closureRegistry[block.ref.target.address]!(arg0, arg1); -} + 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); + } -class ObjCBlock15 extends _ObjCBlockBase { - ObjCBlock15._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, 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); + } - /// 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; + 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 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); + 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); } - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + 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); + } -typedef va_list = __builtin_va_list; -typedef __builtin_va_list = ffi.Pointer; + 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); + } -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; -} + 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); + } -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; -} + 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); + } -@ffi.Packed(2) -class wide extends ffi.Struct { - @UInt32() - external int lo; + 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); + } - @SInt32() - external int hi; -} + 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); + } -typedef SInt32 = ffi.Int; + 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); + } -@ffi.Packed(2) -class UnsignedWide extends ffi.Struct { - @UInt32() - external int lo; + 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); + } - @UInt32() - external int hi; -} + 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); + } -class Float80 extends ffi.Struct { - @SInt16() - external int exp; + 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); + } - @ffi.Array.multi([4]) - external ffi.Array man; -} + 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); + } -typedef SInt16 = ffi.Short; -typedef UInt16 = ffi.UnsignedShort; + NSObject propertyList() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_propertyList1); + return NSObject._(_ret, _lib, retain: true, release: true); + } -class Float96 extends ffi.Struct { - @ffi.Array.multi([2]) - external ffi.Array exp; + NSDictionary propertyListFromStringsFileFormat() { + final _ret = _lib._objc_msgSend_180( + _id, _lib._sel_propertyListFromStringsFileFormat1); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } - @ffi.Array.multi([4]) - external ffi.Array man; -} + ffi.Pointer cString() { + return _lib._objc_msgSend_53(_id, _lib._sel_cString1); + } -@ffi.Packed(2) -class Float32Point extends ffi.Struct { - @Float32() - external double x; + ffi.Pointer lossyCString() { + return _lib._objc_msgSend_53(_id, _lib._sel_lossyCString1); + } - @Float32() - external double y; -} + int cStringLength() { + return _lib._objc_msgSend_12(_id, _lib._sel_cStringLength1); + } -typedef Float32 = ffi.Float; + void getCString_(ffi.Pointer bytes) { + return _lib._objc_msgSend_274(_id, _lib._sel_getCString_1, bytes); + } -@ffi.Packed(2) -class ProcessSerialNumber extends ffi.Struct { - @UInt32() - external int highLongOfPSN; + void getCString_maxLength_(ffi.Pointer bytes, int maxLength) { + return _lib._objc_msgSend_275( + _id, _lib._sel_getCString_maxLength_1, bytes, maxLength); + } - @UInt32() - external int lowLongOfPSN; -} + 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); + } -class Point extends ffi.Struct { - @ffi.Short() - external int v; + bool writeToFile_atomically_(NSString? path, bool useAuxiliaryFile) { + return _lib._objc_msgSend_37(_id, _lib._sel_writeToFile_atomically_1, + path?._id ?? ffi.nullptr, useAuxiliaryFile); + } - @ffi.Short() - external int h; -} + bool writeToURL_atomically_(NSURL? url, bool atomically) { + return _lib._objc_msgSend_161(_id, _lib._sel_writeToURL_atomically_1, + url?._id ?? ffi.nullptr, atomically); + } -class Rect extends ffi.Struct { - @ffi.Short() - external int top; + 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.Short() - external int left; + 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.Short() - external int bottom; + 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.Short() - external int right; -} + 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.Packed(2) -class FixedPoint extends ffi.Struct { - @Fixed() - external int x; + 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); + } - @Fixed() - external int y; -} + 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); + } -typedef Fixed = SInt32; + 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.Packed(2) -class FixedRect extends ffi.Struct { - @Fixed() - external int left; + 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); + } - @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; + 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); + } - @TimeScale() - external int scale; + void getCharacters_(ffi.Pointer buffer) { + return _lib._objc_msgSend_278(_id, _lib._sel_getCharacters_1, buffer); + } - external TimeBase base; -} + /// 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); + } -typedef CompTimeValue = wide; -typedef TimeScale = SInt32; -typedef TimeBase = ffi.Pointer; + /// 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); + } -class NumVersion extends ffi.Struct { - @UInt8() - external int nonRelRev; + NSString stringByAddingPercentEscapesUsingEncoding_(int enc) { + final _ret = _lib._objc_msgSend_15( + _id, _lib._sel_stringByAddingPercentEscapesUsingEncoding_1, enc); + return NSString._(_ret, _lib, retain: true, release: true); + } - @UInt8() - external int stage; + NSString stringByReplacingPercentEscapesUsingEncoding_(int enc) { + final _ret = _lib._objc_msgSend_15( + _id, _lib._sel_stringByReplacingPercentEscapesUsingEncoding_1, enc); + return NSString._(_ret, _lib, retain: true, release: true); + } - @UInt8() - external int minorAndBugRev; + 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); + } - @UInt8() - external int majorRev; + 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); + } } -typedef UInt8 = ffi.UnsignedChar; - -class NumVersionVariant extends ffi.Union { - external NumVersion parts; - - @UInt32() - external int whole; +extension StringToNSString on String { + NSString toNSString(NativeCupertinoHttp lib) => NSString(lib, this); } -class VersRec extends ffi.Struct { - external NumVersion numericVersion; - - @ffi.Short() - external int countryCode; - - @ffi.Array.multi([256]) - external ffi.Array shortVersion; +typedef unichar = ffi.UnsignedShort; - @ffi.Array.multi([256]) - external ffi.Array reserved; -} +class NSCoder extends _ObjCWrapper { + NSCoder._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -typedef ConstStr255Param = ffi.Pointer; + /// 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); + } -class __CFString extends ffi.Opaque {} + /// 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); + } -abstract class CFComparisonResult { - static const int kCFCompareLessThan = -1; - static const int kCFCompareEqualTo = 0; - static const int kCFCompareGreaterThan = 1; + /// 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 CFIndex = ffi.Long; +typedef NSRange = _NSRange; -class CFRange extends ffi.Struct { - @CFIndex() +final class _NSRange extends ffi.Struct { + @NSUInteger() external int location; - @CFIndex() + @NSUInteger() 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; +abstract class NSComparisonResult { + static const int NSOrderedAscending = -1; + static const int NSOrderedSame = 0; + static const int NSOrderedDescending = 1; +} - external CFAllocatorCopyDescriptionCallBack copyDescription; +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; +} - external CFAllocatorAllocateCallBack allocate; +class NSLocale extends _ObjCWrapper { + NSLocale._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); - external CFAllocatorReallocateCallBack reallocate; + /// 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); + } - external CFAllocatorDeallocateCallBack deallocate; + /// 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 CFAllocatorPreferredSizeCallBack preferredSize; + /// 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); + } } -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 NSCharacterSet extends NSObject { + NSCharacterSet._(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 [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 [NSMutableIndexSet] that wraps the given raw object pointer. - static NSMutableIndexSet 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 NSMutableIndexSet._(other, lib, retain: retain, release: release); + return NSCharacterSet._(other, lib, retain: retain, release: release); } - /// Returns whether [obj] is an instance of [NSMutableIndexSet]. + /// 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_NSMutableIndexSet1); + obj._lib._class_NSCharacterSet1); } - void addIndexes_(NSIndexSet? indexSet) { - return _lib._objc_msgSend_281( - _id, _lib._sel_addIndexes_1, indexSet?._id ?? ffi.nullptr); + 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); } - void removeIndexes_(NSIndexSet? indexSet) { - return _lib._objc_msgSend_281( - _id, _lib._sel_removeIndexes_1, indexSet?._id ?? ffi.nullptr); + 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); } - void removeAllIndexes() { - return _lib._objc_msgSend_1(_id, _lib._sel_removeAllIndexes1); + 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); } - void addIndex_(int value) { - return _lib._objc_msgSend_282(_id, _lib._sel_addIndex_1, value); + 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); } - void removeIndex_(int value) { - return _lib._objc_msgSend_282(_id, _lib._sel_removeIndex_1, value); + 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); } - void addIndexesInRange_(NSRange range) { - return _lib._objc_msgSend_283(_id, _lib._sel_addIndexesInRange_1, range); + 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); } - void removeIndexesInRange_(NSRange range) { - return _lib._objc_msgSend_283(_id, _lib._sel_removeIndexesInRange_1, range); + 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); } - void shiftIndexesStartingAtIndex_by_(int index, int delta) { - return _lib._objc_msgSend_284( - _id, _lib._sel_shiftIndexesStartingAtIndex_by_1, index, delta); + 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 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 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 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 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 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 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 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 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 NSMutableIndexSet alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableIndexSet1, _lib._sel_alloc1); - return NSMutableIndexSet._(_ret, _lib, retain: false, 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); } -} - -/// 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); + 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); } - /// 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); + 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); } - /// 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); + 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); } - void addObject_(NSObject anObject) { - return _lib._objc_msgSend_200(_id, _lib._sel_addObject_1, anObject._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); } - void insertObject_atIndex_(NSObject anObject, int index) { - return _lib._objc_msgSend_285( - _id, _lib._sel_insertObject_atIndex_1, anObject._id, index); + 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); } - void removeLastObject() { - return _lib._objc_msgSend_1(_id, _lib._sel_removeLastObject1); + 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 removeObjectAtIndex_(int index) { - return _lib._objc_msgSend_282(_id, _lib._sel_removeObjectAtIndex_1, index); + 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); } - void replaceObjectAtIndex_withObject_(int index, NSObject anObject) { - return _lib._objc_msgSend_286( - _id, _lib._sel_replaceObjectAtIndex_withObject_1, index, anObject._id); + bool characterIsMember_(int aCharacter) { + return _lib._objc_msgSend_224( + _id, _lib._sel_characterIsMember_1, aCharacter); } - @override - NSMutableArray init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSMutableArray._(_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); } - NSMutableArray initWithCapacity_(int numItems) { - final _ret = - _lib._objc_msgSend_94(_id, _lib._sel_initWithCapacity_1, numItems); - return NSMutableArray._(_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); } - @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); + bool longCharacterIsMember_(int theLongChar) { + return _lib._objc_msgSend_225( + _id, _lib._sel_longCharacterIsMember_1, theLongChar); } - void addObjectsFromArray_(NSArray? otherArray) { - return _lib._objc_msgSend_287( - _id, _lib._sel_addObjectsFromArray_1, otherArray?._id ?? ffi.nullptr); + bool isSupersetOfSet_(NSCharacterSet? theOtherSet) { + return _lib._objc_msgSend_226( + _id, _lib._sel_isSupersetOfSet_1, theOtherSet?._id ?? ffi.nullptr); } - void exchangeObjectAtIndex_withObjectAtIndex_(int idx1, int idx2) { - return _lib._objc_msgSend_288( - _id, _lib._sel_exchangeObjectAtIndex_withObjectAtIndex_1, idx1, idx2); + bool hasMemberInPlane_(int thePlane) { + return _lib._objc_msgSend_227(_id, _lib._sel_hasMemberInPlane_1, thePlane); } - void removeAllObjects() { - return _lib._objc_msgSend_1(_id, _lib._sel_removeAllObjects1); + /// 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); } - void removeObject_inRange_(NSObject anObject, NSRange range) { - return _lib._objc_msgSend_289( - _id, _lib._sel_removeObject_inRange_1, anObject._id, range); + /// 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); } - void removeObject_(NSObject anObject) { - return _lib._objc_msgSend_200(_id, _lib._sel_removeObject_1, anObject._id); + /// 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); } - void removeObjectIdenticalTo_inRange_(NSObject anObject, NSRange range) { - return _lib._objc_msgSend_289( - _id, _lib._sel_removeObjectIdenticalTo_inRange_1, anObject._id, range); + /// 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); } - void removeObjectIdenticalTo_(NSObject anObject) { - return _lib._objc_msgSend_200( - _id, _lib._sel_removeObjectIdenticalTo_1, anObject._id); + /// 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); } - void removeObjectsFromIndices_numIndices_( - ffi.Pointer indices, int cnt) { - return _lib._objc_msgSend_290( - _id, _lib._sel_removeObjectsFromIndices_numIndices_1, indices, cnt); + /// 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); } - void removeObjectsInArray_(NSArray? otherArray) { - return _lib._objc_msgSend_287( - _id, _lib._sel_removeObjectsInArray_1, otherArray?._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 removeObjectsInRange_(NSRange range) { - return _lib._objc_msgSend_283(_id, _lib._sel_removeObjectsInRange_1, range); + 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 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, +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 [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 [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 [NSMutableData] that wraps the given raw object pointer. - static NSMutableData 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 NSMutableData._(other, lib, retain: retain, release: release); + return NSData._(other, lib, retain: retain, release: release); } - /// Returns whether [obj] is an instance of [NSMutableData]. + /// 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_NSMutableData1); - } - - ffi.Pointer get mutableBytes { - return _lib._objc_msgSend_31(_id, _lib._sel_mutableBytes1); + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSData1); } - @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); + /// 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 increaseLengthBy_(int extraLength) { - return _lib._objc_msgSend_282( - _id, _lib._sel_increaseLengthBy_1, extraLength); + 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 replaceBytesInRange_withBytes_( - NSRange range, ffi.Pointer bytes) { - return _lib._objc_msgSend_303( - _id, _lib._sel_replaceBytesInRange_withBytes_1, range, bytes); + void getBytes_length_(ffi.Pointer buffer, int length) { + return _lib._objc_msgSend_33( + _id, _lib._sel_getBytes_length_1, buffer, length); } - void resetBytesInRange_(NSRange range) { - return _lib._objc_msgSend_283(_id, _lib._sel_resetBytesInRange_1, range); + void getBytes_range_(ffi.Pointer buffer, NSRange range) { + return _lib._objc_msgSend_34( + _id, _lib._sel_getBytes_range_1, buffer, range); } - void setData_(NSData? data) { - return _lib._objc_msgSend_302( - _id, _lib._sel_setData_1, data?._id ?? ffi.nullptr); + bool isEqualToData_(NSData? other) { + return _lib._objc_msgSend_35( + _id, _lib._sel_isEqualToData_1, other?._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); + NSData subdataWithRange_(NSRange range) { + final _ret = + _lib._objc_msgSend_36(_id, _lib._sel_subdataWithRange_1, range); + return NSData._(_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); + bool writeToFile_atomically_(NSString? path, bool useAuxiliaryFile) { + return _lib._objc_msgSend_37(_id, _lib._sel_writeToFile_atomically_1, + path?._id ?? ffi.nullptr, useAuxiliaryFile); } - 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); + /// 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); } - NSMutableData initWithCapacity_(int capacity) { - final _ret = - _lib._objc_msgSend_94(_id, _lib._sel_initWithCapacity_1, capacity); - return NSMutableData._(_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); } - NSMutableData initWithLength_(int length) { - final _ret = _lib._objc_msgSend_94(_id, _lib._sel_initWithLength_1, length); - return NSMutableData._(_ret, _lib, retain: true, release: true); + 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); } - /// 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); + 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 compressUsingAlgorithm_error_( - int algorithm, ffi.Pointer> error) { - return _lib._objc_msgSend_305( - _id, _lib._sel_compressUsingAlgorithm_error_1, algorithm, error); + /// '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); } - 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 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 NSMutableData dataWithBytes_length_( + static NSData 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); + 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 NSMutableData dataWithBytesNoCopy_length_( + static NSData dataWithBytesNoCopy_length_( NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_212(_lib._class_NSMutableData1, + final _ret = _lib._objc_msgSend_212(_lib._class_NSData1, _lib._sel_dataWithBytesNoCopy_length_1, bytes, length); - return NSMutableData._(_ret, _lib, retain: false, release: true); + return NSData._(_ret, _lib, retain: false, release: true); } - static NSMutableData dataWithBytesNoCopy_length_freeWhenDone_( + static NSData dataWithBytesNoCopy_length_freeWhenDone_( NativeCupertinoHttp _lib, ffi.Pointer bytes, int length, bool b) { - final _ret = _lib._objc_msgSend_213(_lib._class_NSMutableData1, + final _ret = _lib._objc_msgSend_213(_lib._class_NSData1, _lib._sel_dataWithBytesNoCopy_length_freeWhenDone_1, bytes, length, b); - return NSMutableData._(_ret, _lib, retain: false, release: true); + return NSData._(_ret, _lib, retain: false, release: true); } - static NSMutableData dataWithContentsOfFile_options_error_( + static NSData dataWithContentsOfFile_options_error_( NativeCupertinoHttp _lib, NSString? path, int readOptionsMask, ffi.Pointer> errorPtr) { final _ret = _lib._objc_msgSend_214( - _lib._class_NSMutableData1, + _lib._class_NSData1, _lib._sel_dataWithContentsOfFile_options_error_1, path?._id ?? ffi.nullptr, readOptionsMask, errorPtr); - return NSMutableData._(_ret, _lib, retain: true, release: true); + return NSData._(_ret, _lib, retain: true, release: true); } - static NSMutableData dataWithContentsOfURL_options_error_( + static NSData dataWithContentsOfURL_options_error_( NativeCupertinoHttp _lib, NSURL? url, int readOptionsMask, ffi.Pointer> errorPtr) { final _ret = _lib._objc_msgSend_215( - _lib._class_NSMutableData1, + _lib._class_NSData1, _lib._sel_dataWithContentsOfURL_options_error_1, url?._id ?? ffi.nullptr, readOptionsMask, errorPtr); - return NSMutableData._(_ret, _lib, retain: true, release: true); + return NSData._(_ret, _lib, retain: true, release: true); } - static NSMutableData dataWithContentsOfFile_( + static NSData dataWithContentsOfFile_( NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSMutableData1, + final _ret = _lib._objc_msgSend_42(_lib._class_NSData1, _lib._sel_dataWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSMutableData._(_ret, _lib, retain: true, release: true); + return NSData._(_ret, _lib, retain: true, release: true); } - static NSMutableData dataWithContentsOfURL_( - NativeCupertinoHttp _lib, NSURL? url) { - final _ret = _lib._objc_msgSend_201(_lib._class_NSMutableData1, + 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 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); + return NSData._(_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); + 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); } - 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); + 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); } - 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); + 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 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); + 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 NSPurgeableData dataWithContentsOfFile_options_error_( - NativeCupertinoHttp _lib, - NSString? path, - int readOptionsMask, - ffi.Pointer> errorPtr) { + NSData initWithContentsOfFile_options_error_(NSString? path, + int readOptionsMask, ffi.Pointer> errorPtr) { final _ret = _lib._objc_msgSend_214( - _lib._class_NSPurgeableData1, - _lib._sel_dataWithContentsOfFile_options_error_1, + _id, + _lib._sel_initWithContentsOfFile_options_error_1, path?._id ?? ffi.nullptr, readOptionsMask, errorPtr); - return NSPurgeableData._(_ret, _lib, retain: true, release: true); + return NSData._(_ret, _lib, retain: true, release: true); } - static NSPurgeableData dataWithContentsOfURL_options_error_( - NativeCupertinoHttp _lib, - NSURL? url, - int readOptionsMask, + NSData initWithContentsOfURL_options_error_(NSURL? url, int readOptionsMask, ffi.Pointer> errorPtr) { final _ret = _lib._objc_msgSend_215( - _lib._class_NSPurgeableData1, - _lib._sel_dataWithContentsOfURL_options_error_1, + _id, + _lib._sel_initWithContentsOfURL_options_error_1, url?._id ?? ffi.nullptr, readOptionsMask, errorPtr); - return NSPurgeableData._(_ret, _lib, retain: true, release: true); + return NSData._(_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); + 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); } - 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); + 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); } - 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); + 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 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 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); } - 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); + /// 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); } - 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); + /// 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); } -} - -/// 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); + /// 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); } - /// 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); + /// 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 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); + /// 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); } - void removeObjectForKey_(NSObject aKey) { - return _lib._objc_msgSend_200( - _id, _lib._sel_removeObjectForKey_1, aKey._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); } - void setObject_forKey_(NSObject anObject, NSObject aKey) { - return _lib._objc_msgSend_306( - _id, _lib._sel_setObject_forKey_1, anObject._id, aKey._id); + void getBytes_(ffi.Pointer buffer) { + return _lib._objc_msgSend_59(_id, _lib._sel_getBytes_1, buffer); } - @override - NSMutableDictionary init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSMutableDictionary._(_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); } - NSMutableDictionary initWithCapacity_(int numItems) { - final _ret = - _lib._objc_msgSend_94(_id, _lib._sel_initWithCapacity_1, numItems); - return NSMutableDictionary._(_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); } - @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); + /// 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); } - void addEntriesFromDictionary_(NSDictionary? otherDictionary) { - return _lib._objc_msgSend_307(_id, _lib._sel_addEntriesFromDictionary_1, - otherDictionary?._id ?? ffi.nullptr); + NSString base64Encoding() { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_base64Encoding1); + return NSString._(_ret, _lib, retain: true, release: true); } - void removeAllObjects() { - return _lib._objc_msgSend_1(_id, _lib._sel_removeAllObjects1); + 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 removeObjectsForKeys_(NSArray? keyArray) { - return _lib._objc_msgSend_287( - _id, _lib._sel_removeObjectsForKeys_1, keyArray?._id ?? ffi.nullptr); + 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); } +} - void setDictionary_(NSDictionary? otherDictionary) { - return _lib._objc_msgSend_307( - _id, _lib._sel_setDictionary_1, otherDictionary?._id ?? ffi.nullptr); - } +class NSURL extends NSObject { + NSURL._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); - void setObject_forKeyedSubscript_(NSObject obj, NSObject key) { - return _lib._objc_msgSend_306( - _id, _lib._sel_setObject_forKeyedSubscript_1, obj._id, key._id); + /// 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); } - 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); + /// 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); } - 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); + /// 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); } - 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); + /// 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); } - 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); + /// 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); } - 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); + /// 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); } - /// 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); + 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 NSMutableDictionary dictionary(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSMutableDictionary1, _lib._sel_dictionary1); - return NSMutableDictionary._(_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); } - 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); + /// 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); } - 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); + /// 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 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 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); } - 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); + /// 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 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); + /// 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); } - /// Reads dictionary stored in NSPropertyList format from the specified url. - static NSDictionary dictionaryWithContentsOfURL_error_( + /// 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, - 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); + 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); } - /// 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); + /// 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 NSMutableDictionary new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableDictionary1, _lib._sel_new1); - return NSMutableDictionary._(_ret, _lib, retain: false, 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 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 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); } -} - -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); + 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); } - /// 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); + /// 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); } - /// 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); + /// 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); } - NSNotificationName get name { - return _lib._objc_msgSend_32(_id, _lib._sel_name1); + /// 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); } - NSObject get object { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_object1); - return NSObject._(_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); } - NSDictionary? get userInfo { - final _ret = _lib._objc_msgSend_180(_id, _lib._sel_userInfo1); + /// 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 - : NSDictionary._(_ret, _lib, retain: true, release: true); + : NSData._(_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); + 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); } - 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); + /// 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 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); + /// 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 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); + /// 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); } - @override - NSNotification init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSNotification._(_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 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? 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 NSNotification alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSNotification1, _lib._sel_alloc1); - return NSNotification._(_ret, _lib, retain: false, 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); } -} - -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); + 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); } - /// 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); + 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); } - /// 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); + NSString? get password { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_password1); 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_313( - _id, - _lib._sel_addObserver_selector_name_object_1, - observer._id, - aSelector, - aName, - anObject._id); + 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); } - void postNotification_(NSNotification? notification) { - return _lib._objc_msgSend_314( - _id, _lib._sel_postNotification_1, notification?._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); } - void postNotificationName_object_( - NSNotificationName aName, NSObject anObject) { - return _lib._objc_msgSend_315( - _id, _lib._sel_postNotificationName_object_1, aName, anObject._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); } - 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); + 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); } - void removeObserver_(NSObject observer) { - return _lib._objc_msgSend_200( - _id, _lib._sel_removeObserver_1, observer._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); } - 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); + /// 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); } - NSObject addObserverForName_object_queue_usingBlock_(NSNotificationName name, - NSObject obj, NSOperationQueue? queue, ObjCBlock18 block) { - final _ret = _lib._objc_msgSend_346( + /// 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_addObserverForName_object_queue_usingBlock_1, - name, - obj._id, - queue?._id ?? ffi.nullptr, - block._id); - return NSObject._(_ret, _lib, retain: true, release: true); + _lib._sel_getFileSystemRepresentation_maxLength_1, + buffer, + maxBufferLength); } - 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); + /// 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 NSNotificationCenter alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSNotificationCenter1, _lib._sel_alloc1); - return NSNotificationCenter._(_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); } -} -class NSOperationQueue extends NSObject { - NSOperationQueue._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + 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 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 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 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 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 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); + /// 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); } - /// @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); + /// 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 - : NSProgress._(_ret, _lib, retain: true, release: true); + : NSURL._(_ret, _lib, retain: true, release: true); } - void addOperation_(NSOperation? op) { - return _lib._objc_msgSend_334( - _id, _lib._sel_addOperation_1, op?._id ?? ffi.nullptr); + /// 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 addOperations_waitUntilFinished_(NSArray? ops, bool wait) { - return _lib._objc_msgSend_340( + /// 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_addOperations_waitUntilFinished_1, - ops?._id ?? ffi.nullptr, - wait); + _lib._sel_resourceValuesForKeys_error_1, + keys?._id ?? ffi.nullptr, + error); + return NSDictionary._(_ret, _lib, retain: true, release: true); } - void addOperationWithBlock_(ObjCBlock16 block) { - return _lib._objc_msgSend_341( - _id, _lib._sel_addOperationWithBlock_1, 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); } - /// @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); + /// 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 get maxConcurrentOperationCount { - return _lib._objc_msgSend_81(_id, _lib._sel_maxConcurrentOperationCount1); + /// 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); } - set maxConcurrentOperationCount(int value) { - _lib._objc_msgSend_342( - _id, _lib._sel_setMaxConcurrentOperationCount_1, value); + /// 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); } - bool get suspended { - return _lib._objc_msgSend_11(_id, _lib._sel_isSuspended1); + /// NS_SWIFT_SENDABLE + void setTemporaryResourceValue_forKey_(NSObject value, NSURLResourceKey key) { + return _lib._objc_msgSend_189( + _id, _lib._sel_setTemporaryResourceValue_forKey_1, value._id, key); } - set suspended(bool value) { - _lib._objc_msgSend_328(_id, _lib._sel_setSuspended_1, value); + /// 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); } - 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); + /// 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); } - set name(NSString? value) { - _lib._objc_msgSend_327(_id, _lib._sel_setName_1, value?._id ?? ffi.nullptr); + /// 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); } - int get qualityOfService { - return _lib._objc_msgSend_338(_id, _lib._sel_qualityOfService1); + /// 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); } - set qualityOfService(int value) { - _lib._objc_msgSend_339(_id, _lib._sel_setQualityOfService_1, value); + /// 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); } - /// actually retain - dispatch_queue_t get underlyingQueue { - return _lib._objc_msgSend_343(_id, _lib._sel_underlyingQueue1); + /// 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); } - /// actually retain - set underlyingQueue(dispatch_queue_t value) { - _lib._objc_msgSend_344(_id, _lib._sel_setUnderlyingQueue_1, value); + /// 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); } - void cancelAllOperations() { - return _lib._objc_msgSend_1(_id, _lib._sel_cancelAllOperations1); + /// 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); } - void waitUntilAllOperationsAreFinished() { + /// Revokes the access granted to the url by a prior successful call to startAccessingSecurityScopedResource. + void stopAccessingSecurityScopedResource() { return _lib._objc_msgSend_1( - _id, _lib._sel_waitUntilAllOperationsAreFinished1); + _id, _lib._sel_stopAccessingSecurityScopedResource1); } - static NSOperationQueue? getCurrentQueue(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_345( - _lib._class_NSOperationQueue1, _lib._sel_currentQueue1); + /// 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 - : NSOperationQueue._(_ret, _lib, retain: true, release: true); + : NSArray._(_ret, _lib, retain: true, release: true); } - static NSOperationQueue? getMainQueue(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_345( - _lib._class_NSOperationQueue1, _lib._sel_mainQueue1); + NSString? get lastPathComponent { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_lastPathComponent1); return _ret.address == 0 ? null - : NSOperationQueue._(_ret, _lib, retain: true, release: true); + : NSString._(_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); + NSString? get pathExtension { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_pathExtension1); return _ret.address == 0 ? null - : NSArray._(_ret, _lib, retain: true, release: true); + : NSString._(_ret, _lib, retain: true, release: true); } - int get operationCount { - return _lib._objc_msgSend_12(_id, _lib._sel_operationCount1); + 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); } - 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); + 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); } - static NSOperationQueue alloc(NativeCupertinoHttp _lib) { + NSURL? get URLByDeletingLastPathComponent { final _ret = - _lib._objc_msgSend_2(_lib._class_NSOperationQueue1, _lib._sel_alloc1); - return NSOperationQueue._(_ret, _lib, retain: false, release: true); + _lib._objc_msgSend_52(_id, _lib._sel_URLByDeletingLastPathComponent1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, 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); + 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); } - /// 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); + 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); } - /// 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); + /// 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); } - 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); + 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); } - 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); + /// 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); } - 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); + /// 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); } - 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); + 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); } - 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); + /// 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); } - void becomeCurrentWithPendingUnitCount_(int unitCount) { - return _lib._objc_msgSend_322( - _id, _lib._sel_becomeCurrentWithPendingUnitCount_1, unitCount); + bool setProperty_forKey_(NSObject property, NSString? propertyKey) { + return _lib._objc_msgSend_199(_id, _lib._sel_setProperty_forKey_1, + property._id, propertyKey?._id ?? ffi.nullptr); } - void performAsCurrentWithPendingUnitCount_usingBlock_( - int unitCount, ObjCBlock16 work) { - return _lib._objc_msgSend_323( - _id, - _lib._sel_performAsCurrentWithPendingUnitCount_usingBlock_1, - unitCount, - work._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( + _id, _lib._sel_URLHandleUsingCache_1, shouldUseCache); + return NSURLHandle._(_ret, _lib, retain: true, release: true); } - void resignCurrent() { - return _lib._objc_msgSend_1(_id, _lib._sel_resignCurrent1); + 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); } - void addChild_withPendingUnitCount_(NSProgress? child, int inUnitCount) { - return _lib._objc_msgSend_324( - _id, - _lib._sel_addChild_withPendingUnitCount_1, - child?._id ?? ffi.nullptr, - inUnitCount); + 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); } +} - int get totalUnitCount { - return _lib._objc_msgSend_325(_id, _lib._sel_totalUnitCount1); - } +class NSNumber extends NSValue { + NSNumber._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); - set totalUnitCount(int value) { - _lib._objc_msgSend_326(_id, _lib._sel_setTotalUnitCount_1, value); + /// 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); } - int get completedUnitCount { - return _lib._objc_msgSend_325(_id, _lib._sel_completedUnitCount1); + /// 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); } - set completedUnitCount(int value) { - _lib._objc_msgSend_326(_id, _lib._sel_setCompletedUnitCount_1, value); + /// 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); } - 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); + @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); } - set localizedDescription(NSString? value) { - _lib._objc_msgSend_327( - _id, _lib._sel_setLocalizedDescription_1, value?._id ?? ffi.nullptr); + NSNumber initWithChar_(int value) { + final _ret = _lib._objc_msgSend_62(_id, _lib._sel_initWithChar_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - NSString? get localizedAdditionalDescription { + NSNumber initWithUnsignedChar_(int value) { 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); + _lib._objc_msgSend_63(_id, _lib._sel_initWithUnsignedChar_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - bool get cancellable { - return _lib._objc_msgSend_11(_id, _lib._sel_isCancellable1); + NSNumber initWithShort_(int value) { + final _ret = _lib._objc_msgSend_64(_id, _lib._sel_initWithShort_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - set cancellable(bool value) { - _lib._objc_msgSend_328(_id, _lib._sel_setCancellable_1, value); + NSNumber initWithUnsignedShort_(int value) { + final _ret = + _lib._objc_msgSend_65(_id, _lib._sel_initWithUnsignedShort_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - bool get pausable { - return _lib._objc_msgSend_11(_id, _lib._sel_isPausable1); + NSNumber initWithInt_(int value) { + final _ret = _lib._objc_msgSend_66(_id, _lib._sel_initWithInt_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - set pausable(bool value) { - _lib._objc_msgSend_328(_id, _lib._sel_setPausable_1, value); + NSNumber initWithUnsignedInt_(int value) { + final _ret = + _lib._objc_msgSend_67(_id, _lib._sel_initWithUnsignedInt_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - bool get cancelled { - return _lib._objc_msgSend_11(_id, _lib._sel_isCancelled1); + NSNumber initWithLong_(int value) { + final _ret = _lib._objc_msgSend_68(_id, _lib._sel_initWithLong_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - bool get paused { - return _lib._objc_msgSend_11(_id, _lib._sel_isPaused1); + NSNumber initWithUnsignedLong_(int value) { + final _ret = + _lib._objc_msgSend_69(_id, _lib._sel_initWithUnsignedLong_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - ObjCBlock16 get cancellationHandler { - final _ret = _lib._objc_msgSend_329(_id, _lib._sel_cancellationHandler1); - return ObjCBlock16._(_ret, _lib); + NSNumber initWithLongLong_(int value) { + final _ret = + _lib._objc_msgSend_70(_id, _lib._sel_initWithLongLong_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - set cancellationHandler(ObjCBlock16 value) { - _lib._objc_msgSend_330(_id, _lib._sel_setCancellationHandler_1, value._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); } - ObjCBlock16 get pausingHandler { - final _ret = _lib._objc_msgSend_329(_id, _lib._sel_pausingHandler1); - return ObjCBlock16._(_ret, _lib); + NSNumber initWithFloat_(double value) { + final _ret = _lib._objc_msgSend_72(_id, _lib._sel_initWithFloat_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - set pausingHandler(ObjCBlock16 value) { - _lib._objc_msgSend_330(_id, _lib._sel_setPausingHandler_1, value._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); } - ObjCBlock16 get resumingHandler { - final _ret = _lib._objc_msgSend_329(_id, _lib._sel_resumingHandler1); - return ObjCBlock16._(_ret, _lib); + NSNumber initWithBool_(bool value) { + final _ret = _lib._objc_msgSend_74(_id, _lib._sel_initWithBool_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - set resumingHandler(ObjCBlock16 value) { - _lib._objc_msgSend_330(_id, _lib._sel_setResumingHandler_1, value._id); + 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 setUserInfoObject_forKey_( - NSObject objectOrNil, NSProgressUserInfoKey key) { - return _lib._objc_msgSend_189( - _id, _lib._sel_setUserInfoObject_forKey_1, objectOrNil._id, key); + NSNumber initWithUnsignedInteger_(int value) { + final _ret = + _lib._objc_msgSend_69(_id, _lib._sel_initWithUnsignedInteger_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - bool get indeterminate { - return _lib._objc_msgSend_11(_id, _lib._sel_isIndeterminate1); + int get charValue { + return _lib._objc_msgSend_75(_id, _lib._sel_charValue1); } - double get fractionCompleted { - return _lib._objc_msgSend_85(_id, _lib._sel_fractionCompleted1); + int get unsignedCharValue { + return _lib._objc_msgSend_76(_id, _lib._sel_unsignedCharValue1); } - bool get finished { - return _lib._objc_msgSend_11(_id, _lib._sel_isFinished1); + int get shortValue { + return _lib._objc_msgSend_77(_id, _lib._sel_shortValue1); } - void cancel() { - return _lib._objc_msgSend_1(_id, _lib._sel_cancel1); + int get unsignedShortValue { + return _lib._objc_msgSend_78(_id, _lib._sel_unsignedShortValue1); } - void pause() { - return _lib._objc_msgSend_1(_id, _lib._sel_pause1); + int get intValue { + return _lib._objc_msgSend_79(_id, _lib._sel_intValue1); } - void resume() { - return _lib._objc_msgSend_1(_id, _lib._sel_resume1); + int get unsignedIntValue { + return _lib._objc_msgSend_80(_id, _lib._sel_unsignedIntValue1); } - 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); + int get longValue { + return _lib._objc_msgSend_81(_id, _lib._sel_longValue1); } - NSProgressKind get kind { - return _lib._objc_msgSend_32(_id, _lib._sel_kind1); + int get unsignedLongValue { + return _lib._objc_msgSend_12(_id, _lib._sel_unsignedLongValue1); } - set kind(NSProgressKind value) { - _lib._objc_msgSend_327(_id, _lib._sel_setKind_1, value); + int get longLongValue { + return _lib._objc_msgSend_82(_id, _lib._sel_longLongValue1); } - 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 unsignedLongLongValue { + return _lib._objc_msgSend_83(_id, _lib._sel_unsignedLongLongValue1); } - set estimatedTimeRemaining(NSNumber? value) { - _lib._objc_msgSend_331( - _id, _lib._sel_setEstimatedTimeRemaining_1, value?._id ?? ffi.nullptr); + double get floatValue { + return _lib._objc_msgSend_84(_id, _lib._sel_floatValue1); } - 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); + double get doubleValue { + return _lib._objc_msgSend_85(_id, _lib._sel_doubleValue1); } - set throughput(NSNumber? value) { - _lib._objc_msgSend_331( - _id, _lib._sel_setThroughput_1, value?._id ?? ffi.nullptr); + bool get boolValue { + return _lib._objc_msgSend_11(_id, _lib._sel_boolValue1); } - NSProgressFileOperationKind get fileOperationKind { - return _lib._objc_msgSend_32(_id, _lib._sel_fileOperationKind1); + int get integerValue { + return _lib._objc_msgSend_81(_id, _lib._sel_integerValue1); } - set fileOperationKind(NSProgressFileOperationKind value) { - _lib._objc_msgSend_327(_id, _lib._sel_setFileOperationKind_1, value); + int get unsignedIntegerValue { + return _lib._objc_msgSend_12(_id, _lib._sel_unsignedIntegerValue1); } - NSURL? get fileURL { - final _ret = _lib._objc_msgSend_52(_id, _lib._sel_fileURL1); + NSString? get stringValue { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_stringValue1); return _ret.address == 0 ? null - : NSURL._(_ret, _lib, retain: true, release: true); + : NSString._(_ret, _lib, retain: true, release: true); } - set fileURL(NSURL? value) { - _lib._objc_msgSend_332( - _id, _lib._sel_setFileURL_1, value?._id ?? ffi.nullptr); + int compare_(NSNumber? otherNumber) { + return _lib._objc_msgSend_86( + _id, _lib._sel_compare_1, otherNumber?._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); + bool isEqualToNumber_(NSNumber? number) { + return _lib._objc_msgSend_87( + _id, _lib._sel_isEqualToNumber_1, number?._id ?? ffi.nullptr); } - set fileTotalCount(NSNumber? value) { - _lib._objc_msgSend_331( - _id, _lib._sel_setFileTotalCount_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); } - 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); + 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); } - set fileCompletedCount(NSNumber? value) { - _lib._objc_msgSend_331( - _id, _lib._sel_setFileCompletedCount_1, value?._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); } - void publish() { - return _lib._objc_msgSend_1(_id, _lib._sel_publish1); + 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 unpublish() { - return _lib._objc_msgSend_1(_id, _lib._sel_unpublish1); + 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 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 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 void removeSubscriber_(NativeCupertinoHttp _lib, NSObject subscriber) { - return _lib._objc_msgSend_200( - _lib._class_NSProgress1, _lib._sel_removeSubscriber_1, subscriber._id); + 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); } - bool get old { - return _lib._objc_msgSend_11(_id, _lib._sel_isOld1); + 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 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 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 NSProgress alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSProgress1, _lib._sel_alloc1); - return NSProgress._(_ret, _lib, retain: false, 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); } -} - -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); -} + 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 _ObjCBlock16_closureTrampoline(ffi.Pointer<_ObjCBlock> block) { - return _ObjCBlock16_closureRegistry[block.ref.target.address]!(); -} + 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); + } -class ObjCBlock16 extends _ObjCBlockBase { - ObjCBlock16._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, 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); + } - /// 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; + 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); + } - /// 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); + 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.Pointer<_ObjCBlock> get pointer => _id; -} + 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); + } -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); -} + 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); + } -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); -} + 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); + } -NSProgressUnpublishingHandler _ObjCBlock17_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { - return _ObjCBlock17_closureRegistry[block.ref.target.address]!(arg0); -} + 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); + } -class ObjCBlock17 extends _ObjCBlockBase { - ObjCBlock17._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, 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); + } - /// 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; + 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 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); + 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.Pointer<_ObjCBlock> get pointer => _id; + 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); + } } -typedef NSProgressUnpublishingHandler = ffi.Pointer<_ObjCBlock>; - -class NSOperation extends NSObject { - NSOperation._(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 [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 [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 [NSOperation] that wraps the given raw object pointer. - static NSOperation 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 NSOperation._(other, lib, retain: retain, release: release); + return NSValue._(other, lib, retain: retain, release: release); } - /// Returns whether [obj] is an instance of [NSOperation]. + /// 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_NSOperation1); + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSValue1); } - void start() { - return _lib._objc_msgSend_1(_id, _lib._sel_start1); - } + void getValue_size_(ffi.Pointer value, int size) { + return _lib._objc_msgSend_33(_id, _lib._sel_getValue_size_1, value, size); + } - void main() { - return _lib._objc_msgSend_1(_id, _lib._sel_main1); + ffi.Pointer get objCType { + return _lib._objc_msgSend_53(_id, _lib._sel_objCType1); } - bool get cancelled { - return _lib._objc_msgSend_11(_id, _lib._sel_isCancelled1); + 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 cancel() { - return _lib._objc_msgSend_1(_id, _lib._sel_cancel1); + 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); } - bool get executing { - return _lib._objc_msgSend_11(_id, _lib._sel_isExecuting1); + 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); } - bool get finished { - return _lib._objc_msgSend_11(_id, _lib._sel_isFinished1); + 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); } - /// To be deprecated; use and override 'asynchronous' below - bool get concurrent { - return _lib._objc_msgSend_11(_id, _lib._sel_isConcurrent1); + 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); } - bool get asynchronous { - return _lib._objc_msgSend_11(_id, _lib._sel_isAsynchronous1); + NSObject get nonretainedObjectValue { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_nonretainedObjectValue1); + return NSObject._(_ret, _lib, retain: true, release: true); } - bool get ready { - return _lib._objc_msgSend_11(_id, _lib._sel_isReady1); + 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); } - void addDependency_(NSOperation? op) { - return _lib._objc_msgSend_334( - _id, _lib._sel_addDependency_1, op?._id ?? ffi.nullptr); + ffi.Pointer get pointerValue { + return _lib._objc_msgSend_31(_id, _lib._sel_pointerValue1); } - void removeDependency_(NSOperation? op) { - return _lib._objc_msgSend_334( - _id, _lib._sel_removeDependency_1, op?._id ?? ffi.nullptr); + bool isEqualToValue_(NSValue? value) { + return _lib._objc_msgSend_58( + _id, _lib._sel_isEqualToValue_1, value?._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); + void getValue_(ffi.Pointer value) { + return _lib._objc_msgSend_59(_id, _lib._sel_getValue_1, value); } - int get queuePriority { - return _lib._objc_msgSend_335(_id, _lib._sel_queuePriority1); + 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 queuePriority(int value) { - _lib._objc_msgSend_336(_id, _lib._sel_setQueuePriority_1, value); + NSRange get rangeValue { + return _lib._objc_msgSend_61(_id, _lib._sel_rangeValue1); } - ObjCBlock16 get completionBlock { - final _ret = _lib._objc_msgSend_329(_id, _lib._sel_completionBlock1); - return ObjCBlock16._(_ret, _lib); + 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); } - set completionBlock(ObjCBlock16 value) { - _lib._objc_msgSend_330(_id, _lib._sel_setCompletionBlock_1, value._id); + 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); } +} - void waitUntilFinished() { - return _lib._objc_msgSend_1(_id, _lib._sel_waitUntilFinished1); +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); } - double get threadPriority { - return _lib._objc_msgSend_85(_id, _lib._sel_threadPriority1); + /// 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); } - set threadPriority(double value) { - _lib._objc_msgSend_337(_id, _lib._sel_setThreadPriority_1, value); + /// 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); } - int get qualityOfService { - return _lib._objc_msgSend_338(_id, _lib._sel_qualityOfService1); + /// 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 qualityOfService(int value) { - _lib._objc_msgSend_339(_id, _lib._sel_setQualityOfService_1, 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); } - NSString? get name { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_name1); + /// 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 - : NSString._(_ret, _lib, retain: true, release: true); + : NSDictionary._(_ret, _lib, retain: true, release: true); } - set name(NSString? value) { - _lib._objc_msgSend_327(_id, _lib._sel_setName_1, value?._id ?? ffi.nullptr); + /// 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 NSOperation new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSOperation1, _lib._sel_new1); - return NSOperation._(_ret, _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); } - static NSOperation alloc(NativeCupertinoHttp _lib) { + /// 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_2(_lib._class_NSOperation1, _lib._sel_alloc1); - return NSOperation._(_ret, _lib, retain: false, release: true); + _lib._objc_msgSend_32(_id, _lib._sel_localizedRecoverySuggestion1); + return _ret.address == 0 + ? null + : NSString._(_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; -} + /// 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); + } -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); -} + /// 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); + } -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); -} + /// 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); + } -void _ObjCBlock18_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { - return _ObjCBlock18_closureRegistry[block.ref.target.address]!(arg0); -} + /// 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); + } -class ObjCBlock18 extends _ObjCBlockBase { - ObjCBlock18._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, 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); + } - /// 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; + 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 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 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<_ObjCBlock> get pointer => _id; + 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); + } } -class NSDate extends NSObject { - NSDate._(ffi.Pointer id, NativeCupertinoHttp lib, +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 [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 [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 [NSDate] that wraps the given raw object pointer. - static NSDate castFromPointer( + /// 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 NSDate._(other, lib, retain: retain, release: release); + return NSDictionary._(other, lib, retain: retain, release: release); } - /// Returns whether [obj] is an instance of [NSDate]. + /// 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_NSDate1); - } - - double get timeIntervalSinceReferenceDate { - return _lib._objc_msgSend_85( - _id, _lib._sel_timeIntervalSinceReferenceDate1); + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSDictionary1); } - @override - NSDate init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSDate._(_ret, _lib, retain: true, release: true); + int get count { + return _lib._objc_msgSend_12(_id, _lib._sel_count1); } - NSDate initWithTimeIntervalSinceReferenceDate_(double ti) { - final _ret = _lib._objc_msgSend_347( - _id, _lib._sel_initWithTimeIntervalSinceReferenceDate_1, ti); - return NSDate._(_ret, _lib, retain: true, release: true); + 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); } - 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); + NSEnumerator keyEnumerator() { + final _ret = _lib._objc_msgSend_92(_id, _lib._sel_keyEnumerator1); + return NSEnumerator._(_ret, _lib, retain: true, release: true); } - double timeIntervalSinceDate_(NSDate? anotherDate) { - return _lib._objc_msgSend_348(_id, _lib._sel_timeIntervalSinceDate_1, - anotherDate?._id ?? ffi.nullptr); + @override + NSDictionary init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSDictionary._(_ret, _lib, retain: true, release: true); } - double get timeIntervalSinceNow { - return _lib._objc_msgSend_85(_id, _lib._sel_timeIntervalSinceNow1); + 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); } - double get timeIntervalSince1970 { - return _lib._objc_msgSend_85(_id, _lib._sel_timeIntervalSince19701); + 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 addTimeInterval_(double seconds) { - final _ret = - _lib._objc_msgSend_347(_id, _lib._sel_addTimeInterval_1, seconds); - 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); } - NSDate dateByAddingTimeInterval_(double ti) { + NSArray allKeysForObject_(NSObject anObject) { 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); + _lib._objc_msgSend_96(_id, _lib._sel_allKeysForObject_1, anObject._id); + return NSArray._(_ret, _lib, retain: true, release: true); } - bool isEqualToDate_(NSDate? otherDate) { - return _lib._objc_msgSend_351( - _id, _lib._sel_isEqualToDate_1, otherDate?._id ?? ffi.nullptr); + 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 { @@ -67453,8486 +64731,10480 @@ class NSDate extends NSObject { : 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); } - 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); + 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 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); + bool isEqualToDictionary_(NSDictionary? otherDictionary) { + return _lib._objc_msgSend_163(_id, _lib._sel_isEqualToDictionary_1, + otherDictionary?._id ?? ffi.nullptr); } - 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); + NSEnumerator objectEnumerator() { + final _ret = _lib._objc_msgSend_92(_id, _lib._sel_objectEnumerator1); + return NSEnumerator._(_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); + 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 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); + /// 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 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); + 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 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); + /// 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); } - NSDate initWithTimeIntervalSinceNow_(double secs) { - final _ret = _lib._objc_msgSend_347( - _id, _lib._sel_initWithTimeIntervalSinceNow_1, secs); - return NSDate._(_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); } - 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 enumerateKeysAndObjectsUsingBlock_(ObjCBlock10 block) { + return _lib._objc_msgSend_166( + _id, _lib._sel_enumerateKeysAndObjectsUsingBlock_1, block._id); } - NSDate initWithTimeInterval_sinceDate_(double secsToBeAdded, NSDate? date) { - final _ret = _lib._objc_msgSend_352( + void enumerateKeysAndObjectsWithOptions_usingBlock_( + int opts, ObjCBlock10 block) { + return _lib._objc_msgSend_167( _id, - _lib._sel_initWithTimeInterval_sinceDate_1, - secsToBeAdded, - date?._id ?? ffi.nullptr); - return NSDate._(_ret, _lib, retain: true, release: true); + _lib._sel_enumerateKeysAndObjectsWithOptions_usingBlock_1, + opts, + block._id); } - 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); + NSArray keysSortedByValueUsingComparator_(NSComparator cmptr) { + final _ret = _lib._objc_msgSend_141( + _id, _lib._sel_keysSortedByValueUsingComparator_1, cmptr); + return NSArray._(_ret, _lib, retain: true, 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); + 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); } -} -typedef NSTimeInterval = ffi.Double; + 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); + } -/// ! -/// @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; -} + 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); + } -/// ! -/// @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; + /// 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); + } - /// Voice over IP control traffic - static const int NSURLNetworkServiceTypeVoIP = 1; + /// 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); + } - /// Video traffic - static const int NSURLNetworkServiceTypeVideo = 2; + 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); + } - /// Background traffic - static const int NSURLNetworkServiceTypeBackground = 3; + 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); + } - /// Voice data - static const int NSURLNetworkServiceTypeVoice = 4; + 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); + } - /// Responsive data - static const int NSURLNetworkServiceTypeResponsiveData = 6; + bool writeToFile_atomically_(NSString? path, bool useAuxiliaryFile) { + return _lib._objc_msgSend_37(_id, _lib._sel_writeToFile_atomically_1, + path?._id ?? ffi.nullptr, useAuxiliaryFile); + } - /// Multimedia Audio/Video Streaming - static const int NSURLNetworkServiceTypeAVStreaming = 8; + /// 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); + } - /// Responsive Multimedia Audio/Video - static const int NSURLNetworkServiceTypeResponsiveAV = 9; + 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); + } - /// Call Signaling - static const int NSURLNetworkServiceTypeCallSignaling = 11; -} + 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); + } -/// ! -/// @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); + 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); + } - /// 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); + 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); } - /// 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); + 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); } - /// 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); + 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); } - /// ! - /// @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); + 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); } - /// ! - /// @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); + 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); } - /// ! - /// @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); + 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); } - /// ! - /// @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); + 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); } - /// ! - /// @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( + /// 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_initWithURL_cachePolicy_timeoutInterval_1, - URL?._id ?? ffi.nullptr, - cachePolicy, - timeoutInterval); - return NSURLRequest._(_ret, _lib, retain: true, release: true); + _lib._sel_initWithContentsOfURL_error_1, + url?._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); + /// 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); } - /// ! - /// @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); + /// 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); } - /// ! - /// @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); + 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); } - /// ! - /// @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 NSDictionary new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSDictionary1, _lib._sel_new1); + return NSDictionary._(_ret, _lib, retain: false, 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 NSDictionary alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSDictionary1, _lib._sel_alloc1); + return NSDictionary._(_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 - /// satify the request, NO otherwise. - bool get allowsCellularAccess { - return _lib._objc_msgSend_11(_id, _lib._sel_allowsCellularAccess1); +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); } - /// ! - /// @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); + /// 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); } - /// ! - /// @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); + /// 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); } - /// ! - /// @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); + NSObject nextObject() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_nextObject1); + return NSObject._(_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); + NSObject? get allObjects { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_allObjects1); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); + : NSObject._(_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 NSEnumerator new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSEnumerator1, _lib._sel_new1); + return NSEnumerator._(_ret, _lib, 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. - 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 NSEnumerator alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSEnumerator1, _lib._sel_alloc1); + return NSEnumerator._(_ret, _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); - } - - /// ! - /// @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, +/// 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 [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 [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 [NSInputStream] that wraps the given raw object pointer. - static NSInputStream 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 NSInputStream._(other, lib, retain: retain, release: release); + return NSArray._(other, lib, retain: retain, release: release); } - /// Returns whether [obj] is an instance of [NSInputStream]. + /// 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_NSInputStream1); + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSArray1); } -} - -/// ! -/// @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); + int get count { + return _lib._objc_msgSend_12(_id, _lib._sel_count1); } - /// 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); + NSObject objectAtIndex_(int index) { + final _ret = _lib._objc_msgSend_94(_id, _lib._sel_objectAtIndex_1, index); + return NSObject._(_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); + @override + NSArray init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSArray._(_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); + 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); } - /// ! - /// @abstract The URL of the receiver. - set URL(NSURL? value) { - _lib._objc_msgSend_332(_id, _lib._sel_setURL_1, value?._id ?? ffi.nullptr); + 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); } - /// ! - /// @abstract The cache policy of the receiver. - @override - int get cachePolicy { - return _lib._objc_msgSend_355(_id, _lib._sel_cachePolicy1); + 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 The cache policy of the receiver. - set cachePolicy(int value) { - _lib._objc_msgSend_358(_id, _lib._sel_setCachePolicy_1, value); + 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); } - /// ! - /// @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); + 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); } - /// ! - /// @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); + bool containsObject_(NSObject anObject) { + return _lib._objc_msgSend_0(_id, _lib._sel_containsObject_1, anObject._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 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); + NSString? get description { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_description1); return _ret.address == 0 ? null - : NSURL._(_ret, _lib, retain: true, release: true); + : NSString._(_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); + 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 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); + 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); } - /// ! - /// @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); + 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); } - /// ! - /// @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); + void getObjects_range_( + ffi.Pointer> objects, NSRange range) { + return _lib._objc_msgSend_101( + _id, _lib._sel_getObjects_range_1, objects, range); } - /// ! - /// @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 indexOfObject_(NSObject anObject) { + return _lib._objc_msgSend_102(_id, _lib._sel_indexOfObject_1, anObject._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 - /// satify the request, YES otherwise. - @override - bool get allowsExpensiveNetworkAccess { - return _lib._objc_msgSend_11(_id, _lib._sel_allowsExpensiveNetworkAccess1); + int indexOfObject_inRange_(NSObject anObject, NSRange range) { + return _lib._objc_msgSend_103( + _id, _lib._sel_indexOfObject_inRange_1, anObject._id, range); } - /// ! - /// @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 indexOfObjectIdenticalTo_(NSObject anObject) { + return _lib._objc_msgSend_102( + _id, _lib._sel_indexOfObjectIdenticalTo_1, anObject._id); } - /// ! - /// @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); + int indexOfObjectIdenticalTo_inRange_(NSObject anObject, NSRange range) { + return _lib._objc_msgSend_103( + _id, _lib._sel_indexOfObjectIdenticalTo_inRange_1, anObject._id, range); } - /// ! - /// @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); + bool isEqualToArray_(NSArray? otherArray) { + return _lib._objc_msgSend_104( + _id, _lib._sel_isEqualToArray_1, otherArray?._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. - @override - bool get assumesHTTP3Capable { - return _lib._objc_msgSend_11(_id, _lib._sel_assumesHTTP3Capable1); + NSObject get firstObject { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_firstObject1); + return NSObject._(_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); + NSObject get lastObject { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_lastObject1); + return NSObject._(_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); + NSEnumerator objectEnumerator() { + final _ret = _lib._objc_msgSend_92(_id, _lib._sel_objectEnumerator1); + return NSEnumerator._(_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); + NSEnumerator reverseObjectEnumerator() { + final _ret = _lib._objc_msgSend_92(_id, _lib._sel_reverseObjectEnumerator1); + return NSEnumerator._(_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); + NSData? get sortedArrayHint { + final _ret = _lib._objc_msgSend_51(_id, _lib._sel_sortedArrayHint1); 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); + : NSData._(_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); + 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); } - /// ! - /// @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); + 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); } - /// ! - /// @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); + 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); } - /// ! - /// @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); + NSArray subarrayWithRange_(NSRange range) { + final _ret = + _lib._objc_msgSend_108(_id, _lib._sel_subarrayWithRange_1, range); + return NSArray._(_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); + /// 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); } - /// ! - /// @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); + void makeObjectsPerformSelector_(ffi.Pointer aSelector) { + return _lib._objc_msgSend_7( + _id, _lib._sel_makeObjectsPerformSelector_1, aSelector); } - /// ! - /// @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); + void makeObjectsPerformSelector_withObject_( + ffi.Pointer aSelector, NSObject argument) { + return _lib._objc_msgSend_110( + _id, + _lib._sel_makeObjectsPerformSelector_withObject_1, + aSelector, + argument._id); } - /// ! - /// @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); + 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); } - /// ! - /// @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); + NSObject objectAtIndexedSubscript_(int idx) { + final _ret = + _lib._objc_msgSend_94(_id, _lib._sel_objectAtIndexedSubscript_1, idx); + return NSObject._(_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); + void enumerateObjectsUsingBlock_(ObjCBlock5 block) { + return _lib._objc_msgSend_132( + _id, _lib._sel_enumerateObjectsUsingBlock_1, block._id); } - /// ! - /// @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); + void enumerateObjectsWithOptions_usingBlock_(int opts, ObjCBlock5 block) { + return _lib._objc_msgSend_133(_id, + _lib._sel_enumerateObjectsWithOptions_usingBlock_1, opts, block._id); } - /// ! - /// @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); + 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); } - /// ! - /// @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); + int indexOfObjectPassingTest_(ObjCBlock6 predicate) { + return _lib._objc_msgSend_135( + _id, _lib._sel_indexOfObjectPassingTest_1, predicate._id); } - 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); + int indexOfObjectWithOptions_passingTest_(int opts, ObjCBlock6 predicate) { + return _lib._objc_msgSend_136(_id, + _lib._sel_indexOfObjectWithOptions_passingTest_1, opts, predicate._id); } - 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); + 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); } -} -abstract class NSURLRequestAttribution { - static const int NSURLRequestAttributionDeveloper = 0; - static const int NSURLRequestAttributionUser = 1; -} + 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); + } -abstract class NSHTTPCookieAcceptPolicy { - static const int NSHTTPCookieAcceptPolicyAlways = 0; - static const int NSHTTPCookieAcceptPolicyNever = 1; - static const int NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain = 2; -} + 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 NSHTTPCookieStorage extends NSObject { - NSHTTPCookieStorage._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + 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); + } - /// 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); + NSArray sortedArrayUsingComparator_(NSComparator cmptr) { + final _ret = _lib._objc_msgSend_141( + _id, _lib._sel_sortedArrayUsingComparator_1, cmptr); + return NSArray._(_ret, _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); + 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); } - /// 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); + /// 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 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 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 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); + 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); } - 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); + 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 setCookie_(NSHTTPCookie? cookie) { - return _lib._objc_msgSend_366( - _id, _lib._sel_setCookie_1, cookie?._id ?? ffi.nullptr); + 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); } - void deleteCookie_(NSHTTPCookie? cookie) { - return _lib._objc_msgSend_366( - _id, _lib._sel_deleteCookie_1, cookie?._id ?? ffi.nullptr); + 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); } - void removeCookiesSinceDate_(NSDate? date) { - return _lib._objc_msgSend_367( - _id, _lib._sel_removeCookiesSinceDate_1, date?._id ?? ffi.nullptr); + 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 cookiesForURL_(NSURL? URL) { - final _ret = _lib._objc_msgSend_160( - _id, _lib._sel_cookiesForURL_1, URL?._id ?? ffi.nullptr); + 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 setCookies_forURL_mainDocumentURL_( - NSArray? cookies, NSURL? URL, NSURL? mainDocumentURL) { - return _lib._objc_msgSend_368( + 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_setCookies_forURL_mainDocumentURL_1, - cookies?._id ?? ffi.nullptr, - URL?._id ?? ffi.nullptr, - mainDocumentURL?._id ?? ffi.nullptr); + _lib._sel_initWithContentsOfURL_error_1, + url?._id ?? ffi.nullptr, + error); + return NSArray._(_ret, _lib, retain: true, release: true); } - int get cookieAcceptPolicy { - return _lib._objc_msgSend_369(_id, _lib._sel_cookieAcceptPolicy1); + /// 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); } - set cookieAcceptPolicy(int value) { - _lib._objc_msgSend_370(_id, _lib._sel_setCookieAcceptPolicy_1, value); + 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); } - NSArray sortedCookiesUsingDescriptors_(NSArray? sortOrder) { - final _ret = _lib._objc_msgSend_97( + NSOrderedCollectionDifference differenceFromArray_withOptions_( + NSArray? other, int options) { + final _ret = _lib._objc_msgSend_155( _id, - _lib._sel_sortedCookiesUsingDescriptors_1, - sortOrder?._id ?? ffi.nullptr); + _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); } - 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); + /// 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); } - void getCookiesForTask_completionHandler_( - NSURLSessionTask? task, ObjCBlock19 completionHandler) { - return _lib._objc_msgSend_379( - _id, - _lib._sel_getCookiesForTask_completionHandler_1, - task?._id ?? ffi.nullptr, - completionHandler._id); + /// 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 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 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 NSHTTPCookieStorage alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSHTTPCookieStorage1, _lib._sel_alloc1); - return NSHTTPCookieStorage._(_ret, _lib, retain: false, 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); } -} -class NSHTTPCookie extends _ObjCWrapper { - NSHTTPCookie._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + 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); + } - /// 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); + 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 [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); + bool writeToURL_atomically_(NSURL? url, bool atomically) { + return _lib._objc_msgSend_161(_id, _lib._sel_writeToURL_atomically_1, + url?._id ?? ffi.nullptr, atomically); } - /// 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); + 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); } } -/// NSURLSessionTask - a cancelable object that refers to the lifetime -/// of processing a given request. -class NSURLSessionTask extends NSObject { - NSURLSessionTask._(ffi.Pointer id, NativeCupertinoHttp lib, +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 [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 [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 [NSURLSessionTask] that wraps the given raw object pointer. - static NSURLSessionTask castFromPointer( + /// 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 NSURLSessionTask._(other, lib, retain: retain, release: release); + return NSIndexSet._(other, lib, retain: retain, release: release); } - /// Returns whether [obj] is an instance of [NSURLSessionTask]. + /// 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_NSURLSessionTask1); + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSIndexSet1); } - /// 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); + 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); } - /// 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); + 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); } - /// 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); + 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); } - /// 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); + NSIndexSet initWithIndexesInRange_(NSRange range) { + final _ret = + _lib._objc_msgSend_111(_id, _lib._sel_initWithIndexesInRange_1, range); + return NSIndexSet._(_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); + 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); } - /// 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); + NSIndexSet initWithIndex_(int value) { + final _ret = _lib._objc_msgSend_94(_id, _lib._sel_initWithIndex_1, value); + return NSIndexSet._(_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); + bool isEqualToIndexSet_(NSIndexSet? indexSet) { + return _lib._objc_msgSend_113( + _id, _lib._sel_isEqualToIndexSet_1, indexSet?._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); + int get count { + return _lib._objc_msgSend_12(_id, _lib._sel_count1); } - /// 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 firstIndex { + return _lib._objc_msgSend_12(_id, _lib._sel_firstIndex1); } - int get countOfBytesClientExpectsToReceive { - return _lib._objc_msgSend_325( - _id, _lib._sel_countOfBytesClientExpectsToReceive1); + int get lastIndex { + return _lib._objc_msgSend_12(_id, _lib._sel_lastIndex1); } - set countOfBytesClientExpectsToReceive(int value) { - _lib._objc_msgSend_326( - _id, _lib._sel_setCountOfBytesClientExpectsToReceive_1, value); + int indexGreaterThanIndex_(int value) { + return _lib._objc_msgSend_114( + _id, _lib._sel_indexGreaterThanIndex_1, value); } - /// number of body bytes already received - int get countOfBytesReceived { - return _lib._objc_msgSend_325(_id, _lib._sel_countOfBytesReceived1); + int indexLessThanIndex_(int value) { + return _lib._objc_msgSend_114(_id, _lib._sel_indexLessThanIndex_1, value); } - /// number of body bytes already sent - int get countOfBytesSent { - return _lib._objc_msgSend_325(_id, _lib._sel_countOfBytesSent1); + int indexGreaterThanOrEqualToIndex_(int value) { + return _lib._objc_msgSend_114( + _id, _lib._sel_indexGreaterThanOrEqualToIndex_1, value); } - /// 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 indexLessThanOrEqualToIndex_(int value) { + return _lib._objc_msgSend_114( + _id, _lib._sel_indexLessThanOrEqualToIndex_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 _lib._objc_msgSend_325( - _id, _lib._sel_countOfBytesExpectedToReceive1); + 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); } - /// 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); + int countOfIndexesInRange_(NSRange range) { + return _lib._objc_msgSend_116( + _id, _lib._sel_countOfIndexesInRange_1, range); } - /// 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); + bool containsIndex_(int value) { + return _lib._objc_msgSend_117(_id, _lib._sel_containsIndex_1, value); } - void resume() { - return _lib._objc_msgSend_1(_id, _lib._sel_resume1); + bool containsIndexesInRange_(NSRange range) { + return _lib._objc_msgSend_118( + _id, _lib._sel_containsIndexesInRange_1, range); } - /// 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 containsIndexes_(NSIndexSet? indexSet) { + return _lib._objc_msgSend_113( + _id, _lib._sel_containsIndexes_1, indexSet?._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); + bool intersectsIndexesInRange_(NSRange range) { + return _lib._objc_msgSend_118( + _id, _lib._sel_intersectsIndexesInRange_1, range); } - /// 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); + void enumerateIndexesUsingBlock_(ObjCBlock2 block) { + return _lib._objc_msgSend_119( + _id, _lib._sel_enumerateIndexesUsingBlock_1, block._id); } - /// 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); + void enumerateIndexesWithOptions_usingBlock_(int opts, ObjCBlock2 block) { + return _lib._objc_msgSend_120(_id, + _lib._sel_enumerateIndexesWithOptions_usingBlock_1, opts, block._id); } - @override - NSURLSessionTask init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSessionTask._(_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 NSURLSessionTask new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLSessionTask1, _lib._sel_new1); - return NSURLSessionTask._(_ret, _lib, retain: false, release: true); + int indexPassingTest_(ObjCBlock3 predicate) { + return _lib._objc_msgSend_122( + _id, _lib._sel_indexPassingTest_1, predicate._id); } - 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); + int indexWithOptions_passingTest_(int opts, ObjCBlock3 predicate) { + return _lib._objc_msgSend_123( + _id, _lib._sel_indexWithOptions_passingTest_1, opts, predicate._id); } -} - -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); + 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 [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); + 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 [NSURLResponse]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURLResponse1); + 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); } - /// ! - /// @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( + NSIndexSet indexesInRange_options_passingTest_( + NSRange range, int opts, ObjCBlock3 predicate) { + final _ret = _lib._objc_msgSend_127( _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); + _lib._sel_indexesInRange_options_passingTest_1, + range, + opts, + predicate._id); + return NSIndexSet._(_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); + void enumerateRangesUsingBlock_(ObjCBlock4 block) { + return _lib._objc_msgSend_128( + _id, _lib._sel_enumerateRangesUsingBlock_1, block._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); + void enumerateRangesWithOptions_usingBlock_(int opts, ObjCBlock4 block) { + return _lib._objc_msgSend_129(_id, + _lib._sel_enumerateRangesWithOptions_usingBlock_1, opts, block._id); } - /// ! - /// @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); + 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 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 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 NSURLResponse alloc(NativeCupertinoHttp _lib) { + static NSIndexSet alloc(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_NSIndexSet1, _lib._sel_alloc1); + return NSIndexSet._(_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) { +typedef NSRangePointer = ffi.Pointer; +void _ObjCBlock2_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, int arg0, ffi.Pointer arg1) { return block.ref.target .cast< - ffi.NativeFunction arg0)>>() - .asFunction arg0)>()(arg0); + ffi.NativeFunction< + ffi.Void Function(NSUInteger arg0, ffi.Pointer arg1)>>() + .asFunction< + void Function(int arg0, ffi.Pointer arg1)>()(arg0, arg1); } -final _ObjCBlock19_closureRegistry = {}; -int _ObjCBlock19_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock19_registerClosure(Function fn) { - final id = ++_ObjCBlock19_closureRegistryIndex; - _ObjCBlock19_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 _ObjCBlock19_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { - return _ObjCBlock19_closureRegistry[block.ref.target.address]!(arg0); +void _ObjCBlock2_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, int arg0, ffi.Pointer arg1) { + return _ObjCBlock2_closureRegistry[block.ref.target.address]!(arg0, arg1); } -class ObjCBlock19 extends _ObjCBlockBase { - ObjCBlock19._(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. - ObjCBlock19.fromFunctionPointer( + ObjCBlock2.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0)>> + ffi.Void Function( + NSUInteger arg0, ffi.Pointer arg1)>> ptr) : this._( lib._newBlock1( _cFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>( - _ObjCBlock19_fnPtrTrampoline) + NSUInteger arg0, ffi.Pointer arg1)>( + _ObjCBlock2_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) + 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, - ffi.Pointer arg0)>( - _ObjCBlock19_closureTrampoline) + NSUInteger arg0, ffi.Pointer arg1)>( + _ObjCBlock2_closureTrampoline) .cast(), - _ObjCBlock19_registerClosure(fn)), + _ObjCBlock2_registerClosure(fn)), lib); static ffi.Pointer? _dartFuncTrampoline; - void call(ffi.Pointer arg0) { + void call(int arg0, ffi.Pointer arg1) { return _id.ref.invoke .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>>() + NSUInteger arg0, ffi.Pointer arg1)>>() .asFunction< - void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>()(_id, arg0); + void Function(ffi.Pointer<_ObjCBlock> block, int 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; - - external CFArrayCopyDescriptionCallBack copyDescription; - - external CFArrayEqualCallBack equal; +abstract class NSEnumerationOptions { + static const int NSEnumerationConcurrent = 1; + static const int NSEnumerationReverse = 2; } -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); - } +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); +} - /// 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); - } +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); +} - /// 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); - } +bool _ObjCBlock3_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, int arg0, ffi.Pointer arg1) { + return _ObjCBlock3_closureRegistry[block.ref.target.address]!(arg0, arg1); +} - @override - OS_object init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return OS_object._(_ret, _lib, retain: true, release: true); - } +class ObjCBlock3 extends _ObjCBlockBase { + ObjCBlock3._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, 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); - } + /// 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; - 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); + /// 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); } } -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; +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); } -typedef SecKeychainAttrType = OSType; -typedef OSType = FourCharCode; -typedef FourCharCode = UInt32; - -class SecKeychainAttributeList extends ffi.Struct { - @UInt32() - external int count; - - external ffi.Pointer attr; +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); } -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; +void _ObjCBlock4_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, NSRange arg0, ffi.Pointer arg1) { + return _ObjCBlock4_closureRegistry[block.ref.target.address]!(arg0, arg1); } -typedef OSStatus = SInt32; - -class _RuneEntry extends ffi.Struct { - @__darwin_rune_t() - external int __min; - - @__darwin_rune_t() - external int __max; +class ObjCBlock4 extends _ObjCBlockBase { + ObjCBlock4._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - @__darwin_rune_t() - external int __map; + /// 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; - external ffi.Pointer<__uint32_t> __types; + /// 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); + } } -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; +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); } -class _RuneCharClass extends ffi.Struct { - @ffi.Array.multi([14]) - external ffi.Array __name; - - @__uint32_t() - external int __mask; +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); } -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; +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); +} - external _RuneRange __maplower_ext; +class ObjCBlock5 extends _ObjCBlockBase { + ObjCBlock5._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - external _RuneRange __mapupper_ext; + /// 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; - external ffi.Pointer __variable; + /// 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 __variable_len; +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); +} - @ffi.Int() - external int __ncharclasses; +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); +} - external ffi.Pointer<_RuneCharClass> __charclasses; +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); } -typedef __darwin_size_t = ffi.UnsignedLong; -typedef __darwin_ct_rune_t = ffi.Int; +class ObjCBlock6 extends _ObjCBlockBase { + ObjCBlock6._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); -class lconv extends ffi.Struct { - external ffi.Pointer decimal_point; + /// 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; - external ffi.Pointer thousands_sep; + /// 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); + } +} - external ffi.Pointer grouping; +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); +} - external ffi.Pointer int_curr_symbol; +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); +} - external ffi.Pointer currency_symbol; +int _ObjCBlock7_closureTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1) { + return _ObjCBlock7_closureRegistry[block.ref.target.address]!(arg0, arg1); +} - external ffi.Pointer mon_decimal_point; +class ObjCBlock7 extends _ObjCBlockBase { + ObjCBlock7._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - external ffi.Pointer mon_thousands_sep; + /// 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; - external ffi.Pointer mon_grouping; + /// 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); + } +} - external ffi.Pointer positive_sign; +abstract class NSSortOptions { + static const int NSSortConcurrent = 1; + static const int NSSortStable = 16; +} - external ffi.Pointer negative_sign; +abstract class NSBinarySearchingOptions { + static const int NSBinarySearchingFirstEqual = 256; + static const int NSBinarySearchingLastEqual = 512; + static const int NSBinarySearchingInsertionIndex = 1024; +} - @ffi.Char() - external int int_frac_digits; +class NSOrderedCollectionDifference extends NSObject { + NSOrderedCollectionDifference._( + ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); - @ffi.Char() - external int frac_digits; + /// 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.Char() - external int p_cs_precedes; + /// 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.Char() - external int p_sep_by_space; + /// 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.Char() - external int n_cs_precedes; + 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.Char() - external int n_sep_by_space; + 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.Char() - external int p_sign_posn; + 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.Char() - external int n_sign_posn; + 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.Char() - external int int_p_cs_precedes; + 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.Char() - external int int_n_cs_precedes; + bool get hasChanges { + return _lib._objc_msgSend_11(_id, _lib._sel_hasChanges1); + } - @ffi.Char() - external int int_p_sep_by_space; + 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); + } - @ffi.Char() - external int int_n_sep_by_space; + NSOrderedCollectionDifference inverseDifference() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_inverseDifference1); + return NSOrderedCollectionDifference._(_ret, _lib, + retain: true, release: true); + } - @ffi.Char() - external int int_p_sign_posn; + 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.Char() - external int int_n_sign_posn; + 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); + } } -class __float2 extends ffi.Struct { - @ffi.Float() - external double __sinval; - - @ffi.Float() - external double __cosval; +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); } -class __double2 extends ffi.Struct { - @ffi.Double() - external double __sinval; - - @ffi.Double() - external double __cosval; +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); } -class exception extends ffi.Struct { - @ffi.Int() - external int type; - - external ffi.Pointer name; +ffi.Pointer _ObjCBlock8_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { + return _ObjCBlock8_closureRegistry[block.ref.target.address]!(arg0); +} - @ffi.Double() - external double arg1; +class ObjCBlock8 extends _ObjCBlockBase { + ObjCBlock8._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - @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; + /// 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; - @__uint32_t() - external int __far; + /// 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); + } } -class __darwin_arm_exception_state64 extends ffi.Struct { - @__uint64_t() - external int __far; - - @__uint32_t() - external int __esr; +class NSOrderedCollectionChange extends NSObject { + NSOrderedCollectionChange._( + ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); - @__uint32_t() - external int __exception; -} + /// 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); + } -typedef __uint64_t = ffi.UnsignedLongLong; + /// 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); + } -class __darwin_arm_thread_state extends ffi.Struct { - @ffi.Array.multi([13]) - external ffi.Array<__uint32_t> __r; + /// 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); + } - @__uint32_t() - external int __sp; + 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); + } - @__uint32_t() - external int __lr; + 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); + } - @__uint32_t() - external int __pc; + NSObject get object { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_object1); + return NSObject._(_ret, _lib, retain: true, release: true); + } - @__uint32_t() - external int __cpsr; -} + int get changeType { + return _lib._objc_msgSend_150(_id, _lib._sel_changeType1); + } -class __darwin_arm_thread_state64 extends ffi.Struct { - @ffi.Array.multi([29]) - external ffi.Array<__uint64_t> __x; + int get index { + return _lib._objc_msgSend_12(_id, _lib._sel_index1); + } - @__uint64_t() - external int __fp; + int get associatedIndex { + return _lib._objc_msgSend_12(_id, _lib._sel_associatedIndex1); + } - @__uint64_t() - external int __lr; + @override + NSObject init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSObject._(_ret, _lib, retain: true, release: true); + } - @__uint64_t() - external int __sp; + 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); + } - @__uint64_t() - external int __pc; + 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); + } - @__uint32_t() - external int __cpsr; + 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); + } - @__uint32_t() - external int __pad; + 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); + } } -class __darwin_arm_vfp_state extends ffi.Struct { - @ffi.Array.multi([64]) - external ffi.Array<__uint32_t> __r; - - @__uint32_t() - external int __fpscr; +abstract class NSCollectionChangeType { + static const int NSCollectionChangeInsert = 0; + static const int NSCollectionChangeRemove = 1; } -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; +abstract class NSOrderedCollectionDifferenceCalculationOptions { + static const int NSOrderedCollectionDifferenceCalculationOmitInsertedObjects = + 1; + static const int NSOrderedCollectionDifferenceCalculationOmitRemovedObjects = + 2; + static const int NSOrderedCollectionDifferenceCalculationInferMoves = 4; } -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; +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.Array.multi([16]) - external ffi.Array<__uint32_t> __wcr; +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 __darwin_arm_debug_state32 extends ffi.Struct { - @ffi.Array.multi([16]) - external ffi.Array<__uint32_t> __bvr; +bool _ObjCBlock9_closureTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1) { + return _ObjCBlock9_closureRegistry[block.ref.target.address]!(arg0, arg1); +} - @ffi.Array.multi([16]) - external ffi.Array<__uint32_t> __bcr; +class ObjCBlock9 extends _ObjCBlockBase { + ObjCBlock9._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - @ffi.Array.multi([16]) - external ffi.Array<__uint32_t> __wvr; + /// 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([16]) - external ffi.Array<__uint32_t> __wcr; + /// 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); + } +} - @__uint64_t() - external int __mdscr_el1; +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); } -class __darwin_arm_debug_state64 extends ffi.Struct { - @ffi.Array.multi([16]) - external ffi.Array<__uint64_t> __bvr; +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.Array.multi([16]) - external ffi.Array<__uint64_t> __bcr; +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.Array.multi([16]) - external ffi.Array<__uint64_t> __wvr; +class ObjCBlock10 extends _ObjCBlockBase { + ObjCBlock10._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - @ffi.Array.multi([16]) - external ffi.Array<__uint64_t> __wcr; + /// 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; - @__uint64_t() - external int __mdscr_el1; + /// 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 __darwin_arm_cpmu_state64 extends ffi.Struct { - @ffi.Array.multi([16]) - external ffi.Array<__uint64_t> __ctrs; +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); } -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 _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 __darwin_mcontext64 extends ffi.Opaque {} +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 __darwin_sigaltstack extends ffi.Struct { - external ffi.Pointer ss_sp; +class ObjCBlock11 extends _ObjCBlockBase { + ObjCBlock11._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - @__darwin_size_t() - external int ss_size; + /// Creates a block from a C function pointer. + ObjCBlock11.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)>( + _ObjCBlock11_fnPtrTrampoline, false) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - @ffi.Int() - external int ss_flags; + /// 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); + } } -class __darwin_ucontext extends ffi.Struct { - @ffi.Int() - external int uc_onstack; - - @__darwin_sigset_t() - external int uc_sigmask; +final class NSFastEnumerationState extends ffi.Struct { + @ffi.UnsignedLong() + external int state; - external __darwin_sigaltstack uc_stack; + external ffi.Pointer> itemsPtr; - external ffi.Pointer<__darwin_ucontext> uc_link; + external ffi.Pointer mutationsPtr; - @__darwin_size_t() - external int uc_mcsize; + @ffi.Array.multi([5]) + external ffi.Array extra; +} - external ffi.Pointer<__darwin_mcontext64> uc_mcontext; +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); } -typedef __darwin_sigset_t = __uint32_t; - -class sigval extends ffi.Union { - @ffi.Int() - external int sival_int; - - external ffi.Pointer sival_ptr; +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 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; +ffi.Pointer _ObjCBlock12_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSErrorUserInfoKey arg1) { + return _ObjCBlock12_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; +class ObjCBlock12 extends _ObjCBlockBase { + ObjCBlock12._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - @ffi.Int() - external int si_errno; + /// 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.Int() - external int si_code; + /// 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); + } +} - @pid_t() - external int si_pid; +typedef NSErrorUserInfoKey = ffi.Pointer; +typedef NSURLResourceKey = ffi.Pointer; - @uid_t() - external int si_uid; +/// 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.Int() - external int si_status; + /// creates bookmark data with "less" information, which may be smaller but still be able to resolve in certain ways + static const int NSURLBookmarkCreationMinimalBookmark = 512; - external ffi.Pointer si_addr; + /// include the properties required by writeBookmarkData:toURL:options: in the bookmark data created + static const int NSURLBookmarkCreationSuitableForBookmarkFile = 1024; - external sigval si_value; + /// 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.Long() - external int si_band; + /// if used with kCFURLBookmarkCreationWithSecurityScope, at resolution time only read access to the resource will be granted + static const int NSURLBookmarkCreationSecurityScopeAllowOnlyReadAccess = 4096; - @ffi.Array.multi([7]) - external ffi.Array __pad; + /// 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; } -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; +abstract class NSURLBookmarkResolutionOptions { + /// don't perform any user interaction during bookmark resolution + static const int NSURLBookmarkResolutionWithoutUI = 256; - external ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int, ffi.Pointer<__siginfo>, ffi.Pointer)>> - __sa_sigaction; -} + /// don't mount a volume during bookmark resolution + static const int NSURLBookmarkResolutionWithoutMounting = 512; -class __sigaction extends ffi.Struct { - external __sigaction_u __sigaction_u1; + /// 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; - external ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Int, ffi.Int, - ffi.Pointer, ffi.Pointer)>> sa_tramp; + /// 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; +} - @sigset_t() - external int sa_mask; +typedef NSURLBookmarkFileCreationOptions = NSUInteger; - @ffi.Int() - external int sa_flags; -} +class NSURLHandle extends NSObject { + NSURLHandle._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -typedef siginfo_t = __siginfo; -typedef sigset_t = __darwin_sigset_t; + /// 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); + } -class sigaction extends ffi.Struct { - external __sigaction_u __sigaction_u1; + /// 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); + } - @sigset_t() - external int sa_mask; + /// 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.Int() - external int sa_flags; -} + static void registerURLHandleClass_( + NativeCupertinoHttp _lib, NSObject anURLHandleSubclass) { + return _lib._objc_msgSend_200(_lib._class_NSURLHandle1, + _lib._sel_registerURLHandleClass_1, anURLHandleSubclass._id); + } -class sigvec extends ffi.Struct { - external ffi.Pointer> - sv_handler; + 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.Int() - external int sv_mask; + int status() { + return _lib._objc_msgSend_202(_id, _lib._sel_status1); + } - @ffi.Int() - external int sv_flags; -} + NSString failureReason() { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_failureReason1); + return NSString._(_ret, _lib, retain: true, release: true); + } -class sigstack extends ffi.Struct { - external ffi.Pointer ss_sp; + void addClient_(NSObject? client) { + return _lib._objc_msgSend_200( + _id, _lib._sel_addClient_1, client?._id ?? ffi.nullptr); + } - @ffi.Int() - external int ss_onstack; -} + void removeClient_(NSObject? client) { + return _lib._objc_msgSend_200( + _id, _lib._sel_removeClient_1, client?._id ?? ffi.nullptr); + } -typedef pthread_t = __darwin_pthread_t; -typedef __darwin_pthread_t = ffi.Pointer<_opaque_pthread_t>; -typedef stack_t = __darwin_sigaltstack; + void loadInBackground() { + return _lib._objc_msgSend_1(_id, _lib._sel_loadInBackground1); + } -class __sbuf extends ffi.Struct { - external ffi.Pointer _base; + void cancelLoadInBackground() { + return _lib._objc_msgSend_1(_id, _lib._sel_cancelLoadInBackground1); + } - @ffi.Int() - external int _size; -} + NSData resourceData() { + final _ret = _lib._objc_msgSend_51(_id, _lib._sel_resourceData1); + return NSData._(_ret, _lib, retain: true, release: true); + } -class __sFILEX extends ffi.Opaque {} + NSData availableResourceData() { + final _ret = _lib._objc_msgSend_51(_id, _lib._sel_availableResourceData1); + return NSData._(_ret, _lib, retain: true, release: true); + } -class __sFILE extends ffi.Struct { - external ffi.Pointer _p; + int expectedResourceDataSize() { + return _lib._objc_msgSend_82(_id, _lib._sel_expectedResourceDataSize1); + } - @ffi.Int() - external int _r; + void flushCachedData() { + return _lib._objc_msgSend_1(_id, _lib._sel_flushCachedData1); + } - @ffi.Int() - external int _w; + void backgroundLoadDidFailWithReason_(NSString? reason) { + return _lib._objc_msgSend_188( + _id, + _lib._sel_backgroundLoadDidFailWithReason_1, + reason?._id ?? ffi.nullptr); + } - @ffi.Short() - external int _flags; + void didLoadBytes_loadComplete_(NSData? newBytes, bool yorn) { + return _lib._objc_msgSend_203(_id, _lib._sel_didLoadBytes_loadComplete_1, + newBytes?._id ?? ffi.nullptr, yorn); + } - @ffi.Short() - external int _file; + static bool canInitWithURL_(NativeCupertinoHttp _lib, NSURL? anURL) { + return _lib._objc_msgSend_204(_lib._class_NSURLHandle1, + _lib._sel_canInitWithURL_1, anURL?._id ?? ffi.nullptr); + } - external __sbuf _bf; + 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.Int() - external int _lbfsize; + 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); + } - external ffi.Pointer _cookie; + 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); + } - external ffi - .Pointer)>> - _close; + 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); + } - external ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer, ffi.Int)>> _read; + bool writeProperty_forKey_(NSObject propertyValue, NSString? propertyKey) { + return _lib._objc_msgSend_199(_id, _lib._sel_writeProperty_forKey_1, + propertyValue._id, propertyKey?._id ?? ffi.nullptr); + } - external ffi.Pointer< - ffi.NativeFunction< - fpos_t Function(ffi.Pointer, fpos_t, ffi.Int)>> _seek; + bool writeData_(NSData? data) { + return _lib._objc_msgSend_35( + _id, _lib._sel_writeData_1, data?._id ?? ffi.nullptr); + } - external ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer, ffi.Int)>> _write; + NSData loadInForeground() { + final _ret = _lib._objc_msgSend_51(_id, _lib._sel_loadInForeground1); + return NSData._(_ret, _lib, retain: true, release: true); + } - external __sbuf _ub; + void beginLoadInBackground() { + return _lib._objc_msgSend_1(_id, _lib._sel_beginLoadInBackground1); + } - external ffi.Pointer<__sFILEX> _extra; + void endLoadInBackground() { + return _lib._objc_msgSend_1(_id, _lib._sel_endLoadInBackground1); + } - @ffi.Int() - external int _ur; + 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.Array.multi([3]) - external ffi.Array _ubuf; + 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.Array.multi([1]) - external ffi.Array _nbuf; +abstract class NSURLHandleStatus { + static const int NSURLHandleNotLoaded = 0; + static const int NSURLHandleLoadSucceeded = 1; + static const int NSURLHandleLoadInProgress = 2; + static const int NSURLHandleLoadFailed = 3; +} - external __sbuf _lb; +abstract class NSDataWritingOptions { + /// Hint to use auxiliary file when saving; equivalent to atomically:YES + static const int NSDataWritingAtomic = 1; - @ffi.Int() - external int _blksize; + /// 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; - @fpos_t() - external int _offset; + /// Deprecated name for NSDataWritingAtomic + static const int NSAtomicWrite = 1; } -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; +/// Data Search Options +abstract class NSDataSearchOptions { + static const int NSDataSearchBackwards = 1; + static const int NSDataSearchAnchored = 2; +} -abstract class idtype_t { - static const int P_ALL = 0; - static const int P_PID = 1; - static const int P_PGID = 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); } -class timeval extends ffi.Struct { - @__darwin_time_t() - external int tv_sec; +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); +} - @__darwin_suseconds_t() - external int tv_usec; +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); } -typedef __darwin_time_t = ffi.Long; -typedef __darwin_suseconds_t = __int32_t; +class ObjCBlock13 extends _ObjCBlockBase { + ObjCBlock13._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); -class rusage extends ffi.Struct { - external timeval ru_utime; + /// 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; - external timeval ru_stime; + /// 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.Long() - external int ru_maxrss; +/// Read/Write Options +abstract class NSDataReadingOptions { + /// Hint to map the file in if possible and safe + static const int NSDataReadingMappedIfSafe = 1; - @ffi.Long() - external int ru_ixrss; + /// Hint to get the file not to be cached in the kernel + static const int NSDataReadingUncached = 2; - @ffi.Long() - external int ru_idrss; + /// Hint to map the file in if possible. This takes precedence over NSDataReadingMappedIfSafe if both are given. + static const int NSDataReadingMappedAlways = 8; - @ffi.Long() - external int ru_isrss; + /// Deprecated name for NSDataReadingMappedIfSafe + static const int NSDataReadingMapped = 1; - @ffi.Long() - external int ru_minflt; + /// Deprecated name for NSDataReadingMapped + static const int NSMappedRead = 1; - @ffi.Long() - external int ru_majflt; + /// Deprecated name for NSDataReadingUncached + static const int NSUncachedRead = 2; +} - @ffi.Long() - external int ru_nswap; +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.Long() - external int ru_inblock; +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.Long() - external int ru_oublock; +void _ObjCBlock14_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, int arg1) { + return _ObjCBlock14_closureRegistry[block.ref.target.address]!(arg0, arg1); +} - @ffi.Long() - external int ru_msgsnd; - - @ffi.Long() - external int ru_msgrcv; +class ObjCBlock14 extends _ObjCBlockBase { + ObjCBlock14._(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. + 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.Long() - external int ru_nvcsw; + /// 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.Long() - external int ru_nivcsw; +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 rusage_info_v0 extends ffi.Struct { - @ffi.Array.multi([16]) - external ffi.Array ri_uuid; +/// 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_user_time; + /// 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_system_time; +/// 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_pkg_idle_wkups; + /// 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_interrupt_wkups; + /// 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_pageins; + /// 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_wired_size; +typedef UTF32Char = UInt32; +typedef UInt32 = ffi.UnsignedInt; - @ffi.Uint64() - external int ri_resident_size; +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_phys_footprint; +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_proc_start_abstime; +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_proc_exit_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); } -class rusage_info_v1 extends ffi.Struct { - @ffi.Array.multi([16]) - external ffi.Array ri_uuid; +class ObjCBlock15 extends _ObjCBlockBase { + ObjCBlock15._(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. + 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_system_time; + /// 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_pkg_idle_wkups; +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_interrupt_wkups; +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_pageins; +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_wired_size; +class ObjCBlock16 extends _ObjCBlockBase { + ObjCBlock16._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - @ffi.Uint64() - external int ri_resident_size; + /// 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_phys_footprint; + /// 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_proc_start_abstime; +typedef NSStringEncoding = NSUInteger; - @ffi.Uint64() - external int ri_proc_exit_abstime; +abstract class NSStringEncodingConversionOptions { + static const int NSStringEncodingConversionAllowLossy = 1; + static const int NSStringEncodingConversionExternalRepresentation = 2; +} - @ffi.Uint64() - external int ri_child_user_time; +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_child_system_time; +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_child_pkg_idle_wkups; +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_child_interrupt_wkups; +class ObjCBlock17 extends _ObjCBlockBase { + ObjCBlock17._(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. + 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_elapsed_abstime; + /// 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); + } } -class rusage_info_v2 extends ffi.Struct { - @ffi.Array.multi([16]) - external ffi.Array ri_uuid; - - @ffi.Uint64() - external int ri_user_time; +typedef va_list = __builtin_va_list; +typedef __builtin_va_list = ffi.Pointer; - @ffi.Uint64() - external int ri_system_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; +} - @ffi.Uint64() - external int ri_pkg_idle_wkups; +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_interrupt_wkups; +@ffi.Packed(2) +final class wide extends ffi.Struct { + @UInt32() + external int lo; - @ffi.Uint64() - external int ri_pageins; + @SInt32() + external int hi; +} - @ffi.Uint64() - external int ri_wired_size; +typedef SInt32 = ffi.Int; - @ffi.Uint64() - external int ri_resident_size; +@ffi.Packed(2) +final class UnsignedWide extends ffi.Struct { + @UInt32() + external int lo; - @ffi.Uint64() - external int ri_phys_footprint; + @UInt32() + external int hi; +} - @ffi.Uint64() - external int ri_proc_start_abstime; +final class Float80 extends ffi.Struct { + @SInt16() + external int exp; - @ffi.Uint64() - external int ri_proc_exit_abstime; + @ffi.Array.multi([4]) + external ffi.Array man; +} - @ffi.Uint64() - external int ri_child_user_time; +typedef SInt16 = ffi.Short; +typedef UInt16 = ffi.UnsignedShort; - @ffi.Uint64() - external int ri_child_system_time; +final class Float96 extends ffi.Struct { + @ffi.Array.multi([2]) + external ffi.Array exp; - @ffi.Uint64() - external int ri_child_pkg_idle_wkups; + @ffi.Array.multi([4]) + external ffi.Array man; +} - @ffi.Uint64() - external int ri_child_interrupt_wkups; +@ffi.Packed(2) +final class Float32Point extends ffi.Struct { + @Float32() + external double x; - @ffi.Uint64() - external int ri_child_pageins; + @Float32() + external double y; +} - @ffi.Uint64() - external int ri_child_elapsed_abstime; +typedef Float32 = ffi.Float; - @ffi.Uint64() - external int ri_diskio_bytesread; +@ffi.Packed(2) +final class ProcessSerialNumber extends ffi.Struct { + @UInt32() + external int highLongOfPSN; - @ffi.Uint64() - external int ri_diskio_byteswritten; + @UInt32() + external int lowLongOfPSN; } -class rusage_info_v3 extends ffi.Struct { - @ffi.Array.multi([16]) - external ffi.Array ri_uuid; +final class Point extends ffi.Struct { + @ffi.Short() + external int v; - @ffi.Uint64() - external int ri_user_time; + @ffi.Short() + external int h; +} - @ffi.Uint64() - external int ri_system_time; +final class Rect extends ffi.Struct { + @ffi.Short() + external int top; - @ffi.Uint64() - external int ri_pkg_idle_wkups; + @ffi.Short() + external int left; - @ffi.Uint64() - external int ri_interrupt_wkups; + @ffi.Short() + external int bottom; - @ffi.Uint64() - external int ri_pageins; + @ffi.Short() + external int right; +} - @ffi.Uint64() - external int ri_wired_size; +@ffi.Packed(2) +final class FixedPoint extends ffi.Struct { + @Fixed() + external int x; - @ffi.Uint64() - external int ri_resident_size; + @Fixed() + external int y; +} - @ffi.Uint64() - external int ri_phys_footprint; +typedef Fixed = SInt32; - @ffi.Uint64() - external int ri_proc_start_abstime; +@ffi.Packed(2) +final class FixedRect extends ffi.Struct { + @Fixed() + external int left; - @ffi.Uint64() - external int ri_proc_exit_abstime; + @Fixed() + external int top; - @ffi.Uint64() - external int ri_child_user_time; + @Fixed() + external int right; - @ffi.Uint64() - external int ri_child_system_time; + @Fixed() + external int bottom; +} - @ffi.Uint64() - external int ri_child_pkg_idle_wkups; +final class TimeBaseRecord extends ffi.Opaque {} - @ffi.Uint64() - external int ri_child_interrupt_wkups; +@ffi.Packed(2) +final class TimeRecord extends ffi.Struct { + external CompTimeValue value; - @ffi.Uint64() - external int ri_child_pageins; + @TimeScale() + external int scale; - @ffi.Uint64() - external int ri_child_elapsed_abstime; + external TimeBase base; +} - @ffi.Uint64() - external int ri_diskio_bytesread; +typedef CompTimeValue = wide; +typedef TimeScale = SInt32; +typedef TimeBase = ffi.Pointer; - @ffi.Uint64() - external int ri_diskio_byteswritten; +final class NumVersion extends ffi.Struct { + @UInt8() + external int nonRelRev; - @ffi.Uint64() - external int ri_cpu_time_qos_default; + @UInt8() + external int stage; - @ffi.Uint64() - external int ri_cpu_time_qos_maintenance; + @UInt8() + external int minorAndBugRev; - @ffi.Uint64() - external int ri_cpu_time_qos_background; + @UInt8() + external int majorRev; +} - @ffi.Uint64() - external int ri_cpu_time_qos_utility; +typedef UInt8 = ffi.UnsignedChar; - @ffi.Uint64() - external int ri_cpu_time_qos_legacy; +final class NumVersionVariant extends ffi.Union { + external NumVersion parts; - @ffi.Uint64() - external int ri_cpu_time_qos_user_initiated; + @UInt32() + external int whole; +} - @ffi.Uint64() - external int ri_cpu_time_qos_user_interactive; +final class VersRec extends ffi.Struct { + external NumVersion numericVersion; - @ffi.Uint64() - external int ri_billed_system_time; + @ffi.Short() + external int countryCode; - @ffi.Uint64() - external int ri_serviced_system_time; + @ffi.Array.multi([256]) + external ffi.Array shortVersion; + + @ffi.Array.multi([256]) + external ffi.Array reserved; } -class rusage_info_v4 extends ffi.Struct { - @ffi.Array.multi([16]) - external ffi.Array ri_uuid; +typedef ConstStr255Param = ffi.Pointer; - @ffi.Uint64() - external int ri_user_time; +final class __CFString extends ffi.Opaque {} - @ffi.Uint64() - external int ri_system_time; +abstract class CFComparisonResult { + static const int kCFCompareLessThan = -1; + static const int kCFCompareEqualTo = 0; + static const int kCFCompareGreaterThan = 1; +} - @ffi.Uint64() - external int ri_pkg_idle_wkups; +typedef CFIndex = ffi.Long; - @ffi.Uint64() - external int ri_interrupt_wkups; +final class CFRange extends ffi.Struct { + @CFIndex() + external int location; - @ffi.Uint64() - external int ri_pageins; + @CFIndex() + external int length; +} - @ffi.Uint64() - external int ri_wired_size; +final class __CFNull extends ffi.Opaque {} - @ffi.Uint64() - external int ri_resident_size; +typedef CFTypeID = ffi.UnsignedLong; +typedef CFNullRef = ffi.Pointer<__CFNull>; - @ffi.Uint64() - external int ri_phys_footprint; +final class __CFAllocator extends ffi.Opaque {} - @ffi.Uint64() - external int ri_proc_start_abstime; +typedef CFAllocatorRef = ffi.Pointer<__CFAllocator>; - @ffi.Uint64() - external int ri_proc_exit_abstime; +final class CFAllocatorContext extends ffi.Struct { + @CFIndex() + external int version; - @ffi.Uint64() - external int ri_child_user_time; + external ffi.Pointer info; - @ffi.Uint64() - external int ri_child_system_time; + external CFAllocatorRetainCallBack retain; - @ffi.Uint64() - external int ri_child_pkg_idle_wkups; + external CFAllocatorReleaseCallBack release; - @ffi.Uint64() - external int ri_child_interrupt_wkups; + external CFAllocatorCopyDescriptionCallBack copyDescription; - @ffi.Uint64() - external int ri_child_pageins; + external CFAllocatorAllocateCallBack allocate; - @ffi.Uint64() - external int ri_child_elapsed_abstime; + external CFAllocatorReallocateCallBack reallocate; - @ffi.Uint64() - external int ri_diskio_bytesread; + external CFAllocatorDeallocateCallBack deallocate; - @ffi.Uint64() - external int ri_diskio_byteswritten; + external CFAllocatorPreferredSizeCallBack preferredSize; +} - @ffi.Uint64() - external int ri_cpu_time_qos_default; +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.Uint64() - external int ri_cpu_time_qos_maintenance; +class NSMutableIndexSet extends NSIndexSet { + NSMutableIndexSet._(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_background; + /// 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.Uint64() - external int ri_cpu_time_qos_utility; + /// 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); + } - @ffi.Uint64() - external int ri_cpu_time_qos_legacy; + /// 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); + } - @ffi.Uint64() - external int ri_cpu_time_qos_user_initiated; + void addIndexes_(NSIndexSet? indexSet) { + return _lib._objc_msgSend_285( + _id, _lib._sel_addIndexes_1, indexSet?._id ?? ffi.nullptr); + } - @ffi.Uint64() - external int ri_cpu_time_qos_user_interactive; + void removeIndexes_(NSIndexSet? indexSet) { + return _lib._objc_msgSend_285( + _id, _lib._sel_removeIndexes_1, indexSet?._id ?? ffi.nullptr); + } - @ffi.Uint64() - external int ri_billed_system_time; + void removeAllIndexes() { + return _lib._objc_msgSend_1(_id, _lib._sel_removeAllIndexes1); + } - @ffi.Uint64() - external int ri_serviced_system_time; + void addIndex_(int value) { + return _lib._objc_msgSend_286(_id, _lib._sel_addIndex_1, value); + } - @ffi.Uint64() - external int ri_logical_writes; + void removeIndex_(int value) { + return _lib._objc_msgSend_286(_id, _lib._sel_removeIndex_1, value); + } - @ffi.Uint64() - external int ri_lifetime_max_phys_footprint; + void addIndexesInRange_(NSRange range) { + return _lib._objc_msgSend_287(_id, _lib._sel_addIndexesInRange_1, range); + } - @ffi.Uint64() - external int ri_instructions; + void removeIndexesInRange_(NSRange range) { + return _lib._objc_msgSend_287(_id, _lib._sel_removeIndexesInRange_1, range); + } - @ffi.Uint64() - external int ri_cycles; + void shiftIndexesStartingAtIndex_by_(int index, int delta) { + return _lib._objc_msgSend_288( + _id, _lib._sel_shiftIndexesStartingAtIndex_by_1, index, delta); + } - @ffi.Uint64() - external int ri_billed_energy; + 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); + } - @ffi.Uint64() - external int ri_serviced_energy; + 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); + } - @ffi.Uint64() - external int ri_interval_max_phys_footprint; + 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); + } - @ffi.Uint64() - external int ri_runnable_time; -} + 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); + } -class rusage_info_v5 extends ffi.Struct { - @ffi.Array.multi([16]) - external ffi.Array ri_uuid; + 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); + } +} - @ffi.Uint64() - external int ri_user_time; +/// 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); - @ffi.Uint64() - external int ri_system_time; + /// 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); + } - @ffi.Uint64() - external int ri_pkg_idle_wkups; + /// 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); + } - @ffi.Uint64() - external int ri_interrupt_wkups; + /// 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); + } - @ffi.Uint64() - external int ri_pageins; + void addObject_(NSObject anObject) { + return _lib._objc_msgSend_200(_id, _lib._sel_addObject_1, anObject._id); + } - @ffi.Uint64() - external int ri_wired_size; + void insertObject_atIndex_(NSObject anObject, int index) { + return _lib._objc_msgSend_289( + _id, _lib._sel_insertObject_atIndex_1, anObject._id, index); + } - @ffi.Uint64() - external int ri_resident_size; + void removeLastObject() { + return _lib._objc_msgSend_1(_id, _lib._sel_removeLastObject1); + } - @ffi.Uint64() - external int ri_phys_footprint; + void removeObjectAtIndex_(int index) { + return _lib._objc_msgSend_286(_id, _lib._sel_removeObjectAtIndex_1, index); + } - @ffi.Uint64() - external int ri_proc_start_abstime; + void replaceObjectAtIndex_withObject_(int index, NSObject anObject) { + return _lib._objc_msgSend_290( + _id, _lib._sel_replaceObjectAtIndex_withObject_1, index, anObject._id); + } - @ffi.Uint64() - external int ri_proc_exit_abstime; + @override + NSMutableArray init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_child_user_time; + NSMutableArray initWithCapacity_(int numItems) { + final _ret = + _lib._objc_msgSend_94(_id, _lib._sel_initWithCapacity_1, numItems); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_child_system_time; + @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); + } - @ffi.Uint64() - external int ri_child_pkg_idle_wkups; + void addObjectsFromArray_(NSArray? otherArray) { + return _lib._objc_msgSend_291( + _id, _lib._sel_addObjectsFromArray_1, otherArray?._id ?? ffi.nullptr); + } - @ffi.Uint64() - external int ri_child_interrupt_wkups; + void exchangeObjectAtIndex_withObjectAtIndex_(int idx1, int idx2) { + return _lib._objc_msgSend_292( + _id, _lib._sel_exchangeObjectAtIndex_withObjectAtIndex_1, idx1, idx2); + } - @ffi.Uint64() - external int ri_child_pageins; + void removeAllObjects() { + return _lib._objc_msgSend_1(_id, _lib._sel_removeAllObjects1); + } - @ffi.Uint64() - external int ri_child_elapsed_abstime; + void removeObject_inRange_(NSObject anObject, NSRange range) { + return _lib._objc_msgSend_293( + _id, _lib._sel_removeObject_inRange_1, anObject._id, range); + } - @ffi.Uint64() - external int ri_diskio_bytesread; + void removeObject_(NSObject anObject) { + return _lib._objc_msgSend_200(_id, _lib._sel_removeObject_1, anObject._id); + } - @ffi.Uint64() - external int ri_diskio_byteswritten; + void removeObjectIdenticalTo_inRange_(NSObject anObject, NSRange range) { + return _lib._objc_msgSend_293( + _id, _lib._sel_removeObjectIdenticalTo_inRange_1, anObject._id, range); + } - @ffi.Uint64() - external int ri_cpu_time_qos_default; + void removeObjectIdenticalTo_(NSObject anObject) { + return _lib._objc_msgSend_200( + _id, _lib._sel_removeObjectIdenticalTo_1, anObject._id); + } - @ffi.Uint64() - external int ri_cpu_time_qos_maintenance; + void removeObjectsFromIndices_numIndices_( + ffi.Pointer indices, int cnt) { + return _lib._objc_msgSend_294( + _id, _lib._sel_removeObjectsFromIndices_numIndices_1, indices, cnt); + } - @ffi.Uint64() - external int ri_cpu_time_qos_background; + void removeObjectsInArray_(NSArray? otherArray) { + return _lib._objc_msgSend_291( + _id, _lib._sel_removeObjectsInArray_1, otherArray?._id ?? ffi.nullptr); + } - @ffi.Uint64() - external int ri_cpu_time_qos_utility; + void removeObjectsInRange_(NSRange range) { + return _lib._objc_msgSend_287(_id, _lib._sel_removeObjectsInRange_1, range); + } - @ffi.Uint64() - external int ri_cpu_time_qos_legacy; + 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); + } - @ffi.Uint64() - external int ri_cpu_time_qos_user_initiated; + void replaceObjectsInRange_withObjectsFromArray_( + NSRange range, NSArray? otherArray) { + return _lib._objc_msgSend_296( + _id, + _lib._sel_replaceObjectsInRange_withObjectsFromArray_1, + range, + otherArray?._id ?? ffi.nullptr); + } - @ffi.Uint64() - external int ri_cpu_time_qos_user_interactive; + void setArray_(NSArray? otherArray) { + return _lib._objc_msgSend_291( + _id, _lib._sel_setArray_1, otherArray?._id ?? ffi.nullptr); + } - @ffi.Uint64() - external int ri_billed_system_time; + 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); + } - @ffi.Uint64() - external int ri_serviced_system_time; + void sortUsingSelector_(ffi.Pointer comparator) { + return _lib._objc_msgSend_7(_id, _lib._sel_sortUsingSelector_1, comparator); + } - @ffi.Uint64() - external int ri_logical_writes; + 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); + } - @ffi.Uint64() - external int ri_lifetime_max_phys_footprint; + void removeObjectsAtIndexes_(NSIndexSet? indexes) { + return _lib._objc_msgSend_285( + _id, _lib._sel_removeObjectsAtIndexes_1, indexes?._id ?? ffi.nullptr); + } - @ffi.Uint64() - external int ri_instructions; + 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); + } - @ffi.Uint64() - external int ri_cycles; + void setObject_atIndexedSubscript_(NSObject obj, int idx) { + return _lib._objc_msgSend_289( + _id, _lib._sel_setObject_atIndexedSubscript_1, obj._id, idx); + } - @ffi.Uint64() - external int ri_billed_energy; + void sortUsingComparator_(NSComparator cmptr) { + return _lib._objc_msgSend_300(_id, _lib._sel_sortUsingComparator_1, cmptr); + } - @ffi.Uint64() - external int ri_serviced_energy; + void sortWithOptions_usingComparator_(int opts, NSComparator cmptr) { + return _lib._objc_msgSend_301( + _id, _lib._sel_sortWithOptions_usingComparator_1, opts, cmptr); + } - @ffi.Uint64() - external int ri_interval_max_phys_footprint; + 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); + } - @ffi.Uint64() - external int ri_runnable_time; + 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); + } - @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; + 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 proc_rlimit_control_wakeupmon extends ffi.Struct { - @ffi.Uint32() - external int wm_flags; + 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); + } - @ffi.Int32() - external int wm_rate; -} + 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); + } -typedef id_t = __darwin_id_t; -typedef __darwin_id_t = __uint32_t; + void applyDifference_(NSOrderedCollectionDifference? difference) { + return _lib._objc_msgSend_304( + _id, _lib._sel_applyDifference_1, difference?._id ?? ffi.nullptr); + } -class wait extends ffi.Opaque {} + 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 div_t extends ffi.Struct { - @ffi.Int() - external int quot; + 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); + } - @ffi.Int() - external int rem; -} + 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 ldiv_t extends ffi.Struct { - @ffi.Long() - external int quot; + 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); + } - @ffi.Long() - external int rem; -} + 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); + } -class lldiv_t extends ffi.Struct { - @ffi.LongLong() - external int quot; + /// 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.LongLong() - external int rem; -} + 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); + } -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); + 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); + } } -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); -} +/// 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); -int _ObjCBlock20_closureTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1) { - return _ObjCBlock20_closureRegistry[block.ref.target.address]!(arg0, arg1); -} + /// 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); + } -class ObjCBlock20 extends _ObjCBlockBase { - ObjCBlock20._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, 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); + } - /// 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; + /// 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); + } - /// 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 get mutableBytes { + return _lib._objc_msgSend_31(_id, _lib._sel_mutableBytes1); } - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + @override + int get length { + return _lib._objc_msgSend_12(_id, _lib._sel_length1); + } -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; + set length(int value) { + _lib._objc_msgSend_305(_id, _lib._sel_setLength_1, value); + } -class timespec extends ffi.Struct { - @__darwin_time_t() - external int tv_sec; + void appendBytes_length_(ffi.Pointer bytes, int length) { + return _lib._objc_msgSend_33( + _id, _lib._sel_appendBytes_length_1, bytes, length); + } - @ffi.Long() - external int tv_nsec; -} + void appendData_(NSData? other) { + return _lib._objc_msgSend_306( + _id, _lib._sel_appendData_1, other?._id ?? ffi.nullptr); + } -class tm extends ffi.Struct { - @ffi.Int() - external int tm_sec; + void increaseLengthBy_(int extraLength) { + return _lib._objc_msgSend_286( + _id, _lib._sel_increaseLengthBy_1, extraLength); + } - @ffi.Int() - external int tm_min; + void replaceBytesInRange_withBytes_( + NSRange range, ffi.Pointer bytes) { + return _lib._objc_msgSend_307( + _id, _lib._sel_replaceBytesInRange_withBytes_1, range, bytes); + } - @ffi.Int() - external int tm_hour; + void resetBytesInRange_(NSRange range) { + return _lib._objc_msgSend_287(_id, _lib._sel_resetBytesInRange_1, range); + } - @ffi.Int() - external int tm_mday; + void setData_(NSData? data) { + return _lib._objc_msgSend_306( + _id, _lib._sel_setData_1, data?._id ?? ffi.nullptr); + } - @ffi.Int() - external int tm_mon; + 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); + } - @ffi.Int() - external int tm_year; + 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.Int() - external int tm_wday; + 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); + } - @ffi.Int() - external int tm_yday; + NSMutableData initWithCapacity_(int capacity) { + final _ret = + _lib._objc_msgSend_94(_id, _lib._sel_initWithCapacity_1, capacity); + return NSMutableData._(_ret, _lib, retain: true, release: true); + } - @ffi.Int() - external int tm_isdst; + NSMutableData initWithLength_(int length) { + final _ret = _lib._objc_msgSend_94(_id, _lib._sel_initWithLength_1, length); + return NSMutableData._(_ret, _lib, retain: true, release: true); + } - @ffi.Long() - external int tm_gmtoff; + /// 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); + } - external ffi.Pointer tm_zone; -} + bool compressUsingAlgorithm_error_( + int algorithm, ffi.Pointer> error) { + return _lib._objc_msgSend_309( + _id, _lib._sel_compressUsingAlgorithm_error_1, algorithm, error); + } -typedef clock_t = __darwin_clock_t; -typedef __darwin_clock_t = ffi.UnsignedLong; -typedef time_t = __darwin_time_t; + 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 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; -} + 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); + } -typedef intmax_t = ffi.Long; + 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); + } -class imaxdiv_t extends ffi.Struct { - @intmax_t() - external int quot; + 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); + } - @intmax_t() - external int rem; -} + 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 uintmax_t = ffi.UnsignedLong; + 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); + } -class CFBagCallBacks extends ffi.Struct { - @CFIndex() - external int version; + 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); + } - external CFBagRetainCallBack retain; + 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); + } - external CFBagReleaseCallBack release; + 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); + } - external CFBagCopyDescriptionCallBack copyDescription; + 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); + } - external CFBagEqualCallBack equal; + 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); + } - external CFBagHashCallBack hash; + 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); + } } -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)>>; +/// 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); -class __CFBag extends ffi.Opaque {} + /// 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); + } -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 [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); + } -class CFBinaryHeapCompareContext extends ffi.Struct { - @CFIndex() - external int version; + /// 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); + } - external ffi.Pointer info; + 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); + } - external ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>> retain; + 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); + } - external ffi - .Pointer)>> - release; + 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); + } - external ffi.Pointer< - ffi.NativeFunction)>> - copyDescription; -} + 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); + } -class CFBinaryHeapCallBacks extends ffi.Struct { - @CFIndex() - external int version; + 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); + } - external ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - CFAllocatorRef, ffi.Pointer)>> retain; + 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); + } - external ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(CFAllocatorRef, ffi.Pointer)>> release; + 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); + } - external ffi.Pointer< - ffi.NativeFunction)>> - copyDescription; + 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); + } - 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)>>; + 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); + } -class __CFBitVector extends ffi.Opaque {} + 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 CFBitVectorRef = ffi.Pointer<__CFBitVector>; -typedef CFMutableBitVectorRef = ffi.Pointer<__CFBitVector>; -typedef CFBit = UInt32; + 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 __CFByteOrder { - static const int CFByteOrderUnknown = 0; - static const int CFByteOrderLittleEndian = 1; - static const int CFByteOrderBigEndian = 2; -} + 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); + } -class CFSwappedFloat32 extends ffi.Struct { - @ffi.Uint32() - external int v; -} + 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); + } -class CFSwappedFloat64 extends ffi.Struct { - @ffi.Uint64() - external int v; + 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); + } } -class CFDictionaryKeyCallBacks extends ffi.Struct { - @CFIndex() - external int version; +/// 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); - external CFDictionaryRetainCallBack retain; + /// 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); + } - external CFDictionaryReleaseCallBack release; + /// 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); + } - external CFDictionaryCopyDescriptionCallBack copyDescription; + /// 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); + } - external CFDictionaryEqualCallBack equal; + void removeObjectForKey_(NSObject aKey) { + return _lib._objc_msgSend_200( + _id, _lib._sel_removeObjectForKey_1, aKey._id); + } - external CFDictionaryHashCallBack hash; -} + void setObject_forKey_(NSObject anObject, NSObject aKey) { + return _lib._objc_msgSend_310( + _id, _lib._sel_setObject_forKey_1, anObject._id, aKey._id); + } -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)>>; + @override + NSMutableDictionary init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } -class CFDictionaryValueCallBacks extends ffi.Struct { - @CFIndex() - external int version; + NSMutableDictionary initWithCapacity_(int numItems) { + final _ret = + _lib._objc_msgSend_94(_id, _lib._sel_initWithCapacity_1, numItems); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } - external CFDictionaryRetainCallBack retain; + @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); + } - external CFDictionaryReleaseCallBack release; + void addEntriesFromDictionary_(NSDictionary? otherDictionary) { + return _lib._objc_msgSend_311(_id, _lib._sel_addEntriesFromDictionary_1, + otherDictionary?._id ?? ffi.nullptr); + } - external CFDictionaryCopyDescriptionCallBack copyDescription; + void removeAllObjects() { + return _lib._objc_msgSend_1(_id, _lib._sel_removeAllObjects1); + } - external CFDictionaryEqualCallBack equal; -} + void removeObjectsForKeys_(NSArray? keyArray) { + return _lib._objc_msgSend_291( + _id, _lib._sel_removeObjectsForKeys_1, keyArray?._id ?? ffi.nullptr); + } -class __CFDictionary extends ffi.Opaque {} + void setDictionary_(NSDictionary? otherDictionary) { + return _lib._objc_msgSend_311( + _id, _lib._sel_setDictionary_1, otherDictionary?._id ?? ffi.nullptr); + } -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 setObject_forKeyedSubscript_(NSObject obj, NSObject key) { + return _lib._objc_msgSend_310( + _id, _lib._sel_setObject_forKeyedSubscript_1, obj._id, key._id); + } -class __CFNotificationCenter extends ffi.Opaque {} + 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); + } -abstract class CFNotificationSuspensionBehavior { - static const int CFNotificationSuspensionBehaviorDrop = 1; - static const int CFNotificationSuspensionBehaviorCoalesce = 2; - static const int CFNotificationSuspensionBehaviorHold = 3; - static const int CFNotificationSuspensionBehaviorDeliverImmediately = 4; -} + 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 CFNotificationCenterRef = ffi.Pointer<__CFNotificationCenter>; -typedef CFNotificationCallback = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(CFNotificationCenterRef, ffi.Pointer, - CFNotificationName, ffi.Pointer, CFDictionaryRef)>>; -typedef CFNotificationName = CFStringRef; + 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 __CFLocale extends ffi.Opaque {} + 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); + } -typedef CFLocaleRef = ffi.Pointer<__CFLocale>; -typedef CFLocaleIdentifier = CFStringRef; -typedef LangCode = SInt16; -typedef RegionCode = SInt16; + 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); + } -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; -} + /// 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 CFLocaleKey = CFStringRef; -typedef CFCalendarIdentifier = CFStringRef; -typedef CFAbsoluteTime = CFTimeInterval; -typedef CFTimeInterval = ffi.Double; + 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 __CFDate extends ffi.Opaque {} + 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); + } -typedef CFDateRef = ffi.Pointer<__CFDate>; + 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); + } -class __CFTimeZone extends ffi.Opaque {} + 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); + } -class CFGregorianDate extends ffi.Struct { - @SInt32() - external int year; + 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); + } - @SInt8() - external int month; + 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); + } - @SInt8() - external int day; + /// 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); + } - @SInt8() - external int hour; + /// 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); + } - @SInt8() - external int minute; + 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.Double() - external double second; + 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 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; +/// ! +/// @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; } -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; -} +/// ! +/// @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); -typedef CFTimeZoneRef = ffi.Pointer<__CFTimeZone>; + /// 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); + } -class __CFData extends ffi.Opaque {} + /// 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); + } -typedef CFDataRef = ffi.Pointer<__CFData>; -typedef CFMutableDataRef = ffi.Pointer<__CFData>; + /// 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); + } -abstract class CFDataSearchFlags { - static const int kCFDataSearchBackwards = 1; - static const int kCFDataSearchAnchored = 2; -} + /// ! + /// @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); + } -class __CFCharacterSet extends ffi.Opaque {} + /// ! + /// @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); + } -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; -} + /// ! + /// @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); + } -typedef CFCharacterSetRef = ffi.Pointer<__CFCharacterSet>; -typedef CFMutableCharacterSetRef = ffi.Pointer<__CFCharacterSet>; -typedef UniChar = UInt16; + /// ! + /// @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); + } -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; -} + /// ! + /// @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); + } -typedef CFStringEncoding = UInt32; -typedef CFMutableStringRef = ffi.Pointer<__CFString>; -typedef StringPtr = ffi.Pointer; -typedef ConstStringPtr = ffi.Pointer; + /// ! + /// @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); + } -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; -} + 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); + } -abstract class CFStringNormalizationForm { - static const int kCFStringNormalizationFormD = 0; - static const int kCFStringNormalizationFormKD = 1; - static const int kCFStringNormalizationFormC = 2; - static const int kCFStringNormalizationFormKC = 3; + 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 CFStringInlineBuffer extends ffi.Struct { - @ffi.Array.multi([64]) - external ffi.Array buffer; - - external CFStringRef theString; - - external ffi.Pointer directUniCharBuffer; - - external ffi.Pointer directCStringBuffer; +class NSURLResponse extends NSObject { + NSURLResponse._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); - external CFRange rangeToBuffer; + /// 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); + } - @CFIndex() - external int bufferedRangeStart; + /// 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); + } - @CFIndex() - external int bufferedRangeEnd; -} + /// 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); + } -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; -} + /// ! + /// @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_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); + } -class __CFCalendar extends ffi.Opaque {} + /// ! + /// @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 CFCalendarRef = ffi.Pointer<__CFCalendar>; + /// ! + /// @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 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; -} + /// ! + /// @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); + } -class __CFDateFormatter extends ffi.Opaque {} + /// ! + /// @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 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 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); + } -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 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); + } } -typedef CFDateFormatterRef = ffi.Pointer<__CFDateFormatter>; -typedef CFDateFormatterKey = CFStringRef; +class NSURLCache extends NSObject { + NSURLCache._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -class __CFError extends ffi.Opaque {} + /// 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); + } -typedef CFErrorDomain = CFStringRef; -typedef CFErrorRef = ffi.Pointer<__CFError>; + /// 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); + } -class __CFBoolean extends ffi.Opaque {} + /// 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); + } -typedef CFBooleanRef = ffi.Pointer<__CFBoolean>; + /// ! + /// @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 + : NSURLCache._(_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; -} + /// ! + /// @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); + } -class __CFNumber extends ffi.Opaque {} + /// ! + /// @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_initWithMemoryCapacity_diskCapacity_diskPath_1, + memoryCapacity, + diskCapacity, + path?._id ?? ffi.nullptr); + return NSURLCache._(_ret, _lib, retain: true, release: true); + } -typedef CFNumberRef = ffi.Pointer<__CFNumber>; + /// ! + /// @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); + } -class __CFNumberFormatter extends ffi.Opaque {} + /// ! + /// @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); + } -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; -} + /// ! + /// @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); + } -typedef CFNumberFormatterRef = ffi.Pointer<__CFNumberFormatter>; + /// ! + /// @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); + } -abstract class CFNumberFormatterOptionFlags { - static const int kCFNumberFormatterParseIntegersOnly = 1; -} + /// ! + /// @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); + } -typedef CFNumberFormatterKey = CFStringRef; + /// ! + /// @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); + } -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 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); + } -abstract class CFNumberFormatterPadPosition { - static const int kCFNumberFormatterPadBeforePrefix = 0; - static const int kCFNumberFormatterPadAfterPrefix = 1; - static const int kCFNumberFormatterPadBeforeSuffix = 2; - static const int kCFNumberFormatterPadAfterSuffix = 3; -} + /// ! + /// @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); + } -typedef CFPropertyListRef = CFTypeRef; + /// ! + /// @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); + } -abstract class CFURLPathStyle { - static const int kCFURLPOSIXPathStyle = 0; - static const int kCFURLHFSPathStyle = 1; - static const int kCFURLWindowsPathStyle = 2; -} + /// ! + /// @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); + } -class __CFURL extends ffi.Opaque {} + /// ! + /// @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); + } -typedef CFURLRef = ffi.Pointer<__CFURL>; + /// ! + /// @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 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); + } -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 getCachedResponseForDataTask_completionHandler_( + NSURLSessionDataTask? dataTask, ObjCBlock19 completionHandler) { + return _lib._objc_msgSend_371( + _id, + _lib._sel_getCachedResponseForDataTask_completionHandler_1, + dataTask?._id ?? ffi.nullptr, + completionHandler._id); + } -class FSRef extends ffi.Opaque {} + void removeCachedResponseForDataTask_(NSURLSessionDataTask? dataTask) { + return _lib._objc_msgSend_372( + _id, + _lib._sel_removeCachedResponseForDataTask_1, + dataTask?._id ?? ffi.nullptr); + } -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 NSURLCache new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSURLCache1, _lib._sel_new1); + return NSURLCache._(_ret, _lib, retain: false, 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 NSURLCache alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLCache1, _lib._sel_alloc1); + return NSURLCache._(_ret, _lib, retain: false, release: true); + } } -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; +class NSURLRequest extends NSObject { + NSURLRequest._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); - @mach_port_mscount_t() - external int mps_mscount; + /// 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_msgcount_t() - external int mps_qlimit; + /// 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_port_msgcount_t() - external int mps_msgcount; + /// 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_rights_t() - external int mps_sorights; + /// ! + /// @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); + } - @boolean_t() - external int mps_srights; + /// ! + /// @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); + } - @boolean_t() - external int mps_pdrequest; + /// ! + /// @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_324( + _lib._class_NSURLRequest1, + _lib._sel_requestWithURL_cachePolicy_timeoutInterval_1, + URL?._id ?? ffi.nullptr, + cachePolicy, + timeoutInterval); + return NSURLRequest._(_ret, _lib, retain: true, release: true); + } - @boolean_t() - external int mps_nsrequest; + /// ! + /// @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); + } - @natural_t() - external int mps_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_324( + _id, + _lib._sel_initWithURL_cachePolicy_timeoutInterval_1, + URL?._id ?? ffi.nullptr, + cachePolicy, + timeoutInterval); + return NSURLRequest._(_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; + /// ! + /// @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); + } -class mach_port_limits extends ffi.Struct { - @mach_port_msgcount_t() - external int mpl_qlimit; -} + /// ! + /// @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); + } -class mach_port_info_ext extends ffi.Struct { - external mach_port_status_t mpie_status; + /// ! + /// @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_msgcount_t() - external int mpie_boost_cnt; + /// ! + /// @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.Array.multi([6]) - external ffi.Array reserved; -} + /// ! + /// @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); + } -typedef mach_port_status_t = mach_port_status; + /// ! + /// @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 mach_port_guard_info extends ffi.Struct { - @ffi.Uint64() - external int mpgi_guard; -} + /// ! + /// @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); + } -class mach_port_qos extends ffi.Opaque {} + /// ! + /// @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 mach_service_port_info extends ffi.Struct { - @ffi.Array.multi([255]) - external ffi.Array mspi_string_name; + /// ! + /// @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.Uint8() - external int mspi_domain_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_327(_id, _lib._sel_attribution1); + } -class mach_port_options extends ffi.Struct { - @ffi.Uint32() - external int flags; + /// ! + /// @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); + } - external mach_port_limits_t mpl; -} + /// ! + /// @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); + } -typedef mach_port_limits_t = mach_port_limits; + /// ! + /// @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); + } -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; -} + /// ! + /// @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); + } -class __CFRunLoop extends ffi.Opaque {} + /// ! + /// @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); + } -class __CFRunLoopSource extends ffi.Opaque {} + /// ! + /// @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); + } -class __CFRunLoopObserver extends ffi.Opaque {} + /// ! + /// @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 __CFRunLoopTimer extends ffi.Opaque {} + 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); + } -abstract class CFRunLoopRunResult { - static const int kCFRunLoopRunFinished = 1; - static const int kCFRunLoopRunStopped = 2; - static const int kCFRunLoopRunTimedOut = 3; - static const int kCFRunLoopRunHandledSource = 4; + 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); + } } -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; +/// ! +/// @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 CFRunLoopMode = CFStringRef; -typedef CFRunLoopRef = ffi.Pointer<__CFRunLoop>; -typedef CFRunLoopSourceRef = ffi.Pointer<__CFRunLoopSource>; -typedef CFRunLoopObserverRef = ffi.Pointer<__CFRunLoopObserver>; -typedef CFRunLoopTimerRef = ffi.Pointer<__CFRunLoopTimer>; +typedef NSTimeInterval = ffi.Double; -class CFRunLoopSourceContext extends ffi.Struct { - @CFIndex() - external int version; +/// ! +/// @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; - external ffi.Pointer info; + /// Voice over IP control traffic + static const int NSURLNetworkServiceTypeVoIP = 1; - external ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>> retain; + /// Video traffic + static const int NSURLNetworkServiceTypeVideo = 2; - external ffi - .Pointer)>> - release; + /// Background traffic + static const int NSURLNetworkServiceTypeBackground = 3; - external ffi.Pointer< - ffi.NativeFunction)>> - copyDescription; + /// Voice data + static const int NSURLNetworkServiceTypeVoice = 4; - external ffi.Pointer< - ffi.NativeFunction< - Boolean Function(ffi.Pointer, ffi.Pointer)>> - equal; + /// Responsive data + static const int NSURLNetworkServiceTypeResponsiveData = 6; - external ffi.Pointer< - ffi.NativeFunction)>> hash; + /// Multimedia Audio/Video Streaming + static const int NSURLNetworkServiceTypeAVStreaming = 8; - external ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, CFRunLoopRef, CFRunLoopMode)>> schedule; + /// Responsive Multimedia Audio/Video + static const int NSURLNetworkServiceTypeResponsiveAV = 9; - external ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, CFRunLoopRef, CFRunLoopMode)>> cancel; + /// Call Signaling + static const int NSURLNetworkServiceTypeCallSignaling = 11; +} - external ffi - .Pointer)>> - perform; +/// ! +/// @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 CFRunLoopSourceContext1 extends ffi.Struct { - @CFIndex() - external int version; +class NSInputStream extends NSStream { + NSInputStream._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); - external ffi.Pointer info; + /// 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); + } - external ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>> retain; + /// 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 ffi - .Pointer)>> - 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); + } - external ffi.Pointer< - ffi.NativeFunction)>> - copyDescription; + int read_maxLength_(ffi.Pointer buffer, int len) { + return _lib._objc_msgSend_332(_id, _lib._sel_read_maxLength_1, buffer, len); + } - external ffi.Pointer< - ffi.NativeFunction< - Boolean Function(ffi.Pointer, ffi.Pointer)>> - equal; + bool getBuffer_length_( + ffi.Pointer> buffer, ffi.Pointer len) { + return _lib._objc_msgSend_337( + _id, _lib._sel_getBuffer_length_1, buffer, len); + } - external ffi.Pointer< - ffi.NativeFunction)>> hash; + bool get hasBytesAvailable { + return _lib._objc_msgSend_11(_id, _lib._sel_hasBytesAvailable1); + } - external ffi.Pointer< - ffi.NativeFunction)>> getPort; + 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); + } - external ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, CFIndex, - CFAllocatorRef, ffi.Pointer)>> perform; -} + 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); + } -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; + 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); + } -class CFRunLoopObserverContext extends ffi.Struct { - @CFIndex() - external int version; + 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); + } - external ffi.Pointer info; + 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); + } - external ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>> retain; + 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); + } - external ffi - .Pointer)>> - release; + 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); + } - external ffi.Pointer< - ffi.NativeFunction)>> - copyDescription; -} + 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); + } -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); -} + 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); + } -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); -} + 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); + } -void _ObjCBlock21_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, CFRunLoopObserverRef arg0, int arg1) { - return _ObjCBlock21_closureRegistry[block.ref.target.address]!(arg0, arg1); + 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 ObjCBlock21 extends _ObjCBlockBase { - ObjCBlock21._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, 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); - /// 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; + /// 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); + } - /// 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); + /// 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); } - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + /// 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); + } -class CFRunLoopTimerContext extends ffi.Struct { - @CFIndex() - external int version; + void open() { + return _lib._objc_msgSend_1(_id, _lib._sel_open1); + } - external ffi.Pointer info; + void close() { + return _lib._objc_msgSend_1(_id, _lib._sel_close1); + } - external ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>> retain; + 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)>> - release; + set delegate(NSObject? value) { + _lib._objc_msgSend_328( + _id, _lib._sel_setDelegate_1, value?._id ?? ffi.nullptr); + } - external ffi.Pointer< - ffi.NativeFunction)>> - copyDescription; -} + NSObject propertyForKey_(NSStreamPropertyKey key) { + final _ret = _lib._objc_msgSend_42(_id, _lib._sel_propertyForKey_1, key); + return NSObject._(_ret, _lib, retain: true, release: true); + } -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); -} + bool setProperty_forKey_(NSObject property, NSStreamPropertyKey key) { + return _lib._objc_msgSend_199( + _id, _lib._sel_setProperty_forKey_1, property._id, key); + } -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 scheduleInRunLoop_forMode_(NSRunLoop? aRunLoop, NSRunLoopMode mode) { + return _lib._objc_msgSend_329(_id, _lib._sel_scheduleInRunLoop_forMode_1, + aRunLoop?._id ?? ffi.nullptr, mode); + } -void _ObjCBlock22_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, CFRunLoopTimerRef arg0) { - return _ObjCBlock22_closureRegistry[block.ref.target.address]!(arg0); -} + void removeFromRunLoop_forMode_(NSRunLoop? aRunLoop, NSRunLoopMode mode) { + return _lib._objc_msgSend_329(_id, _lib._sel_removeFromRunLoop_forMode_1, + aRunLoop?._id ?? ffi.nullptr, mode); + } -class ObjCBlock22 extends _ObjCBlockBase { - ObjCBlock22._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); + int get streamStatus { + return _lib._objc_msgSend_330(_id, _lib._sel_streamStatus1); + } - /// 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; + NSError? get streamError { + final _ret = _lib._objc_msgSend_331(_id, _lib._sel_streamError1); + return _ret.address == 0 + ? null + : NSError._(_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); + 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); } - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + 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); + } -class __CFSocket extends ffi.Opaque {} + 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); + } -abstract class CFSocketError { - static const int kCFSocketSuccess = 0; - static const int kCFSocketError = -1; - static const int kCFSocketTimeout = -2; + 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); + } } -class CFSocketSignature extends ffi.Struct { - @SInt32() - external int protocolFamily; +typedef NSStreamPropertyKey = ffi.Pointer; - @SInt32() - external int socketType; +class NSRunLoop extends _ObjCWrapper { + NSRunLoop._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); - @SInt32() - external int protocol; + /// 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); + } - external CFDataRef address; + /// 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); + } } -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; +typedef NSRunLoopMode = ffi.Pointer; - external ffi.Pointer< - ffi.NativeFunction)>> - copyDescription; +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; } -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; -} +class NSOutputStream extends NSStream { + NSOutputStream._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -typedef gid_t = __darwin_gid_t; -typedef __darwin_gid_t = __uint32_t; -typedef useconds_t = __darwin_useconds_t; -typedef __darwin_useconds_t = __uint32_t; + /// 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); + } -class fssearchblock extends ffi.Opaque {} + /// 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); + } -class searchstate extends ffi.Opaque {} + /// 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); + } -class flock extends ffi.Struct { - @off_t() - external int l_start; + int write_maxLength_(ffi.Pointer buffer, int len) { + return _lib._objc_msgSend_332( + _id, _lib._sel_write_maxLength_1, buffer, len); + } - @off_t() - external int l_len; + bool get hasSpaceAvailable { + return _lib._objc_msgSend_11(_id, _lib._sel_hasSpaceAvailable1); + } - @pid_t() - external int l_pid; + NSOutputStream initToMemory() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_initToMemory1); + return NSOutputStream._(_ret, _lib, retain: true, release: true); + } - @ffi.Short() - external int l_type; + 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); + } - @ffi.Short() - external int l_whence; -} + 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); + } -class flocktimeout extends ffi.Struct { - external flock fl; + 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); + } - external timespec timeout; -} + 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); + } -class radvisory extends ffi.Struct { - @off_t() - external int ra_offset; + 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); + } - @ffi.Int() - external int ra_count; -} + 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); + } -class fsignatures extends ffi.Struct { - @off_t() - external int fs_file_start; + 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); + } - external ffi.Pointer fs_blob_start; + 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); + } - @ffi.Size() - external int fs_blob_size; + 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); + } - @ffi.Size() - external int fs_fsignatures_size; + 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); + } - @ffi.Array.multi([20]) - external ffi.Array fs_cdhash; + 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); + } - @ffi.Int() - external int fs_hash_type; + 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 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 NSHost extends _ObjCWrapper { + NSHost._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -class fchecklv extends ffi.Struct { - @off_t() - external int lv_file_start; + /// 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); + } - @ffi.Size() - external int lv_error_message_size; + /// 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); + } - external ffi.Pointer lv_error_message; + /// 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 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 NSDate extends NSObject { + NSDate._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -class fstore extends ffi.Struct { - @ffi.UnsignedInt() - external int fst_flags; + /// 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.Int() - external int fst_posmode; + /// 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); + } - @off_t() - external int fst_offset; + /// 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); + } - @off_t() - external int fst_length; + double get timeIntervalSinceReferenceDate { + return _lib._objc_msgSend_85( + _id, _lib._sel_timeIntervalSinceReferenceDate1); + } - @off_t() - external int fst_bytesalloc; -} + @override + NSDate init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSDate._(_ret, _lib, retain: true, release: true); + } -class fpunchhole extends ffi.Struct { - @ffi.UnsignedInt() - external int fp_flags; + NSDate initWithTimeIntervalSinceReferenceDate_(double ti) { + final _ret = _lib._objc_msgSend_342( + _id, _lib._sel_initWithTimeIntervalSinceReferenceDate_1, ti); + return NSDate._(_ret, _lib, retain: true, release: true); + } - @ffi.UnsignedInt() - external int reserved; + 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); + } - @off_t() - external int fp_offset; + double timeIntervalSinceDate_(NSDate? anotherDate) { + return _lib._objc_msgSend_343(_id, _lib._sel_timeIntervalSinceDate_1, + anotherDate?._id ?? ffi.nullptr); + } - @off_t() - external int fp_length; -} + double get timeIntervalSinceNow { + return _lib._objc_msgSend_85(_id, _lib._sel_timeIntervalSinceNow1); + } -class ftrimactivefile extends ffi.Struct { - @off_t() - external int fta_offset; + double get timeIntervalSince1970 { + return _lib._objc_msgSend_85(_id, _lib._sel_timeIntervalSince19701); + } - @off_t() - external int fta_length; -} + NSObject addTimeInterval_(double seconds) { + final _ret = + _lib._objc_msgSend_342(_id, _lib._sel_addTimeInterval_1, seconds); + return NSObject._(_ret, _lib, retain: true, release: true); + } -class fspecread extends ffi.Struct { - @ffi.UnsignedInt() - external int fsr_flags; + NSDate dateByAddingTimeInterval_(double ti) { + final _ret = + _lib._objc_msgSend_342(_id, _lib._sel_dateByAddingTimeInterval_1, ti); + return NSDate._(_ret, _lib, retain: true, release: true); + } - @ffi.UnsignedInt() - external int reserved; + 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); + } - @off_t() - external int fsr_offset; + 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); + } - @off_t() - external int fsr_length; -} + int compare_(NSDate? other) { + return _lib._objc_msgSend_345( + _id, _lib._sel_compare_1, other?._id ?? ffi.nullptr); + } -class fbootstraptransfer extends ffi.Struct { - @off_t() - external int fbt_offset; + bool isEqualToDate_(NSDate? otherDate) { + return _lib._objc_msgSend_346( + _id, _lib._sel_isEqualToDate_1, otherDate?._id ?? ffi.nullptr); + } - @ffi.Size() - external int fbt_length; + 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); + } - external ffi.Pointer fbt_buffer; -} + 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.Packed(4) -class log2phys extends ffi.Struct { - @ffi.UnsignedInt() - external int l2p_flags; + 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); + } - @off_t() - external int l2p_contigbytes; + 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); + } - @off_t() - external int l2p_devoffset; -} + 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); + } -class _filesec extends ffi.Opaque {} + 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); + } -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 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); + } -typedef filesec_t = ffi.Pointer<_filesec>; + 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); + } -abstract class os_clockid_t { - static const int OS_CLOCK_MACH_ABSOLUTE_TIME = 32; -} + 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); + } -class os_workgroup_attr_opaque_s extends ffi.Struct { - @ffi.Uint32() - external int sig; + 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); + } - @ffi.Array.multi([60]) - external ffi.Array opaque; -} + NSDate initWithTimeIntervalSinceNow_(double secs) { + final _ret = _lib._objc_msgSend_342( + _id, _lib._sel_initWithTimeIntervalSinceNow_1, secs); + return NSDate._(_ret, _lib, retain: true, release: true); + } -class os_workgroup_interval_data_opaque_s extends ffi.Struct { - @ffi.Uint32() - external int sig; + NSDate initWithTimeIntervalSince1970_(double secs) { + final _ret = _lib._objc_msgSend_342( + _id, _lib._sel_initWithTimeIntervalSince1970_1, secs); + return NSDate._(_ret, _lib, retain: true, release: true); + } - @ffi.Array.multi([56]) - external ffi.Array opaque; -} + 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); + } -class os_workgroup_join_token_opaque_s extends ffi.Struct { - @ffi.Uint32() - external int sig; + 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.Array.multi([36]) - external ffi.Array opaque; + 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 OS_os_workgroup extends OS_object { - OS_os_workgroup._(ffi.Pointer id, NativeCupertinoHttp lib, +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 [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, + /// 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 [OS_os_workgroup] that wraps the given raw object pointer. - static OS_os_workgroup castFromPointer( + /// 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 OS_os_workgroup._(other, lib, retain: retain, release: release); + return NSURLSessionDataTask._(other, lib, retain: retain, release: release); } - /// Returns whether [obj] is an instance of [OS_os_workgroup]. + /// 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_OS_os_workgroup1); + obj._lib._class_NSURLSessionDataTask1); } @override - OS_os_workgroup init() { + NSURLSessionDataTask init() { final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return OS_os_workgroup._(_ret, _lib, retain: true, release: true); + return NSURLSessionDataTask._(_ret, _lib, retain: true, release: true); } - static OS_os_workgroup new1(NativeCupertinoHttp _lib) { + static NSURLSessionDataTask 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); + _lib._objc_msgSend_2(_lib._class_NSURLSessionDataTask1, _lib._sel_new1); + return NSURLSessionDataTask._(_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); + 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 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, +/// 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 [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, + /// 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 [OS_os_workgroup_interval] that wraps the given raw object pointer. - static OS_os_workgroup_interval 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 OS_os_workgroup_interval._(other, lib, - retain: retain, release: release); + return NSURLSessionTask._(other, lib, retain: retain, release: release); } - /// Returns whether [obj] is an instance of [OS_os_workgroup_interval]. + /// 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_OS_os_workgroup_interval1); + obj._lib._class_NSURLSessionTask1); } - @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); + /// 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); } - 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); + /// 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); } - 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); + /// 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); } -} - -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); + /// 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); } - /// 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); + /// 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); } - /// 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); + /// 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); } - @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); + /// 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); } - 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); + /// 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); } - 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); + /// 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); } -} -typedef os_workgroup_parallel_t = ffi.Pointer; -typedef os_workgroup_attr_t = ffi.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 _lib._objc_msgSend_358( + _id, _lib._sel_countOfBytesClientExpectsToSend1); + } -class time_value extends ffi.Struct { - @integer_t() - external int seconds; + /// 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); + } - @integer_t() - external int microseconds; -} + int get countOfBytesClientExpectsToReceive { + return _lib._objc_msgSend_358( + _id, _lib._sel_countOfBytesClientExpectsToReceive1); + } -typedef integer_t = ffi.Int; + set countOfBytesClientExpectsToReceive(int value) { + _lib._objc_msgSend_359( + _id, _lib._sel_setCountOfBytesClientExpectsToReceive_1, value); + } -class mach_timespec extends ffi.Struct { - @ffi.UnsignedInt() - external int tv_sec; + /// number of body bytes already sent + int get countOfBytesSent { + return _lib._objc_msgSend_358(_id, _lib._sel_countOfBytesSent1); + } - @clock_res_t() - external int tv_nsec; -} + /// number of body bytes already received + int get countOfBytesReceived { + return _lib._objc_msgSend_358(_id, _lib._sel_countOfBytesReceived1); + } -typedef clock_res_t = ffi.Int; -typedef dispatch_time_t = ffi.Uint64; + /// 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); + } -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; -} + /// 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); + } -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); -} + /// 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); + } -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); -} + /// 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); + } -void _ObjCBlock23_closureTrampoline(ffi.Pointer<_ObjCBlock> block, int arg0) { - return _ObjCBlock23_closureRegistry[block.ref.target.address]!(arg0); -} + /// -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); + } -class ObjCBlock23 extends _ObjCBlockBase { - ObjCBlock23._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); + /// The current state of the task within the session. + int get state { + return _lib._objc_msgSend_368(_id, _lib._sel_state1); + } - /// 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; + /// 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); + } - /// 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); + /// 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.Pointer<_ObjCBlock> get pointer => _id; -} + void resume() { + return _lib._objc_msgSend_1(_id, _lib._sel_resume1); + } -class dispatch_queue_s extends ffi.Opaque {} + /// 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 dispatch_queue_global_t = ffi.Pointer; -typedef uintptr_t = ffi.UnsignedLong; + /// 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); + } -class dispatch_queue_attr_s extends ffi.Opaque {} + /// 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); + } -typedef dispatch_queue_attr_t = ffi.Pointer; + /// 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); + } -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; -} + @override + NSURLSessionTask init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLSessionTask._(_ret, _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; + 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 mach_msg_type_descriptor_t extends ffi.Opaque {} +class NSProgress extends NSObject { + NSProgress._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -class mach_msg_port_descriptor_t extends ffi.Opaque {} + /// 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); + } -class mach_msg_ool_descriptor32_t extends ffi.Opaque {} + /// 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); + } -class mach_msg_ool_descriptor64_t extends ffi.Opaque {} + /// 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 mach_msg_ool_descriptor_t extends ffi.Opaque {} + 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); + } -class mach_msg_ool_ports_descriptor32_t extends ffi.Opaque {} + 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); + } -class mach_msg_ool_ports_descriptor64_t extends ffi.Opaque {} + 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); + } -class mach_msg_ool_ports_descriptor_t extends ffi.Opaque {} + 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); + } -class mach_msg_guarded_port_descriptor32_t extends ffi.Opaque {} + 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); + } -class mach_msg_guarded_port_descriptor64_t extends ffi.Opaque {} + void becomeCurrentWithPendingUnitCount_(int unitCount) { + return _lib._objc_msgSend_355( + _id, _lib._sel_becomeCurrentWithPendingUnitCount_1, unitCount); + } -class mach_msg_guarded_port_descriptor_t extends ffi.Opaque {} + void performAsCurrentWithPendingUnitCount_usingBlock_( + int unitCount, ObjCBlock work) { + return _lib._objc_msgSend_356( + _id, + _lib._sel_performAsCurrentWithPendingUnitCount_usingBlock_1, + unitCount, + work._id); + } -class mach_msg_descriptor_t extends ffi.Opaque {} + void resignCurrent() { + return _lib._objc_msgSend_1(_id, _lib._sel_resignCurrent1); + } -class mach_msg_body_t extends ffi.Struct { - @mach_msg_size_t() - external int msgh_descriptor_count; -} + void addChild_withPendingUnitCount_(NSProgress? child, int inUnitCount) { + return _lib._objc_msgSend_357( + _id, + _lib._sel_addChild_withPendingUnitCount_1, + child?._id ?? ffi.nullptr, + inUnitCount); + } -typedef mach_msg_size_t = natural_t; + int get totalUnitCount { + return _lib._objc_msgSend_358(_id, _lib._sel_totalUnitCount1); + } -class mach_msg_header_t extends ffi.Struct { - @mach_msg_bits_t() - external int msgh_bits; + set totalUnitCount(int value) { + _lib._objc_msgSend_359(_id, _lib._sel_setTotalUnitCount_1, value); + } - @mach_msg_size_t() - external int msgh_size; + int get completedUnitCount { + return _lib._objc_msgSend_358(_id, _lib._sel_completedUnitCount1); + } - @mach_port_t() - external int msgh_remote_port; + set completedUnitCount(int value) { + _lib._objc_msgSend_359(_id, _lib._sel_setCompletedUnitCount_1, value); + } - @mach_port_t() - external int msgh_local_port; + 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); + } - @mach_port_name_t() - external int msgh_voucher_port; + set localizedDescription(NSString? value) { + _lib._objc_msgSend_360( + _id, _lib._sel_setLocalizedDescription_1, value?._id ?? ffi.nullptr); + } - @mach_msg_id_t() - external int msgh_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); + } -typedef mach_msg_bits_t = ffi.UnsignedInt; -typedef mach_port_name_t = natural_t; -typedef mach_msg_id_t = integer_t; + set localizedAdditionalDescription(NSString? value) { + _lib._objc_msgSend_360(_id, _lib._sel_setLocalizedAdditionalDescription_1, + value?._id ?? ffi.nullptr); + } -class mach_msg_base_t extends ffi.Struct { - external mach_msg_header_t header; + bool get cancellable { + return _lib._objc_msgSend_11(_id, _lib._sel_isCancellable1); + } - external mach_msg_body_t body; -} + set cancellable(bool value) { + _lib._objc_msgSend_361(_id, _lib._sel_setCancellable_1, value); + } -class mach_msg_trailer_t extends ffi.Struct { - @mach_msg_trailer_type_t() - external int msgh_trailer_type; + bool get pausable { + return _lib._objc_msgSend_11(_id, _lib._sel_isPausable1); + } - @mach_msg_trailer_size_t() - external int msgh_trailer_size; -} + set pausable(bool value) { + _lib._objc_msgSend_361(_id, _lib._sel_setPausable_1, value); + } -typedef mach_msg_trailer_type_t = ffi.UnsignedInt; -typedef mach_msg_trailer_size_t = ffi.UnsignedInt; + bool get cancelled { + return _lib._objc_msgSend_11(_id, _lib._sel_isCancelled1); + } -class mach_msg_seqno_trailer_t extends ffi.Struct { - @mach_msg_trailer_type_t() - external int msgh_trailer_type; + bool get paused { + return _lib._objc_msgSend_11(_id, _lib._sel_isPaused1); + } - @mach_msg_trailer_size_t() - external int msgh_trailer_size; + ObjCBlock get cancellationHandler { + final _ret = _lib._objc_msgSend_362(_id, _lib._sel_cancellationHandler1); + return ObjCBlock._(_ret, _lib); + } - @mach_port_seqno_t() - external int msgh_seqno; -} + set cancellationHandler(ObjCBlock value) { + _lib._objc_msgSend_363(_id, _lib._sel_setCancellationHandler_1, value._id); + } -class security_token_t extends ffi.Struct { - @ffi.Array.multi([2]) - external ffi.Array val; -} + ObjCBlock get pausingHandler { + final _ret = _lib._objc_msgSend_362(_id, _lib._sel_pausingHandler1); + return ObjCBlock._(_ret, _lib); + } -class mach_msg_security_trailer_t extends ffi.Struct { - @mach_msg_trailer_type_t() - external int msgh_trailer_type; + set pausingHandler(ObjCBlock value) { + _lib._objc_msgSend_363(_id, _lib._sel_setPausingHandler_1, value._id); + } - @mach_msg_trailer_size_t() - external int msgh_trailer_size; + ObjCBlock get resumingHandler { + final _ret = _lib._objc_msgSend_362(_id, _lib._sel_resumingHandler1); + return ObjCBlock._(_ret, _lib); + } - @mach_port_seqno_t() - external int msgh_seqno; + set resumingHandler(ObjCBlock value) { + _lib._objc_msgSend_363(_id, _lib._sel_setResumingHandler_1, value._id); + } - external security_token_t msgh_sender; -} + void setUserInfoObject_forKey_( + NSObject objectOrNil, NSProgressUserInfoKey key) { + return _lib._objc_msgSend_189( + _id, _lib._sel_setUserInfoObject_forKey_1, objectOrNil._id, key); + } -class audit_token_t extends ffi.Struct { - @ffi.Array.multi([8]) - external ffi.Array val; -} + bool get indeterminate { + return _lib._objc_msgSend_11(_id, _lib._sel_isIndeterminate1); + } -class mach_msg_audit_trailer_t extends ffi.Struct { - @mach_msg_trailer_type_t() - external int msgh_trailer_type; + double get fractionCompleted { + return _lib._objc_msgSend_85(_id, _lib._sel_fractionCompleted1); + } - @mach_msg_trailer_size_t() - external int msgh_trailer_size; + bool get finished { + return _lib._objc_msgSend_11(_id, _lib._sel_isFinished1); + } - @mach_port_seqno_t() - external int msgh_seqno; + void cancel() { + return _lib._objc_msgSend_1(_id, _lib._sel_cancel1); + } - external security_token_t msgh_sender; + void pause() { + return _lib._objc_msgSend_1(_id, _lib._sel_pause1); + } - external audit_token_t msgh_audit; -} + void resume() { + return _lib._objc_msgSend_1(_id, _lib._sel_resume1); + } -@ffi.Packed(4) -class mach_msg_context_trailer_t extends ffi.Struct { - @mach_msg_trailer_type_t() - external int msgh_trailer_type; + 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); + } - @mach_msg_trailer_size_t() - external int msgh_trailer_size; + NSProgressKind get kind { + return _lib._objc_msgSend_32(_id, _lib._sel_kind1); + } - @mach_port_seqno_t() - external int msgh_seqno; + set kind(NSProgressKind value) { + _lib._objc_msgSend_360(_id, _lib._sel_setKind_1, value); + } - external security_token_t msgh_sender; + 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); + } - external audit_token_t msgh_audit; + set estimatedTimeRemaining(NSNumber? value) { + _lib._objc_msgSend_364( + _id, _lib._sel_setEstimatedTimeRemaining_1, value?._id ?? ffi.nullptr); + } - @mach_port_context_t() - external int msgh_context; -} + 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); + } -typedef mach_port_context_t = vm_offset_t; -typedef vm_offset_t = uintptr_t; + set throughput(NSNumber? value) { + _lib._objc_msgSend_364( + _id, _lib._sel_setThroughput_1, value?._id ?? ffi.nullptr); + } -class msg_labels_t extends ffi.Struct { - @mach_port_name_t() - external int sender; -} + NSProgressFileOperationKind get fileOperationKind { + return _lib._objc_msgSend_32(_id, _lib._sel_fileOperationKind1); + } -@ffi.Packed(4) -class mach_msg_mac_trailer_t extends ffi.Struct { - @mach_msg_trailer_type_t() - external int msgh_trailer_type; + set fileOperationKind(NSProgressFileOperationKind value) { + _lib._objc_msgSend_360(_id, _lib._sel_setFileOperationKind_1, value); + } - @mach_msg_trailer_size_t() - external int msgh_trailer_size; + 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); + } - @mach_port_seqno_t() - external int msgh_seqno; + set fileURL(NSURL? value) { + _lib._objc_msgSend_365( + _id, _lib._sel_setFileURL_1, value?._id ?? ffi.nullptr); + } - external security_token_t msgh_sender; + 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); + } - external audit_token_t msgh_audit; + set fileTotalCount(NSNumber? value) { + _lib._objc_msgSend_364( + _id, _lib._sel_setFileTotalCount_1, value?._id ?? ffi.nullptr); + } - @mach_port_context_t() - external int msgh_context; + 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); + } - @mach_msg_filter_id() - external int msgh_ad; + set fileCompletedCount(NSNumber? value) { + _lib._objc_msgSend_364( + _id, _lib._sel_setFileCompletedCount_1, value?._id ?? ffi.nullptr); + } - external msg_labels_t msgh_labels; -} + void publish() { + return _lib._objc_msgSend_1(_id, _lib._sel_publish1); + } -typedef mach_msg_filter_id = ffi.Int; + void unpublish() { + return _lib._objc_msgSend_1(_id, _lib._sel_unpublish1); + } -class mach_msg_empty_send_t extends ffi.Struct { - external mach_msg_header_t header; -} + 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); + } -class mach_msg_empty_rcv_t extends ffi.Struct { - external mach_msg_header_t header; + static void removeSubscriber_(NativeCupertinoHttp _lib, NSObject subscriber) { + return _lib._objc_msgSend_200( + _lib._class_NSProgress1, _lib._sel_removeSubscriber_1, subscriber._id); + } - external mach_msg_trailer_t trailer; -} + bool get old { + return _lib._objc_msgSend_11(_id, _lib._sel_isOld1); + } -class mach_msg_empty_t extends ffi.Union { - external mach_msg_empty_send_t send; + 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 mach_msg_empty_rcv_t rcv; + 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 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) { +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< - ffi.Bool Function(dispatch_data_t arg0, ffi.Size arg1, - ffi.Pointer arg2, ffi.Size arg3)>>() + NSProgressUnpublishingHandler Function( + ffi.Pointer arg0)>>() .asFunction< - bool Function(dispatch_data_t arg0, int arg1, - ffi.Pointer arg2, int arg3)>()(arg0, arg1, arg2, arg3); + NSProgressUnpublishingHandler Function( + ffi.Pointer arg0)>()(arg0); } -final _ObjCBlock24_closureRegistry = {}; -int _ObjCBlock24_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock24_registerClosure(Function fn) { - final id = ++_ObjCBlock24_closureRegistryIndex; - _ObjCBlock24_closureRegistry[id] = fn; +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); } -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); +NSProgressUnpublishingHandler _ObjCBlock18_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { + return _ObjCBlock18_closureRegistry[block.ref.target.address]!(arg0); } -class ObjCBlock24 extends _ObjCBlockBase { - ObjCBlock24._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) +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. - ObjCBlock24.fromFunctionPointer( + ObjCBlock18.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< ffi.NativeFunction< - ffi.Bool Function(dispatch_data_t arg0, ffi.Size arg1, - ffi.Pointer arg2, ffi.Size arg3)>> + NSProgressUnpublishingHandler Function( + ffi.Pointer arg0)>> 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) + 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. - ObjCBlock24.fromFunction( - NativeCupertinoHttp lib, - bool Function(dispatch_data_t arg0, int arg1, ffi.Pointer arg2, - int arg3) - fn) + ObjCBlock18.fromFunction(NativeCupertinoHttp lib, + NSProgressUnpublishingHandler Function(ffi.Pointer arg0) fn) : this._( lib._newBlock1( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( + NSProgressUnpublishingHandler Function( ffi.Pointer<_ObjCBlock> block, - dispatch_data_t arg0, - ffi.Size arg1, - ffi.Pointer arg2, - ffi.Size arg3)>( - _ObjCBlock24_closureTrampoline, false) + ffi.Pointer arg0)>( + _ObjCBlock18_closureTrampoline) .cast(), - _ObjCBlock24_registerClosure(fn)), + _ObjCBlock18_registerClosure(fn)), lib); static ffi.Pointer? _dartFuncTrampoline; - bool call( - dispatch_data_t arg0, int arg1, ffi.Pointer arg2, int arg3) { + NSProgressUnpublishingHandler call(ffi.Pointer arg0) { return _id.ref.invoke .cast< ffi.NativeFunction< - ffi.Bool Function( + NSProgressUnpublishingHandler Function( ffi.Pointer<_ObjCBlock> block, - dispatch_data_t arg0, - ffi.Size arg1, - ffi.Pointer arg2, - ffi.Size arg3)>>() + ffi.Pointer arg0)>>() .asFunction< - bool Function( + NSProgressUnpublishingHandler Function( ffi.Pointer<_ObjCBlock> block, - dispatch_data_t arg0, - int arg1, - ffi.Pointer arg2, - int arg3)>()(_id, arg0, arg1, arg2, arg3); + ffi.Pointer arg0)>()(_id, arg0); } +} - ffi.Pointer<_ObjCBlock> get pointer => _id; +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; } -typedef dispatch_fd_t = ffi.Int; -void _ObjCBlock25_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, dispatch_data_t arg0, int arg1) { +void _ObjCBlock19_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { return block.ref.target .cast< - ffi.NativeFunction< - ffi.Void Function(dispatch_data_t arg0, ffi.Int arg1)>>() - .asFunction()(arg0, arg1); + ffi.NativeFunction arg0)>>() + .asFunction arg0)>()(arg0); } -final _ObjCBlock25_closureRegistry = {}; -int _ObjCBlock25_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock25_registerClosure(Function fn) { - final id = ++_ObjCBlock25_closureRegistryIndex; - _ObjCBlock25_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 _ObjCBlock25_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, dispatch_data_t arg0, int arg1) { - return _ObjCBlock25_closureRegistry[block.ref.target.address]!(arg0, arg1); +void _ObjCBlock19_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { + return _ObjCBlock19_closureRegistry[block.ref.target.address]!(arg0); } -class ObjCBlock25 extends _ObjCBlockBase { - ObjCBlock25._(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. - ObjCBlock25.fromFunctionPointer( + ObjCBlock19.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(dispatch_data_t arg0, ffi.Int arg1)>> + ffi + .NativeFunction arg0)>> ptr) : this._( lib._newBlock1( _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - dispatch_data_t arg0, - ffi.Int arg1)>(_ObjCBlock25_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. - ObjCBlock25.fromFunction( - NativeCupertinoHttp lib, void Function(dispatch_data_t arg0, int arg1) 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, - dispatch_data_t arg0, - ffi.Int arg1)>(_ObjCBlock25_closureTrampoline) + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>( + _ObjCBlock19_closureTrampoline) .cast(), - _ObjCBlock25_registerClosure(fn)), + _ObjCBlock19_registerClosure(fn)), lib); static ffi.Pointer? _dartFuncTrampoline; - void call(dispatch_data_t arg0, int arg1) { + void call(ffi.Pointer arg0) { return _id.ref.invoke .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - dispatch_data_t arg0, ffi.Int arg1)>>() + ffi.Pointer arg0)>>() .asFunction< - void Function(ffi.Pointer<_ObjCBlock> block, dispatch_data_t arg0, - int arg1)>()(_id, arg0, arg1); + void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>()(_id, arg0); } - - 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); -} +class NSNotification extends NSObject { + NSNotification._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -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); -} + /// 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); + } -void _ObjCBlock26_closureTrampoline(ffi.Pointer<_ObjCBlock> block, int arg0) { - return _ObjCBlock26_closureRegistry[block.ref.target.address]!(arg0); -} + /// 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 ObjCBlock26 extends _ObjCBlockBase { - ObjCBlock26._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, 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); + } - /// 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; + NSNotificationName get name { + return _lib._objc_msgSend_32(_id, _lib._sel_name1); + } - /// 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); + NSObject get object { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_object1); + return NSObject._(_ret, _lib, retain: true, release: true); } - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + 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); + } -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); -} + 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); + } -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); -} + 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 _ObjCBlock27_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, bool arg0, dispatch_data_t arg1, int arg2) { - return _ObjCBlock27_closureRegistry[block.ref.target.address]!( - arg0, arg1, arg2); -} + 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 ObjCBlock27 extends _ObjCBlockBase { - ObjCBlock27._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, 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); + } - /// 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; + @override + NSNotification init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSNotification._(_ret, _lib, retain: true, release: true); + } - /// 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); + 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); } - ffi.Pointer<_ObjCBlock> get pointer => _id; + 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 dispatch_io_close_flags_t = ffi.UnsignedLong; -typedef dispatch_io_interval_flags_t = ffi.UnsignedLong; -typedef dispatch_workloop_t = ffi.Pointer; +typedef NSNotificationName = ffi.Pointer; -class CFStreamError extends ffi.Struct { - @CFIndex() - external int domain; +class NSNotificationCenter extends NSObject { + NSNotificationCenter._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); - @SInt32() - external int error; -} + /// 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 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; -} + /// 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 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; -} + /// 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); + } -class CFStreamClientContext extends ffi.Struct { - @CFIndex() - external int version; + 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); + } - external ffi.Pointer info; + 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); + } - external ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>> retain; + void postNotification_(NSNotification? notification) { + return _lib._objc_msgSend_376( + _id, _lib._sel_postNotification_1, notification?._id ?? ffi.nullptr); + } - external ffi - .Pointer)>> - release; + void postNotificationName_object_( + NSNotificationName aName, NSObject anObject) { + return _lib._objc_msgSend_377( + _id, _lib._sel_postNotificationName_object_1, aName, anObject._id); + } - external ffi.Pointer< - ffi.NativeFunction)>> - copyDescription; -} + 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); + } -class __CFReadStream extends ffi.Opaque {} + void removeObserver_(NSObject observer) { + return _lib._objc_msgSend_200( + _id, _lib._sel_removeObserver_1, observer._id); + } -class __CFWriteStream extends ffi.Opaque {} + 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); + } -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)>>; + 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); + } -abstract class CFStreamErrorDomain { - static const int kCFStreamErrorDomainCustom = -1; - static const int kCFStreamErrorDomainPOSIX = 1; - static const int kCFStreamErrorDomainMacOSStatus = 2; -} + 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); + } -abstract class CFPropertyListMutabilityOptions { - static const int kCFPropertyListImmutable = 0; - static const int kCFPropertyListMutableContainers = 1; - static const int kCFPropertyListMutableContainersAndLeaves = 2; + 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); + } } -abstract class CFPropertyListFormat { - static const int kCFPropertyListOpenStepFormat = 1; - static const int kCFPropertyListXMLFormat_v1_0 = 100; - static const int kCFPropertyListBinaryFormat_v1_0 = 200; -} +class NSOperationQueue extends NSObject { + NSOperationQueue._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -class CFSetCallBacks 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 CFSetRetainCallBack retain; + /// 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 CFSetReleaseCallBack 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); + } - external CFSetCopyDescriptionCallBack copyDescription; + /// @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); + } - external CFSetEqualCallBack equal; + void addOperation_(NSOperation? op) { + return _lib._objc_msgSend_380( + _id, _lib._sel_addOperation_1, op?._id ?? ffi.nullptr); + } - external CFSetHashCallBack hash; -} + void addOperations_waitUntilFinished_(NSArray? ops, bool wait) { + return _lib._objc_msgSend_386( + _id, + _lib._sel_addOperations_waitUntilFinished_1, + ops?._id ?? ffi.nullptr, + wait); + } -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)>>; + void addOperationWithBlock_(ObjCBlock block) { + return _lib._objc_msgSend_387( + _id, _lib._sel_addOperationWithBlock_1, block._id); + } -class __CFSet extends ffi.Opaque {} + /// @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); + } -typedef CFSetRef = ffi.Pointer<__CFSet>; -typedef CFMutableSetRef = ffi.Pointer<__CFSet>; -typedef CFSetApplierFunction = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer)>>; + int get maxConcurrentOperationCount { + return _lib._objc_msgSend_81(_id, _lib._sel_maxConcurrentOperationCount1); + } -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; -} + set maxConcurrentOperationCount(int value) { + _lib._objc_msgSend_388( + _id, _lib._sel_setMaxConcurrentOperationCount_1, value); + } -class CFTreeContext extends ffi.Struct { - @CFIndex() - external int version; + bool get suspended { + return _lib._objc_msgSend_11(_id, _lib._sel_isSuspended1); + } - external ffi.Pointer info; + set suspended(bool value) { + _lib._objc_msgSend_361(_id, _lib._sel_setSuspended_1, value); + } - external CFTreeRetainCallBack retain; + 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 CFTreeReleaseCallBack release; + set name(NSString? value) { + _lib._objc_msgSend_360(_id, _lib._sel_setName_1, value?._id ?? ffi.nullptr); + } - external CFTreeCopyDescriptionCallBack copyDescription; -} + int get qualityOfService { + return _lib._objc_msgSend_384(_id, _lib._sel_qualityOfService1); + } -typedef CFTreeRetainCallBack = ffi.Pointer< - ffi.NativeFunction Function(ffi.Pointer)>>; -typedef CFTreeReleaseCallBack - = ffi.Pointer)>>; -typedef CFTreeCopyDescriptionCallBack = ffi - .Pointer)>>; + set qualityOfService(int value) { + _lib._objc_msgSend_385(_id, _lib._sel_setQualityOfService_1, value); + } -class __CFTree extends ffi.Opaque {} + /// actually retain + dispatch_queue_t get underlyingQueue { + return _lib._objc_msgSend_389(_id, _lib._sel_underlyingQueue1); + } -typedef CFTreeRef = ffi.Pointer<__CFTree>; -typedef CFTreeApplierFunction = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer)>>; + /// actually retain + set underlyingQueue(dispatch_queue_t value) { + _lib._objc_msgSend_390(_id, _lib._sel_setUnderlyingQueue_1, value); + } -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 cancelAllOperations() { + return _lib._objc_msgSend_1(_id, _lib._sel_cancelAllOperations1); + } -class __CFUUID extends ffi.Opaque {} + void waitUntilAllOperationsAreFinished() { + return _lib._objc_msgSend_1( + _id, _lib._sel_waitUntilAllOperationsAreFinished1); + } -class CFUUIDBytes extends ffi.Struct { - @UInt8() - external int byte0; + 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); + } - @UInt8() - external int byte1; + 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); + } - @UInt8() - external int byte2; + /// 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); + } - @UInt8() - external int byte3; + int get operationCount { + return _lib._objc_msgSend_12(_id, _lib._sel_operationCount1); + } - @UInt8() - external int byte4; + 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); + } - @UInt8() - external int byte5; + 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); + } +} - @UInt8() - external int byte6; +class NSOperation extends NSObject { + NSOperation._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); - @UInt8() - external int byte7; + /// 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); + } - @UInt8() - external int byte8; + /// 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); + } - @UInt8() - external int byte9; + /// 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); + } - @UInt8() - external int byte10; + void start() { + return _lib._objc_msgSend_1(_id, _lib._sel_start1); + } - @UInt8() - external int byte11; + void main() { + return _lib._objc_msgSend_1(_id, _lib._sel_main1); + } - @UInt8() - external int byte12; + bool get cancelled { + return _lib._objc_msgSend_11(_id, _lib._sel_isCancelled1); + } - @UInt8() - external int byte13; + void cancel() { + return _lib._objc_msgSend_1(_id, _lib._sel_cancel1); + } - @UInt8() - external int byte14; + bool get executing { + return _lib._objc_msgSend_11(_id, _lib._sel_isExecuting1); + } - @UInt8() - external int byte15; -} + bool get finished { + return _lib._objc_msgSend_11(_id, _lib._sel_isFinished1); + } -typedef CFUUIDRef = ffi.Pointer<__CFUUID>; + /// To be deprecated; use and override 'asynchronous' below + bool get concurrent { + return _lib._objc_msgSend_11(_id, _lib._sel_isConcurrent1); + } -class __CFBundle extends ffi.Opaque {} + bool get asynchronous { + return _lib._objc_msgSend_11(_id, _lib._sel_isAsynchronous1); + } -typedef CFBundleRef = ffi.Pointer<__CFBundle>; -typedef cpu_type_t = integer_t; -typedef CFPlugInRef = ffi.Pointer<__CFBundle>; -typedef CFBundleRefNum = ffi.Int; + bool get ready { + return _lib._objc_msgSend_11(_id, _lib._sel_isReady1); + } -class __CFMessagePort extends ffi.Opaque {} + void addDependency_(NSOperation? op) { + return _lib._objc_msgSend_380( + _id, _lib._sel_addDependency_1, op?._id ?? ffi.nullptr); + } -class CFMessagePortContext extends ffi.Struct { - @CFIndex() - external int version; + void removeDependency_(NSOperation? op) { + return _lib._objc_msgSend_380( + _id, _lib._sel_removeDependency_1, op?._id ?? ffi.nullptr); + } - external ffi.Pointer info; + 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); + } - external ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>> retain; + int get queuePriority { + return _lib._objc_msgSend_381(_id, _lib._sel_queuePriority1); + } - external ffi - .Pointer)>> - release; + set queuePriority(int value) { + _lib._objc_msgSend_382(_id, _lib._sel_setQueuePriority_1, value); + } - external ffi.Pointer< - ffi.NativeFunction)>> - copyDescription; -} + ObjCBlock get completionBlock { + final _ret = _lib._objc_msgSend_362(_id, _lib._sel_completionBlock1); + return ObjCBlock._(_ret, _lib); + } -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)>>; + set completionBlock(ObjCBlock value) { + _lib._objc_msgSend_363(_id, _lib._sel_setCompletionBlock_1, value._id); + } -class __CFPlugInInstance extends ffi.Opaque {} + void waitUntilFinished() { + return _lib._objc_msgSend_1(_id, _lib._sel_waitUntilFinished1); + } -typedef CFPlugInInstanceRef = ffi.Pointer<__CFPlugInInstance>; -typedef CFPlugInInstanceDeallocateInstanceDataFunction - = ffi.Pointer)>>; -typedef CFPlugInInstanceGetInterfaceFunction = ffi.Pointer< - ffi.NativeFunction< - Boolean Function(CFPlugInInstanceRef, CFStringRef, - ffi.Pointer>)>>; + double get threadPriority { + return _lib._objc_msgSend_85(_id, _lib._sel_threadPriority1); + } -class __CFMachPort extends ffi.Opaque {} + set threadPriority(double value) { + _lib._objc_msgSend_383(_id, _lib._sel_setThreadPriority_1, value); + } -class CFMachPortContext extends ffi.Struct { - @CFIndex() - external int version; + int get qualityOfService { + return _lib._objc_msgSend_384(_id, _lib._sel_qualityOfService1); + } - external ffi.Pointer info; + set qualityOfService(int value) { + _lib._objc_msgSend_385(_id, _lib._sel_setQualityOfService_1, value); + } - external ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>> retain; + 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)>> - release; + set name(NSString? value) { + _lib._objc_msgSend_360(_id, _lib._sel_setName_1, value?._id ?? ffi.nullptr); + } - 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 {} + 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); + } -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; + 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 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; +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 guid_t extends ffi.Union { - @ffi.Array.multi([16]) - external ffi.Array g_guid; +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); +} - @ffi.Array.multi([4]) - external ffi.Array g_guid_asint; +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.Packed(1) -class ntsid_t extends ffi.Struct { - @u_int8_t() - external int sid_kind; +void _ObjCBlock20_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { + return _ObjCBlock20_closureRegistry[block.ref.target.address]!(arg0); +} - @u_int8_t() - external int sid_authcount; +class ObjCBlock20 extends _ObjCBlockBase { + ObjCBlock20._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - @ffi.Array.multi([6]) - external ffi.Array sid_authority; + /// 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; - @ffi.Array.multi([16]) - external ffi.Array sid_authorities; + /// 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); + } } -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; +/// ! +/// @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); - @u_int32_t() - external int el_result; + /// 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); + } - @u_int32_t() - external int el_flags; + /// 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); + } - @__darwin_pid_t() - external int el_info_pid; + /// 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); + } - @u_int64_t() - external int el_extend; + /// ! + /// @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); + } - @u_int32_t() - external int el_info_reserved_1; + /// ! + /// @abstract The URL of the receiver. + set URL(NSURL? value) { + _lib._objc_msgSend_365(_id, _lib._sel_setURL_1, value?._id ?? ffi.nullptr); + } - @uid_t() - external int el_uid; + /// ! + /// @abstract The cache policy of the receiver. + @override + int get cachePolicy { + return _lib._objc_msgSend_325(_id, _lib._sel_cachePolicy1); + } - external guid_t el_uguid; + /// ! + /// @abstract The cache policy of the receiver. + set cachePolicy(int value) { + _lib._objc_msgSend_393(_id, _lib._sel_setCachePolicy_1, value); + } - @u_int32_t() - external int el_uguid_valid; + /// ! + /// @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); + } - external ntsid_t el_usid; + /// ! + /// @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_383(_id, _lib._sel_setTimeoutInterval_1, value); + } - @u_int32_t() - external int el_usid_valid; + /// ! + /// @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); + } - @gid_t() - external int el_gid; + /// ! + /// @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_365( + _id, _lib._sel_setMainDocumentURL_1, value?._id ?? ffi.nullptr); + } - external guid_t el_gguid; + /// ! + /// @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_326(_id, _lib._sel_networkServiceType1); + } - @u_int32_t() - external int el_gguid_valid; + /// ! + /// @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_394(_id, _lib._sel_setNetworkServiceType_1, value); + } - external ntsid_t el_gsid; + /// ! + /// @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); + } - @u_int32_t() - external int el_gsid_valid; + /// ! + /// @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_361(_id, _lib._sel_setAllowsCellularAccess_1, value); + } - @u_int32_t() - external int el_member_valid; + /// ! + /// @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); + } - @u_int32_t() - external int el_sup_grp_cnt; + /// ! + /// @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_361( + _id, _lib._sel_setAllowsExpensiveNetworkAccess_1, value); + } - @ffi.Array.multi([16]) - external ffi.Array el_sup_groups; -} + /// ! + /// @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); + } -typedef u_int64_t = ffi.UnsignedLongLong; + /// ! + /// @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_361( + _id, _lib._sel_setAllowsConstrainedNetworkAccess_1, value); + } -class kauth_cache_sizes extends ffi.Struct { - @u_int32_t() - external int kcs_group_size; + /// ! + /// @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); + } - @u_int32_t() - external int kcs_id_size; -} + /// ! + /// @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_361(_id, _lib._sel_setAssumesHTTP3Capable_1, value); + } -class kauth_ace extends ffi.Struct { - external guid_t ace_applicable; + /// ! + /// @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_327(_id, _lib._sel_attribution1); + } - @u_int32_t() - external int ace_flags; + /// ! + /// @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_395(_id, _lib._sel_setAttribution_1, value); + } - @kauth_ace_rights_t() - external int ace_rights; -} + /// ! + /// @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); + } -typedef kauth_ace_rights_t = u_int32_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) { + _lib._objc_msgSend_361(_id, _lib._sel_setRequiresDNSSECValidation_1, value); + } -class kauth_acl extends ffi.Struct { - @u_int32_t() - external int acl_entrycount; + /// ! + /// @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); + } - @u_int32_t() - external int acl_flags; + /// ! + /// @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); + } - @ffi.Array.multi([1]) - external ffi.Array acl_ace; -} + /// ! + /// @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 kauth_filesec extends ffi.Struct { - @u_int32_t() - external int fsec_magic; + /// ! + /// @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_396( + _id, _lib._sel_setAllHTTPHeaderFields_1, value?._id ?? ffi.nullptr); + } - external guid_t fsec_owner; + /// ! + /// @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_397(_id, _lib._sel_setValue_forHTTPHeaderField_1, + value?._id ?? ffi.nullptr, field?._id ?? ffi.nullptr); + } - external guid_t fsec_group; + /// ! + /// @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_397(_id, _lib._sel_addValue_forHTTPHeaderField_1, + value?._id ?? ffi.nullptr, field?._id ?? ffi.nullptr); + } - external kauth_acl fsec_acl; -} + /// ! + /// @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 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 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_398( + _id, _lib._sel_setHTTPBody_1, value?._id ?? ffi.nullptr); + } -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 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_338(_id, _lib._sel_HTTPBodyStream1); + return _ret.address == 0 + ? null + : NSInputStream._(_ret, _lib, retain: true, 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; -} + /// ! + /// @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_399( + _id, _lib._sel_setHTTPBodyStream_1, value?._id ?? ffi.nullptr); + } -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 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 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; -} + /// ! + /// @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_361(_id, _lib._sel_setHTTPShouldHandleCookies_1, value); + } -class _acl extends ffi.Opaque {} + /// ! + /// @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 _acl_entry extends ffi.Opaque {} + /// ! + /// @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_361(_id, _lib._sel_setHTTPShouldUsePipelining_1, value); + } -class _acl_permset 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 _acl_flagset 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 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>; + /// ! + /// @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_324( + _lib._class_NSMutableURLRequest1, + _lib._sel_requestWithURL_cachePolicy_timeoutInterval_1, + URL?._id ?? ffi.nullptr, + cachePolicy, + timeoutInterval); + return NSMutableURLRequest._(_ret, _lib, retain: true, release: true); + } -class __CFFileSecurity extends ffi.Opaque {} + 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); + } -typedef CFFileSecurityRef = ffi.Pointer<__CFFileSecurity>; + 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 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; +abstract class NSHTTPCookieAcceptPolicy { + static const int NSHTTPCookieAcceptPolicyAlways = 0; + static const int NSHTTPCookieAcceptPolicyNever = 1; + static const int NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain = 2; } -class __CFStringTokenizer 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); -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; -} + /// 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); + } -typedef CFStringTokenizerRef = ffi.Pointer<__CFStringTokenizer>; + /// 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 __CFFileDescriptor extends ffi.Opaque {} + /// 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); + } -class CFFileDescriptorContext extends ffi.Struct { - @CFIndex() - external int version; + static NSHTTPCookieStorage? getSharedHTTPCookieStorage( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_400( + _lib._class_NSHTTPCookieStorage1, _lib._sel_sharedHTTPCookieStorage1); + return _ret.address == 0 + ? null + : NSHTTPCookieStorage._(_ret, _lib, retain: true, release: true); + } - external ffi.Pointer info; + static NSHTTPCookieStorage sharedCookieStorageForGroupContainerIdentifier_( + NativeCupertinoHttp _lib, NSString? identifier) { + final _ret = _lib._objc_msgSend_401( + _lib._class_NSHTTPCookieStorage1, + _lib._sel_sharedCookieStorageForGroupContainerIdentifier_1, + identifier?._id ?? ffi.nullptr); + return NSHTTPCookieStorage._(_ret, _lib, retain: true, release: true); + } - external ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>> retain; + 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 ffi - .Pointer)>> - release; + void setCookie_(NSHTTPCookie? cookie) { + return _lib._objc_msgSend_402( + _id, _lib._sel_setCookie_1, cookie?._id ?? ffi.nullptr); + } - external ffi.Pointer< - ffi.NativeFunction)>> - copyDescription; -} + void deleteCookie_(NSHTTPCookie? cookie) { + return _lib._objc_msgSend_402( + _id, _lib._sel_deleteCookie_1, cookie?._id ?? ffi.nullptr); + } -typedef CFFileDescriptorRef = ffi.Pointer<__CFFileDescriptor>; -typedef CFFileDescriptorNativeDescriptor = ffi.Int; -typedef CFFileDescriptorCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - CFFileDescriptorRef, CFOptionFlags, ffi.Pointer)>>; + void removeCookiesSinceDate_(NSDate? date) { + return _lib._objc_msgSend_349( + _id, _lib._sel_removeCookiesSinceDate_1, date?._id ?? ffi.nullptr); + } -class __CFUserNotification extends ffi.Opaque {} + 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); + } -typedef CFUserNotificationRef = ffi.Pointer<__CFUserNotification>; -typedef CFUserNotificationCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(CFUserNotificationRef, CFOptionFlags)>>; + void setCookies_forURL_mainDocumentURL_( + NSArray? cookies, NSURL? URL, NSURL? mainDocumentURL) { + return _lib._objc_msgSend_403( + _id, + _lib._sel_setCookies_forURL_mainDocumentURL_1, + cookies?._id ?? ffi.nullptr, + URL?._id ?? ffi.nullptr, + mainDocumentURL?._id ?? ffi.nullptr); + } -class __CFXMLNode extends ffi.Opaque {} + int get cookieAcceptPolicy { + return _lib._objc_msgSend_404(_id, _lib._sel_cookieAcceptPolicy1); + } -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; -} + set cookieAcceptPolicy(int value) { + _lib._objc_msgSend_405(_id, _lib._sel_setCookieAcceptPolicy_1, value); + } -class CFXMLElementInfo extends ffi.Struct { - external CFDictionaryRef attributes; + 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); + } - external CFArrayRef attributeOrder; + 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); + } - @Boolean() - external int isEmpty; + void getCookiesForTask_completionHandler_( + NSURLSessionTask? task, ObjCBlock21 completionHandler) { + return _lib._objc_msgSend_407( + _id, + _lib._sel_getCookiesForTask_completionHandler_1, + task?._id ?? ffi.nullptr, + completionHandler._id); + } - @ffi.Array.multi([3]) - external ffi.Array _reserved; -} + 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); + } -class CFXMLProcessingInstructionInfo extends ffi.Struct { - external CFStringRef dataString; + 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 CFXMLDocumentInfo extends ffi.Struct { - external CFURLRef sourceURL; +class NSHTTPCookie extends _ObjCWrapper { + NSHTTPCookie._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); - @CFStringEncoding() - external int encoding; -} + /// 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); + } -class CFXMLExternalID extends ffi.Struct { - external CFURLRef systemID; + /// 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); + } - external CFStringRef publicID; + /// 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 CFXMLDocumentTypeInfo extends ffi.Struct { - external CFXMLExternalID externalID; +void _ObjCBlock21_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { + return block.ref.target + .cast< + ffi.NativeFunction arg0)>>() + .asFunction arg0)>()(arg0); } -class CFXMLNotationInfo extends ffi.Struct { - external CFXMLExternalID externalID; +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); } -class CFXMLElementTypeDeclarationInfo extends ffi.Struct { - external CFStringRef contentDescription; +void _ObjCBlock21_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { + return _ObjCBlock21_closureRegistry[block.ref.target.address]!(arg0); } -class CFXMLAttributeDeclarationInfo extends ffi.Struct { - external CFStringRef attributeName; +class ObjCBlock21 extends _ObjCBlockBase { + ObjCBlock21._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - external CFStringRef typeString; + /// Creates a block from a C function pointer. + ObjCBlock21.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)>( + _ObjCBlock21_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - external CFStringRef defaultString; + /// Creates a block from a Dart function. + 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)>( + _ObjCBlock21_closureTrampoline) + .cast(), + _ObjCBlock21_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 CFXMLAttributeListDeclarationInfo extends ffi.Struct { +final class CFArrayCallBacks extends ffi.Struct { @CFIndex() - external int numberOfAttributes; + external int version; - external ffi.Pointer attributes; -} + external CFArrayRetainCallBack retain; -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; + external CFArrayReleaseCallBack release; + + external CFArrayCopyDescriptionCallBack copyDescription; + + external CFArrayEqualCallBack equal; } -class CFXMLEntityInfo extends ffi.Struct { - @ffi.Int32() - external int entityType; +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)>>; - external CFStringRef replacementText; +final class __CFArray extends ffi.Opaque {} - external CFXMLExternalID entityID; +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)>>; - external CFStringRef notationName; -} +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 CFXMLEntityReferenceInfo extends ffi.Struct { - @ffi.Int32() - external int entityType; -} + /// 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); + } -typedef CFXMLNodeRef = ffi.Pointer<__CFXMLNode>; -typedef CFXMLTreeRef = CFTreeRef; + /// 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); + } -class __CFXMLParser extends ffi.Opaque {} + @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 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; -} + 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 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; + 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 CFXMLParserCallBacks extends ffi.Struct { - @CFIndex() - external int version; +final class __SecCertificate extends ffi.Opaque {} - external CFXMLParserCreateXMLStructureCallBack createXMLStructure; +final class __SecIdentity extends ffi.Opaque {} - external CFXMLParserAddChildCallBack addChild; +final class __SecKey extends ffi.Opaque {} - external CFXMLParserEndXMLStructureCallBack endXMLStructure; +final class __SecPolicy extends ffi.Opaque {} - external CFXMLParserResolveExternalEntityCallBack resolveExternalEntity; +final class __SecAccessControl extends ffi.Opaque {} - external CFXMLParserHandleErrorCallBack handleError; +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 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; +typedef SecKeychainAttrType = OSType; +typedef OSType = FourCharCode; +typedef FourCharCode = UInt32; - external ffi.Pointer info; +final class SecKeychainAttributeList extends ffi.Struct { + @UInt32() + external int count; - external CFXMLParserRetainCallBack retain; + external ffi.Pointer attr; +} - external CFXMLParserReleaseCallBack release; +final class __SecTrustedApplication extends ffi.Opaque {} - external CFXMLParserCopyDescriptionCallBack copyDescription; -} +final class __SecAccess extends ffi.Opaque {} -typedef CFXMLParserRetainCallBack = ffi.Pointer< - ffi.NativeFunction Function(ffi.Pointer)>>; -typedef CFXMLParserReleaseCallBack - = ffi.Pointer)>>; -typedef CFXMLParserCopyDescriptionCallBack = ffi - .Pointer)>>; +final class __SecACL extends ffi.Opaque {} -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 __SecPassword extends ffi.Opaque {} -class __SecTrust extends ffi.Opaque {} +final class SecKeychainAttributeInfo extends ffi.Struct { + @UInt32() + external int count; -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); -} + external ffi.Pointer tag; -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); + external ffi.Pointer format; } -void _ObjCBlock28_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, SecTrustRef arg0, int arg1) { - return _ObjCBlock28_closureRegistry[block.ref.target.address]!(arg0, arg1); -} +typedef OSStatus = SInt32; -class ObjCBlock28 extends _ObjCBlockBase { - ObjCBlock28._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +final class _RuneEntry extends ffi.Struct { + @__darwin_rune_t() + external int __min; - /// 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; + @__darwin_rune_t() + external int __max; - /// 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); - } + @__darwin_rune_t() + external int __map; - ffi.Pointer<_ObjCBlock> get pointer => _id; + external ffi.Pointer<__uint32_t> __types; } -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); -} +typedef __darwin_rune_t = __darwin_wchar_t; +typedef __darwin_wchar_t = ffi.Int; -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); -} +final class _RuneRange extends ffi.Struct { + @ffi.Int() + external int __nranges; -void _ObjCBlock29_closureTrampoline(ffi.Pointer<_ObjCBlock> block, - SecTrustRef arg0, bool arg1, CFErrorRef arg2) { - return _ObjCBlock29_closureRegistry[block.ref.target.address]!( - arg0, arg1, arg2); + external ffi.Pointer<_RuneEntry> __ranges; } -class ObjCBlock29 extends _ObjCBlockBase { - ObjCBlock29._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +final class _RuneCharClass extends ffi.Struct { + @ffi.Array.multi([14]) + external ffi.Array __name; - /// 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; + @__uint32_t() + external int __mask; +} - /// 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); - } +final class _RuneLocale extends ffi.Struct { + @ffi.Array.multi([8]) + external ffi.Array __magic; - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + @ffi.Array.multi([32]) + external ffi.Array __encoding; -typedef SecKeyRef = ffi.Pointer<__SecKey>; -typedef SecCertificateRef = ffi.Pointer<__SecCertificate>; + external ffi.Pointer< + ffi.NativeFunction< + __darwin_rune_t Function(ffi.Pointer, __darwin_size_t, + ffi.Pointer>)>> __sgetrune; -class cssm_data extends ffi.Struct { - @ffi.Size() - external int Length; + external ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(__darwin_rune_t, ffi.Pointer, + __darwin_size_t, ffi.Pointer>)>> __sputrune; - external ffi.Pointer Data; -} + @__darwin_rune_t() + external int __invalid_rune; -class SecAsn1AlgId extends ffi.Struct { - external SecAsn1Oid algorithm; + @ffi.Array.multi([256]) + external ffi.Array<__uint32_t> __runetype; - external SecAsn1Item parameters; -} + @ffi.Array.multi([256]) + external ffi.Array<__darwin_rune_t> __maplower; -typedef SecAsn1Oid = cssm_data; -typedef SecAsn1Item = cssm_data; + @ffi.Array.multi([256]) + external ffi.Array<__darwin_rune_t> __mapupper; -class SecAsn1PubKeyInfo extends ffi.Struct { - external SecAsn1AlgId algorithm; + external _RuneRange __runetype_ext; - external SecAsn1Item subjectPublicKey; -} + external _RuneRange __maplower_ext; -class SecAsn1Template_struct extends ffi.Struct { - @ffi.Uint32() - external int kind; + external _RuneRange __mapupper_ext; - @ffi.Uint32() - external int offset; + external ffi.Pointer __variable; - external ffi.Pointer sub; + @ffi.Int() + external int __variable_len; - @ffi.Uint32() - external int size; -} + @ffi.Int() + external int __ncharclasses; -class cssm_guid extends ffi.Struct { - @uint32() - external int Data1; + external ffi.Pointer<_RuneCharClass> __charclasses; +} - @uint16() - external int Data2; +typedef __darwin_ct_rune_t = ffi.Int; - @uint16() - external int Data3; +final class lconv extends ffi.Struct { + external ffi.Pointer decimal_point; - @ffi.Array.multi([8]) - external ffi.Array Data4; -} + external ffi.Pointer thousands_sep; -typedef uint32 = ffi.Uint32; -typedef uint16 = ffi.Uint16; -typedef uint8 = ffi.Uint8; + external ffi.Pointer grouping; -class cssm_version extends ffi.Struct { - @uint32() - external int Major; + external ffi.Pointer int_curr_symbol; - @uint32() - external int Minor; -} + external ffi.Pointer currency_symbol; -class cssm_subservice_uid extends ffi.Struct { - external CSSM_GUID Guid; + external ffi.Pointer mon_decimal_point; - external CSSM_VERSION Version; + external ffi.Pointer mon_thousands_sep; - @uint32() - external int SubserviceId; + external ffi.Pointer mon_grouping; - @CSSM_SERVICE_TYPE() - external int SubserviceType; -} + external ffi.Pointer positive_sign; -typedef CSSM_GUID = cssm_guid; -typedef CSSM_VERSION = cssm_version; -typedef CSSM_SERVICE_TYPE = CSSM_SERVICE_MASK; -typedef CSSM_SERVICE_MASK = uint32; + external ffi.Pointer negative_sign; -class cssm_net_address extends ffi.Struct { - @CSSM_NET_ADDRESS_TYPE() - external int AddressType; + @ffi.Char() + external int int_frac_digits; - external SecAsn1Item Address; -} + @ffi.Char() + external int frac_digits; -typedef CSSM_NET_ADDRESS_TYPE = uint32; + @ffi.Char() + external int p_cs_precedes; -class cssm_crypto_data extends ffi.Struct { - external SecAsn1Item Param; + @ffi.Char() + external int p_sep_by_space; - external CSSM_CALLBACK Callback; + @ffi.Char() + external int n_cs_precedes; - external ffi.Pointer CallerCtx; -} + @ffi.Char() + external int n_sep_by_space; -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; + @ffi.Char() + external int p_sign_posn; -class cssm_list_element extends ffi.Struct { - external ffi.Pointer NextElement; + @ffi.Char() + external int n_sign_posn; - @CSSM_WORDID_TYPE() - external int WordID; + @ffi.Char() + external int int_p_cs_precedes; - @CSSM_LIST_ELEMENT_TYPE() - external int ElementType; + @ffi.Char() + external int int_n_cs_precedes; - external UnnamedUnion1 Element; -} + @ffi.Char() + external int int_p_sep_by_space; -typedef CSSM_WORDID_TYPE = sint32; -typedef CSSM_LIST_ELEMENT_TYPE = uint32; + @ffi.Char() + external int int_n_sep_by_space; -class UnnamedUnion1 extends ffi.Union { - external CSSM_LIST Sublist; + @ffi.Char() + external int int_p_sign_posn; - external SecAsn1Item Word; + @ffi.Char() + external int int_n_sign_posn; } -typedef CSSM_LIST = cssm_list; +final class __float2 extends ffi.Struct { + @ffi.Float() + external double __sinval; -class cssm_list extends ffi.Struct { - @CSSM_LIST_TYPE() - external int ListType; + @ffi.Float() + external double __cosval; +} - external CSSM_LIST_ELEMENT_PTR Head; +final class __double2 extends ffi.Struct { + @ffi.Double() + external double __sinval; - external CSSM_LIST_ELEMENT_PTR Tail; + @ffi.Double() + external double __cosval; } -typedef CSSM_LIST_TYPE = uint32; -typedef CSSM_LIST_ELEMENT_PTR = ffi.Pointer; - -class CSSM_TUPLE extends ffi.Struct { - external CSSM_LIST Issuer; +final class exception extends ffi.Struct { + @ffi.Int() + external int type; - external CSSM_LIST Subject; + external ffi.Pointer name; - @CSSM_BOOL() - external int Delegate; + @ffi.Double() + external double arg1; - external CSSM_LIST AuthorizationTag; + @ffi.Double() + external double arg2; - external CSSM_LIST ValidityPeriod; + @ffi.Double() + external double retval; } -typedef CSSM_BOOL = sint32; +typedef pthread_t = __darwin_pthread_t; +typedef __darwin_pthread_t = ffi.Pointer<_opaque_pthread_t>; +typedef stack_t = __darwin_sigaltstack; -class cssm_tuplegroup extends ffi.Struct { - @uint32() - external int NumberOfTuples; +final class __sbuf extends ffi.Struct { + external ffi.Pointer _base; - external CSSM_TUPLE_PTR Tuples; + @ffi.Int() + external int _size; } -typedef CSSM_TUPLE_PTR = ffi.Pointer; +final class __sFILEX extends ffi.Opaque {} -class cssm_sample extends ffi.Struct { - external CSSM_LIST TypedSample; +final class __sFILE extends ffi.Struct { + external ffi.Pointer _p; - external ffi.Pointer Verifier; -} + @ffi.Int() + external int _r; -typedef CSSM_SUBSERVICE_UID = cssm_subservice_uid; + @ffi.Int() + external int _w; -class cssm_samplegroup extends ffi.Struct { - @uint32() - external int NumberOfSamples; + @ffi.Short() + external int _flags; - external ffi.Pointer Samples; -} + @ffi.Short() + external int _file; -typedef CSSM_SAMPLE = cssm_sample; + external __sbuf _bf; -class cssm_memory_funcs extends ffi.Struct { - external CSSM_MALLOC malloc_func; + @ffi.Int() + external int _lbfsize; - external CSSM_FREE free_func; + external ffi.Pointer _cookie; - external CSSM_REALLOC realloc_func; + external ffi + .Pointer)>> + _close; - external CSSM_CALLOC calloc_func; + external ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer, ffi.Int)>> _read; - external ffi.Pointer AllocRef; -} + external ffi.Pointer< + ffi.NativeFunction< + fpos_t Function(ffi.Pointer, fpos_t, ffi.Int)>> _seek; -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)>>; + external ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer, ffi.Int)>> _write; -class cssm_encoded_cert extends ffi.Struct { - @CSSM_CERT_TYPE() - external int CertType; + external __sbuf _ub; - @CSSM_CERT_ENCODING() - external int CertEncoding; + external ffi.Pointer<__sFILEX> _extra; - external SecAsn1Item CertBlob; -} + @ffi.Int() + external int _ur; -typedef CSSM_CERT_TYPE = uint32; -typedef CSSM_CERT_ENCODING = uint32; + @ffi.Array.multi([3]) + external ffi.Array _ubuf; -class cssm_parsed_cert extends ffi.Struct { - @CSSM_CERT_TYPE() - external int CertType; + @ffi.Array.multi([1]) + external ffi.Array _nbuf; - @CSSM_CERT_PARSE_FORMAT() - external int ParsedCertFormat; + external __sbuf _lb; - external ffi.Pointer ParsedCert; + @ffi.Int() + external int _blksize; + + @fpos_t() + external int _offset; } -typedef CSSM_CERT_PARSE_FORMAT = uint32; +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_cert_pair extends ffi.Struct { - external CSSM_ENCODED_CERT EncodedCert; +final class timespec extends ffi.Struct { + @__darwin_time_t() + external int tv_sec; - external CSSM_PARSED_CERT ParsedCert; + @ffi.Long() + external int tv_nsec; } -typedef CSSM_ENCODED_CERT = cssm_encoded_cert; -typedef CSSM_PARSED_CERT = cssm_parsed_cert; +final class tm extends ffi.Struct { + @ffi.Int() + external int tm_sec; -class cssm_certgroup extends ffi.Struct { - @CSSM_CERT_TYPE() - external int CertType; + @ffi.Int() + external int tm_min; - @CSSM_CERT_ENCODING() - external int CertEncoding; + @ffi.Int() + external int tm_hour; - @uint32() - external int NumCerts; + @ffi.Int() + external int tm_mday; - external UnnamedUnion2 GroupList; + @ffi.Int() + external int tm_mon; - @CSSM_CERTGROUP_TYPE() - external int CertGroupType; + @ffi.Int() + external int tm_year; - external ffi.Pointer Reserved; -} + @ffi.Int() + external int tm_wday; -class UnnamedUnion2 extends ffi.Union { - external CSSM_DATA_PTR CertList; + @ffi.Int() + external int tm_yday; - external CSSM_ENCODED_CERT_PTR EncodedCertList; + @ffi.Int() + external int tm_isdst; - external CSSM_PARSED_CERT_PTR ParsedCertList; + @ffi.Long() + external int tm_gmtoff; - external CSSM_CERT_PAIR_PTR PairCertList; + external ffi.Pointer tm_zone; } -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; +typedef clock_t = __darwin_clock_t; +typedef __darwin_clock_t = ffi.UnsignedLong; +typedef time_t = __darwin_time_t; - external CSSM_CERTGROUP Certs; +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 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 intmax_t = ffi.Long; -class cssm_access_credentials extends ffi.Struct { - @ffi.Array.multi([68]) - external ffi.Array EntryTag; +final class imaxdiv_t extends ffi.Struct { + @intmax_t() + external int quot; - external CSSM_BASE_CERTS BaseCerts; + @intmax_t() + external int rem; +} - external CSSM_SAMPLEGROUP Samples; +typedef uintmax_t = ffi.UnsignedLong; - external CSSM_CHALLENGE_CALLBACK Callback; +final class CFBagCallBacks extends ffi.Struct { + @CFIndex() + external int version; - external ffi.Pointer CallerCtx; -} + external CFBagRetainCallBack retain; -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; + external CFBagReleaseCallBack release; -class cssm_authorizationgroup extends ffi.Struct { - @uint32() - external int NumberOfAuthTags; + external CFBagCopyDescriptionCallBack copyDescription; - external ffi.Pointer AuthTags; + external CFBagEqualCallBack equal; + + external CFBagHashCallBack hash; } -typedef CSSM_ACL_AUTHORIZATION_TAG = sint32; +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)>>; -class cssm_acl_validity_period extends ffi.Struct { - external SecAsn1Item StartDate; +final class __CFBag extends ffi.Opaque {} - external SecAsn1Item EndDate; -} +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)>>; -class cssm_acl_entry_prototype extends ffi.Struct { - external CSSM_LIST TypedSubject; +final class CFBinaryHeapCompareContext extends ffi.Struct { + @CFIndex() + external int version; - @CSSM_BOOL() - external int Delegate; + external ffi.Pointer info; - external CSSM_AUTHORIZATIONGROUP Authorization; + external ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer info)>> retain; - external CSSM_ACL_VALIDITY_PERIOD TimeRange; + external ffi.Pointer< + ffi.NativeFunction info)>> + release; - @ffi.Array.multi([68]) - external ffi.Array EntryTag; + external ffi.Pointer< + ffi.NativeFunction info)>> + copyDescription; } -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; +final class CFBinaryHeapCallBacks extends ffi.Struct { + @CFIndex() + external int version; - @CSSM_BOOL() - external int Delegate; -} + external ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + CFAllocatorRef allocator, ffi.Pointer ptr)>> retain; -class cssm_acl_entry_input extends ffi.Struct { - external CSSM_ACL_ENTRY_PROTOTYPE Prototype; + external ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + CFAllocatorRef allocator, ffi.Pointer ptr)>> release; - external CSSM_ACL_SUBJECT_CALLBACK Callback; + external ffi.Pointer< + ffi.NativeFunction ptr)>> + copyDescription; - external ffi.Pointer CallerContext; + external ffi.Pointer< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer ptr1, + ffi.Pointer ptr2, + ffi.Pointer context)>> compare; } -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 __CFBinaryHeap extends ffi.Opaque {} -class cssm_resource_control_context extends ffi.Struct { - external CSSM_ACCESS_CREDENTIALS_PTR AccessCred; +typedef CFBinaryHeapRef = ffi.Pointer<__CFBinaryHeap>; +typedef CFBinaryHeapApplierFunction = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer val, ffi.Pointer context)>>; - external CSSM_ACL_ENTRY_INPUT InitialAclEntry; -} +final class __CFBitVector extends ffi.Opaque {} -typedef CSSM_ACCESS_CREDENTIALS_PTR = ffi.Pointer; -typedef CSSM_ACL_ENTRY_INPUT = cssm_acl_entry_input; +typedef CFBitVectorRef = ffi.Pointer<__CFBitVector>; +typedef CFMutableBitVectorRef = ffi.Pointer<__CFBitVector>; +typedef CFBit = UInt32; -class cssm_acl_entry_info extends ffi.Struct { - external CSSM_ACL_ENTRY_PROTOTYPE EntryPublicInfo; +abstract class __CFByteOrder { + static const int CFByteOrderUnknown = 0; + static const int CFByteOrderLittleEndian = 1; + static const int CFByteOrderBigEndian = 2; +} - @CSSM_ACL_HANDLE() - external int EntryHandle; +final class CFSwappedFloat32 extends ffi.Struct { + @ffi.Uint32() + external int v; } -typedef CSSM_ACL_HANDLE = CSSM_HANDLE; +final class CFSwappedFloat64 extends ffi.Struct { + @ffi.Uint64() + external int v; +} -class cssm_acl_edit extends ffi.Struct { - @CSSM_ACL_EDIT_MODE() - external int EditMode; +final class CFDictionaryKeyCallBacks extends ffi.Struct { + @CFIndex() + external int version; - @CSSM_ACL_HANDLE() - external int OldEntryHandle; + external CFDictionaryRetainCallBack retain; - external ffi.Pointer NewEntry; -} + external CFDictionaryReleaseCallBack release; -typedef CSSM_ACL_EDIT_MODE = uint32; + external CFDictionaryCopyDescriptionCallBack copyDescription; -class cssm_func_name_addr extends ffi.Struct { - @ffi.Array.multi([68]) - external ffi.Array Name; + external CFDictionaryEqualCallBack equal; - external CSSM_PROC_ADDR Address; + external CFDictionaryHashCallBack hash; } -typedef CSSM_PROC_ADDR = ffi.Pointer>; +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_date extends ffi.Struct { - @ffi.Array.multi([4]) - external ffi.Array Year; +final class CFDictionaryValueCallBacks extends ffi.Struct { + @CFIndex() + external int version; - @ffi.Array.multi([2]) - external ffi.Array Month; + external CFDictionaryRetainCallBack retain; - @ffi.Array.multi([2]) - external ffi.Array Day; -} + external CFDictionaryReleaseCallBack release; -class cssm_range extends ffi.Struct { - @uint32() - external int Min; + external CFDictionaryCopyDescriptionCallBack copyDescription; - @uint32() - external int Max; + external CFDictionaryEqualCallBack equal; } -class cssm_query_size_data extends ffi.Struct { - @uint32() - external int SizeInputBlock; +final class __CFDictionary extends ffi.Opaque {} - @uint32() - external int SizeOutputBlock; -} +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)>>; -class cssm_key_size extends ffi.Struct { - @uint32() - external int LogicalKeySizeInBits; +final class __CFNotificationCenter extends ffi.Opaque {} - @uint32() - external int EffectiveKeySizeInBits; +abstract class CFNotificationSuspensionBehavior { + static const int CFNotificationSuspensionBehaviorDrop = 1; + static const int CFNotificationSuspensionBehaviorCoalesce = 2; + static const int CFNotificationSuspensionBehaviorHold = 3; + static const int CFNotificationSuspensionBehaviorDeliverImmediately = 4; } -class cssm_keyheader extends ffi.Struct { - @CSSM_HEADERVERSION() - external int HeaderVersion; +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; - external CSSM_GUID CspId; +final class __CFLocale extends ffi.Opaque {} - @CSSM_KEYBLOB_TYPE() - external int BlobType; +typedef CFLocaleRef = ffi.Pointer<__CFLocale>; +typedef CFLocaleIdentifier = CFStringRef; +typedef LangCode = SInt16; +typedef RegionCode = SInt16; - @CSSM_KEYBLOB_FORMAT() - external int Format; +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; +} - @CSSM_ALGORITHMS() - external int AlgorithmId; +typedef CFLocaleKey = CFStringRef; +typedef CFCalendarIdentifier = CFStringRef; +typedef CFAbsoluteTime = CFTimeInterval; +typedef CFTimeInterval = ffi.Double; - @CSSM_KEYCLASS() - external int KeyClass; +final class __CFDate extends ffi.Opaque {} - @uint32() - external int LogicalKeySizeInBits; +typedef CFDateRef = ffi.Pointer<__CFDate>; - @CSSM_KEYATTR_FLAGS() - external int KeyAttr; +final class __CFTimeZone extends ffi.Opaque {} - @CSSM_KEYUSE() - external int KeyUsage; +final class CFGregorianDate extends ffi.Struct { + @SInt32() + external int year; - external CSSM_DATE StartDate; + @SInt8() + external int month; - external CSSM_DATE EndDate; + @SInt8() + external int day; - @CSSM_ALGORITHMS() - external int WrapAlgorithmId; + @SInt8() + external int hour; - @CSSM_ENCRYPT_MODE() - external int WrapMode; + @SInt8() + external int minute; - @uint32() - external int Reserved; + @ffi.Double() + external double second; } -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 SInt8 = ffi.SignedChar; -typedef CSSM_KEYHEADER = cssm_keyheader; +final class CFGregorianUnits extends ffi.Struct { + @SInt32() + external int years; -class cssm_dl_db_handle extends ffi.Struct { - @CSSM_DL_HANDLE() - external int DLHandle; + @SInt32() + external int months; - @CSSM_DB_HANDLE() - external int DBHandle; -} + @SInt32() + external int days; -typedef CSSM_DL_HANDLE = CSSM_MODULE_HANDLE; -typedef CSSM_DB_HANDLE = CSSM_MODULE_HANDLE; + @SInt32() + external int hours; -class cssm_context_attribute extends ffi.Struct { - @CSSM_ATTRIBUTE_TYPE() - external int AttributeType; + @SInt32() + external int minutes; - @uint32() - external int AttributeLength; + @ffi.Double() + external double seconds; +} - external cssm_context_attribute_value Attribute; +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_ATTRIBUTE_TYPE = uint32; +typedef CFTimeZoneRef = ffi.Pointer<__CFTimeZone>; -class cssm_context_attribute_value extends ffi.Union { - external ffi.Pointer String; +final class __CFData extends ffi.Opaque {} - @uint32() - external int Uint32; +typedef CFDataRef = ffi.Pointer<__CFData>; +typedef CFMutableDataRef = ffi.Pointer<__CFData>; - external CSSM_ACCESS_CREDENTIALS_PTR AccessCredentials; +abstract class CFDataSearchFlags { + static const int kCFDataSearchBackwards = 1; + static const int kCFDataSearchAnchored = 2; +} - external CSSM_KEY_PTR Key; +final class __CFCharacterSet extends ffi.Opaque {} - external CSSM_DATA_PTR Data; +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; +} - @CSSM_PADDING() - external int Padding; +typedef CFCharacterSetRef = ffi.Pointer<__CFCharacterSet>; +typedef CFMutableCharacterSetRef = ffi.Pointer<__CFCharacterSet>; +typedef UniChar = UInt16; - external CSSM_DATE_PTR Date; +final class __CFError extends ffi.Opaque {} - external CSSM_RANGE_PTR Range; +typedef CFErrorDomain = CFStringRef; +typedef CFErrorRef = ffi.Pointer<__CFError>; - external CSSM_CRYPTO_DATA_PTR CryptoData; +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 CSSM_VERSION_PTR Version; +typedef CFStringEncoding = UInt32; +typedef CFMutableStringRef = ffi.Pointer<__CFString>; +typedef StringPtr = ffi.Pointer; +typedef ConstStringPtr = ffi.Pointer; - external CSSM_DL_DB_HANDLE_PTR DLDBHandle; +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 ffi.Pointer KRProfile; +abstract class CFStringNormalizationForm { + static const int kCFStringNormalizationFormD = 0; + static const int kCFStringNormalizationFormKD = 1; + static const int kCFStringNormalizationFormC = 2; + static const int kCFStringNormalizationFormKC = 3; } -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 CFStringInlineBuffer extends ffi.Struct { + @ffi.Array.multi([64]) + external ffi.Array buffer; -class cssm_kr_profile extends ffi.Opaque {} + external CFStringRef theString; -class cssm_context extends ffi.Struct { - @CSSM_CONTEXT_TYPE() - external int ContextType; + external ffi.Pointer directUniCharBuffer; - @CSSM_ALGORITHMS() - external int AlgorithmType; + external ffi.Pointer directCStringBuffer; - @uint32() - external int NumberOfAttributes; + external CFRange rangeToBuffer; - external CSSM_CONTEXT_ATTRIBUTE_PTR ContextAttributes; + @CFIndex() + external int bufferedRangeStart; - @CSSM_CSP_HANDLE() - external int CSPHandle; + @CFIndex() + external int bufferedRangeEnd; +} - @CSSM_BOOL() - external int Privileged; +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; +} - @uint32() - external int EncryptionProhibited; +final class __CFCalendar extends ffi.Opaque {} - @uint32() - external int WorkFactor; +typedef CFCalendarRef = ffi.Pointer<__CFCalendar>; - @uint32() - external int Reserved; +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_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; +final class CGPoint extends ffi.Struct { + @CGFloat() + external double x; - @CSSM_PKCS_OAEP_MGF() - external int MGF; + @CGFloat() + external double y; +} - external SecAsn1Item MGFParams; +typedef CGFloat = ffi.Double; - @CSSM_PKCS_OAEP_PSOURCE() - external int PSource; +final class CGSize extends ffi.Struct { + @CGFloat() + external double width; - external SecAsn1Item PSourceParams; + @CGFloat() + external double height; } -typedef CSSM_PKCS_OAEP_MGF = uint32; -typedef CSSM_PKCS_OAEP_PSOURCE = uint32; +final class CGVector extends ffi.Struct { + @CGFloat() + external double dx; -class cssm_csp_operational_statistics extends ffi.Struct { - @CSSM_BOOL() - external int UserAuthenticated; + @CGFloat() + external double dy; +} - @CSSM_CSP_FLAGS() - external int DeviceFlags; +final class CGRect extends ffi.Struct { + external CGPoint origin; - @uint32() - external int TokenMaxSessionCount; + external CGSize size; +} - @uint32() - external int TokenOpenedSessionCount; +abstract class CGRectEdge { + static const int CGRectMinXEdge = 0; + static const int CGRectMinYEdge = 1; + static const int CGRectMaxXEdge = 2; + static const int CGRectMaxYEdge = 3; +} - @uint32() - external int TokenMaxRWSessionCount; +final class CGAffineTransform extends ffi.Struct { + @CGFloat() + external double a; - @uint32() - external int TokenOpenedRWSessionCount; + @CGFloat() + external double b; - @uint32() - external int TokenTotalPublicMem; + @CGFloat() + external double c; - @uint32() - external int TokenFreePublicMem; + @CGFloat() + external double d; - @uint32() - external int TokenTotalPrivateMem; + @CGFloat() + external double tx; - @uint32() - external int TokenFreePrivateMem; + @CGFloat() + external double ty; } -typedef CSSM_CSP_FLAGS = uint32; - -class cssm_pkcs5_pbkdf1_params extends ffi.Struct { - external SecAsn1Item Passphrase; +final class CGAffineTransformComponents extends ffi.Struct { + external CGSize scale; - external SecAsn1Item InitVector; -} + @CGFloat() + external double horizontalShear; -class cssm_pkcs5_pbkdf2_params extends ffi.Struct { - external SecAsn1Item Passphrase; + @CGFloat() + external double rotation; - @CSSM_PKCS5_PBKDF2_PRF() - external int PseudoRandomFunction; + external CGVector translation; } -typedef CSSM_PKCS5_PBKDF2_PRF = uint32; - -class cssm_kea_derive_params extends ffi.Struct { - external SecAsn1Item Rb; +final class __CFDateFormatter extends ffi.Opaque {} - external SecAsn1Item Yb; +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_tp_authority_id extends ffi.Struct { - external ffi.Pointer AuthorityCert; - - external CSSM_NET_ADDRESS_PTR AuthorityLocation; +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 CSSM_NET_ADDRESS_PTR = ffi.Pointer; - -class cssm_field extends ffi.Struct { - external SecAsn1Oid FieldOid; - - external SecAsn1Item FieldValue; -} +typedef CFDateFormatterRef = ffi.Pointer<__CFDateFormatter>; +typedef CFDateFormatterKey = CFStringRef; -class cssm_tp_policyinfo extends ffi.Struct { - @uint32() - external int NumberOfPolicyIds; +final class __CFBoolean extends ffi.Opaque {} - external CSSM_FIELD_PTR PolicyIds; +typedef CFBooleanRef = ffi.Pointer<__CFBoolean>; - external ffi.Pointer PolicyControl; +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; } -typedef CSSM_FIELD_PTR = ffi.Pointer; +final class __CFNumber extends ffi.Opaque {} -class cssm_dl_db_list extends ffi.Struct { - @uint32() - external int NumHandles; +typedef CFNumberRef = ffi.Pointer<__CFNumber>; - external CSSM_DL_DB_HANDLE_PTR DLDBHandle; -} +final class __CFNumberFormatter extends ffi.Opaque {} -class cssm_tp_callerauth_context extends ffi.Struct { - external CSSM_TP_POLICYINFO Policy; +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_TIMESTRING VerifyTime; +typedef CFNumberFormatterRef = ffi.Pointer<__CFNumberFormatter>; - @CSSM_TP_STOP_ON() - external int VerificationAbortOn; +abstract class CFNumberFormatterOptionFlags { + static const int kCFNumberFormatterParseIntegersOnly = 1; +} - external CSSM_TP_VERIFICATION_RESULTS_CALLBACK CallbackWithVerifiedCert; +typedef CFNumberFormatterKey = CFStringRef; - @uint32() - external int NumberOfAnchorCerts; +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; +} - external CSSM_DATA_PTR AnchorCerts; +abstract class CFNumberFormatterPadPosition { + static const int kCFNumberFormatterPadBeforePrefix = 0; + static const int kCFNumberFormatterPadAfterPrefix = 1; + static const int kCFNumberFormatterPadBeforeSuffix = 2; + static const int kCFNumberFormatterPadAfterSuffix = 3; +} - external CSSM_DL_DB_LIST_PTR DBList; +typedef CFPropertyListRef = CFTypeRef; - external CSSM_ACCESS_CREDENTIALS_PTR CallerCredentials; +abstract class CFURLPathStyle { + static const int kCFURLPOSIXPathStyle = 0; + static const int kCFURLHFSPathStyle = 1; + static const int kCFURLWindowsPathStyle = 2; } -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; +final class __CFURL extends ffi.Opaque {} - @CSSM_CRL_ENCODING() - external int CrlEncoding; +typedef CFURLRef = ffi.Pointer<__CFURL>; - external SecAsn1Item CrlBlob; +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_CRL_TYPE = uint32; -typedef CSSM_CRL_ENCODING = uint32; - -class cssm_parsed_crl extends ffi.Struct { - @CSSM_CRL_TYPE() - external int CrlType; +final class FSRef extends ffi.Opaque {} - @CSSM_CRL_PARSE_FORMAT() - external int ParsedCrlFormat; +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 ffi.Pointer ParsedCrl; +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_CRL_PARSE_FORMAT = uint32; +typedef CFURLBookmarkFileCreationOptions = CFOptionFlags; -class cssm_crl_pair extends ffi.Struct { - external CSSM_ENCODED_CRL EncodedCrl; +final class mach_port_status extends ffi.Struct { + @mach_port_rights_t() + external int mps_pset; - external CSSM_PARSED_CRL ParsedCrl; -} + @mach_port_seqno_t() + external int mps_seqno; -typedef CSSM_ENCODED_CRL = cssm_encoded_crl; -typedef CSSM_PARSED_CRL = cssm_parsed_crl; + @mach_port_mscount_t() + external int mps_mscount; -class cssm_crlgroup extends ffi.Struct { - @CSSM_CRL_TYPE() - external int CrlType; + @mach_port_msgcount_t() + external int mps_qlimit; - @CSSM_CRL_ENCODING() - external int CrlEncoding; + @mach_port_msgcount_t() + external int mps_msgcount; - @uint32() - external int NumberOfCrls; + @mach_port_rights_t() + external int mps_sorights; - external UnnamedUnion3 GroupCrlList; + @boolean_t() + external int mps_srights; - @CSSM_CRLGROUP_TYPE() - external int CrlGroupType; -} + @boolean_t() + external int mps_pdrequest; -class UnnamedUnion3 extends ffi.Union { - external CSSM_DATA_PTR CrlList; + @boolean_t() + external int mps_nsrequest; - external CSSM_ENCODED_CRL_PTR EncodedCrlList; + @natural_t() + external int mps_flags; +} - external CSSM_PARSED_CRL_PTR ParsedCrlList; +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 CSSM_CRL_PAIR_PTR PairCrlList; +final class mach_port_limits extends ffi.Struct { + @mach_port_msgcount_t() + external int mpl_qlimit; } -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 mach_port_info_ext extends ffi.Struct { + external mach_port_status_t mpie_status; -class cssm_fieldgroup extends ffi.Struct { - @ffi.Int() - external int NumberOfFields; + @mach_port_msgcount_t() + external int mpie_boost_cnt; - external CSSM_FIELD_PTR Fields; + @ffi.Array.multi([6]) + external ffi.Array reserved; } -class cssm_evidence extends ffi.Struct { - @CSSM_EVIDENCE_FORM() - external int EvidenceForm; +typedef mach_port_status_t = mach_port_status; - external ffi.Pointer Evidence; +final class mach_port_guard_info extends ffi.Struct { + @ffi.Uint64() + external int mpgi_guard; } -typedef CSSM_EVIDENCE_FORM = uint32; - -class cssm_tp_verify_context extends ffi.Struct { - @CSSM_TP_ACTION() - external int Action; - - external SecAsn1Item ActionData; +final class mach_port_qos extends ffi.Opaque {} - external CSSM_CRLGROUP Crls; +final class mach_service_port_info extends ffi.Struct { + @ffi.Array.multi([255]) + external ffi.Array mspi_string_name; - external CSSM_TP_CALLERAUTH_CONTEXT_PTR Cred; + @ffi.Uint8() + external int mspi_domain_type; } -typedef CSSM_TP_ACTION = uint32; -typedef CSSM_CRLGROUP = cssm_crlgroup; -typedef CSSM_TP_CALLERAUTH_CONTEXT_PTR - = ffi.Pointer; +final class mach_port_options extends ffi.Struct { + @ffi.Uint32() + external int flags; -class cssm_tp_verify_context_result extends ffi.Struct { - @uint32() - external int NumberOfEvidences; + external mach_port_limits_t mpl; - external CSSM_EVIDENCE_PTR Evidence; + external UnnamedUnion1 unnamed; } -typedef CSSM_EVIDENCE_PTR = ffi.Pointer; +typedef mach_port_limits_t = mach_port_limits; -class cssm_tp_request_set extends ffi.Struct { - @uint32() - external int NumberOfRequests; +final class UnnamedUnion1 extends ffi.Union { + @ffi.Array.multi([2]) + external ffi.Array reserved; - external ffi.Pointer Requests; -} + @mach_port_name_t() + external int work_interval_port; -class cssm_tp_result_set extends ffi.Struct { - @uint32() - external int NumberOfResults; + external mach_service_port_info_t service_port_info; - external ffi.Pointer Results; + @mach_port_name_t() + external int service_port_name; } -class cssm_tp_confirm_response extends ffi.Struct { - @uint32() - external int NumberOfResponses; +typedef mach_port_name_t = natural_t; +typedef mach_service_port_info_t = ffi.Pointer; - external CSSM_TP_CONFIRM_STATUS_PTR Responses; +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_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; +final class __CFRunLoop extends ffi.Opaque {} - @CSSM_TP_SERVICES() - external int MoreServiceRequests; +final class __CFRunLoopSource extends ffi.Opaque {} - @uint32() - external int NumberOfServiceControls; +final class __CFRunLoopObserver extends ffi.Opaque {} - external CSSM_FIELD_PTR ServiceControls; +final class __CFRunLoopTimer extends ffi.Opaque {} - external CSSM_ACCESS_CREDENTIALS_PTR UserCredentials; +abstract class CFRunLoopRunResult { + static const int kCFRunLoopRunFinished = 1; + static const int kCFRunLoopRunStopped = 2; + static const int kCFRunLoopRunTimedOut = 3; + static const int kCFRunLoopRunHandledSource = 4; } -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; +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 CSSM_TP_CERTISSUE_STATUS = uint32; -typedef CSSM_CERTGROUP_PTR = ffi.Pointer; +typedef CFRunLoopMode = CFStringRef; +typedef CFRunLoopRef = ffi.Pointer<__CFRunLoop>; +typedef CFRunLoopSourceRef = ffi.Pointer<__CFRunLoopSource>; +typedef CFRunLoopObserverRef = ffi.Pointer<__CFRunLoopObserver>; +typedef CFRunLoopTimerRef = ffi.Pointer<__CFRunLoopTimer>; -class cssm_tp_certchange_input extends ffi.Struct { - @CSSM_TP_CERTCHANGE_ACTION() - external int Action; +final class CFRunLoopSourceContext extends ffi.Struct { + @CFIndex() + external int version; - @CSSM_TP_CERTCHANGE_REASON() - external int Reason; + external ffi.Pointer info; - @CSSM_CL_HANDLE() - external int CLHandle; + external ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer info)>> retain; - external CSSM_DATA_PTR Cert; + external ffi.Pointer< + ffi.NativeFunction info)>> + release; - external CSSM_FIELD_PTR ChangeInfo; + external ffi.Pointer< + ffi.NativeFunction info)>> + copyDescription; - external CSSM_TIMESTRING StartTime; + external ffi.Pointer< + ffi.NativeFunction< + Boolean Function( + ffi.Pointer info1, ffi.Pointer info2)>> equal; - external CSSM_ACCESS_CREDENTIALS_PTR CallerCredentials; -} + external ffi.Pointer< + ffi.NativeFunction info)>> hash; -typedef CSSM_TP_CERTCHANGE_ACTION = uint32; -typedef CSSM_TP_CERTCHANGE_REASON = uint32; + external ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer info, CFRunLoopRef rl, + CFRunLoopMode mode)>> schedule; -class cssm_tp_certchange_output extends ffi.Struct { - @CSSM_TP_CERTCHANGE_STATUS() - external int ActionStatus; + external ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer info, CFRunLoopRef rl, + CFRunLoopMode mode)>> cancel; - external CSSM_FIELD RevokeInfo; + external ffi.Pointer< + ffi.NativeFunction info)>> + perform; } -typedef CSSM_TP_CERTCHANGE_STATUS = uint32; -typedef CSSM_FIELD = cssm_field; +final class CFRunLoopSourceContext1 extends ffi.Struct { + @CFIndex() + external int version; -class cssm_tp_certverify_input extends ffi.Struct { - @CSSM_CL_HANDLE() - external int CLHandle; + external ffi.Pointer info; - external CSSM_DATA_PTR Cert; + external ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer info)>> retain; - external CSSM_TP_VERIFY_CONTEXT_PTR VerifyContext; -} + external ffi.Pointer< + ffi.NativeFunction info)>> + release; -typedef CSSM_TP_VERIFY_CONTEXT_PTR = ffi.Pointer; + external ffi.Pointer< + ffi.NativeFunction info)>> + copyDescription; -class cssm_tp_certverify_output extends ffi.Struct { - @CSSM_TP_CERTVERIFY_STATUS() - external int VerifyStatus; + external ffi.Pointer< + ffi.NativeFunction< + Boolean Function( + ffi.Pointer info1, ffi.Pointer info2)>> equal; - @uint32() - external int NumberOfEvidence; + external ffi.Pointer< + ffi.NativeFunction info)>> hash; - external CSSM_EVIDENCE_PTR Evidence; -} + external ffi.Pointer< + ffi.NativeFunction info)>> + getPort; -typedef CSSM_TP_CERTVERIFY_STATUS = uint32; + external ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer msg, + CFIndex size, + CFAllocatorRef allocator, + ffi.Pointer info)>> perform; +} -class cssm_tp_certnotarize_input extends ffi.Struct { - @CSSM_CL_HANDLE() - external int CLHandle; +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; - @uint32() - external int NumberOfFields; +final class CFRunLoopObserverContext extends ffi.Struct { + @CFIndex() + external int version; - external CSSM_FIELD_PTR MoreFields; + external ffi.Pointer info; - external CSSM_FIELD_PTR SignScope; + external ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer info)>> retain; - @uint32() - external int ScopeSize; + external ffi.Pointer< + ffi.NativeFunction info)>> + release; - @CSSM_TP_SERVICES() - external int MoreServiceRequests; + external ffi.Pointer< + ffi.NativeFunction info)>> + copyDescription; +} - @uint32() - external int NumberOfServiceControls; +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); +} - external CSSM_FIELD_PTR ServiceControls; +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 CSSM_ACCESS_CREDENTIALS_PTR UserCredentials; +void _ObjCBlock22_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, CFRunLoopObserverRef arg0, int arg1) { + return _ObjCBlock22_closureRegistry[block.ref.target.address]!(arg0, arg1); } -class cssm_tp_certnotarize_output extends ffi.Struct { - @CSSM_TP_CERTNOTARIZE_STATUS() - external int NotarizeStatus; +class ObjCBlock22 extends _ObjCBlockBase { + ObjCBlock22._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - external CSSM_CERTGROUP_PTR NotarizedCertGroup; + /// Creates a block from a C function pointer. + 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)>(_ObjCBlock22_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - @CSSM_TP_SERVICES() - external int PerformedServiceRequests; + /// Creates a block from a Dart function. + ObjCBlock22.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)>(_ObjCBlock22_closureTrampoline) + .cast(), + _ObjCBlock22_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); + } } -typedef CSSM_TP_CERTNOTARIZE_STATUS = uint32; +final class CFRunLoopTimerContext extends ffi.Struct { + @CFIndex() + external int version; -class cssm_tp_certreclaim_input extends ffi.Struct { - @CSSM_CL_HANDLE() - external int CLHandle; + external ffi.Pointer info; - @uint32() - external int NumberOfSelectionFields; + external ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer info)>> retain; - external CSSM_FIELD_PTR SelectionFields; + external ffi.Pointer< + ffi.NativeFunction info)>> + release; - external CSSM_ACCESS_CREDENTIALS_PTR UserCredentials; + external ffi.Pointer< + ffi.NativeFunction info)>> + copyDescription; } -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 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); } -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; +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); } -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; +void _ObjCBlock23_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, CFRunLoopTimerRef arg0) { + return _ObjCBlock23_closureRegistry[block.ref.target.address]!(arg0); } -typedef CSSM_TP_CRLISSUE_STATUS = uint32; +class ObjCBlock23 extends _ObjCBlockBase { + ObjCBlock23._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); -class cssm_cert_bundle_header extends ffi.Struct { - @CSSM_CERT_BUNDLE_TYPE() - external int BundleType; + /// 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, + CFRunLoopTimerRef arg0)>( + _ObjCBlock23_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - @CSSM_CERT_BUNDLE_ENCODING() - external int BundleEncoding; + /// Creates a block from a Dart function. + 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)>( + _ObjCBlock23_closureTrampoline) + .cast(), + _ObjCBlock23_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); + } } -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; +final class __CFSocket extends ffi.Opaque {} - external SecAsn1Item Bundle; +abstract class CFSocketError { + static const int kCFSocketSuccess = 0; + static const int kCFSocketError = -1; + static const int kCFSocketTimeout = -2; } -typedef CSSM_CERT_BUNDLE_HEADER = cssm_cert_bundle_header; +final class CFSocketSignature extends ffi.Struct { + @SInt32() + external int protocolFamily; -class cssm_db_attribute_info extends ffi.Struct { - @CSSM_DB_ATTRIBUTE_NAME_FORMAT() - external int AttributeNameFormat; + @SInt32() + external int socketType; - external cssm_db_attribute_label Label; + @SInt32() + external int protocol; - @CSSM_DB_ATTRIBUTE_FORMAT() - external int AttributeFormat; + external CFDataRef address; } -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; +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_DB_ATTRIBUTE_FORMAT = uint32; +final class CFSocketContext extends ffi.Struct { + @CFIndex() + external int version; -class cssm_db_attribute_data extends ffi.Struct { - external CSSM_DB_ATTRIBUTE_INFO Info; + external ffi.Pointer info; - @uint32() - external int NumberOfValues; + external ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer info)>> retain; - external CSSM_DATA_PTR Value; + external ffi.Pointer< + ffi.NativeFunction info)>> + release; + + external ffi.Pointer< + ffi.NativeFunction info)>> + copyDescription; } -typedef CSSM_DB_ATTRIBUTE_INFO = cssm_db_attribute_info; +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; -class cssm_db_record_attribute_info extends ffi.Struct { - @CSSM_DB_RECORDTYPE() - external int DataRecordType; +final class accessx_descriptor extends ffi.Struct { + @ffi.UnsignedInt() + external int ad_name_offset; - @uint32() - external int NumberOfAttributes; + @ffi.Int() + external int ad_flags; - external CSSM_DB_ATTRIBUTE_INFO_PTR AttributeInfo; + @ffi.Array.multi([2]) + external ffi.Array ad_pad; } -typedef CSSM_DB_RECORDTYPE = uint32; -typedef CSSM_DB_ATTRIBUTE_INFO_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_db_record_attribute_data extends ffi.Struct { - @CSSM_DB_RECORDTYPE() - external int DataRecordType; +final class fssearchblock extends ffi.Opaque {} - @uint32() - external int SemanticInformation; +final class searchstate extends ffi.Opaque {} - @uint32() - external int NumberOfAttributes; +final class flock extends ffi.Struct { + @off_t() + external int l_start; - external CSSM_DB_ATTRIBUTE_DATA_PTR AttributeData; -} + @off_t() + external int l_len; -typedef CSSM_DB_ATTRIBUTE_DATA_PTR = ffi.Pointer; + @pid_t() + external int l_pid; -class cssm_db_parsing_module_info extends ffi.Struct { - @CSSM_DB_RECORDTYPE() - external int RecordType; + @ffi.Short() + external int l_type; - external CSSM_SUBSERVICE_UID ModuleSubserviceUid; + @ffi.Short() + external int l_whence; } -class cssm_db_index_info extends ffi.Struct { - @CSSM_DB_INDEX_TYPE() - external int IndexType; - - @CSSM_DB_INDEXED_DATA_LOCATION() - external int IndexedDataLocation; +final class flocktimeout extends ffi.Struct { + external flock fl; - external CSSM_DB_ATTRIBUTE_INFO Info; + external timespec timeout; } -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; +final class radvisory extends ffi.Struct { + @off_t() + external int ra_offset; - external SecAsn1Item RecordIdentifier; + @ffi.Int() + external int ra_count; } -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; +final class fsignatures extends ffi.Struct { + @off_t() + external int fs_file_start; - external CSSM_DB_INDEX_INFO_PTR IndexInfo; -} + external ffi.Pointer fs_blob_start; -typedef CSSM_DB_INDEX_INFO_PTR = ffi.Pointer; + @ffi.Size() + external int fs_blob_size; -class cssm_dbinfo extends ffi.Struct { - @uint32() - external int NumberOfRecordTypes; + @ffi.Size() + external int fs_fsignatures_size; - external CSSM_DB_PARSING_MODULE_INFO_PTR DefaultParsingModules; + @ffi.Array.multi([20]) + external ffi.Array fs_cdhash; - external CSSM_DB_RECORD_ATTRIBUTE_INFO_PTR RecordAttributeNames; + @ffi.Int() + external int fs_hash_type; +} - external CSSM_DB_RECORD_INDEX_INFO_PTR RecordIndexes; +final class fsupplement extends ffi.Struct { + @off_t() + external int fs_file_start; - @CSSM_BOOL() - external int IsLocal; + @off_t() + external int fs_blob_start; - external ffi.Pointer AccessPath; + @ffi.Size() + external int fs_blob_size; - external ffi.Pointer Reserved; + @ffi.Int() + external int fs_orig_fd; } -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 fchecklv extends ffi.Struct { + @off_t() + external int lv_file_start; -class cssm_selection_predicate extends ffi.Struct { - @CSSM_DB_OPERATOR() - external int DbOperator; + @ffi.Size() + external int lv_error_message_size; - external CSSM_DB_ATTRIBUTE_DATA Attribute; + external ffi.Pointer lv_error_message; } -typedef CSSM_DB_OPERATOR = uint32; -typedef CSSM_DB_ATTRIBUTE_DATA = cssm_db_attribute_data; +final class fgetsigsinfo extends ffi.Struct { + @off_t() + external int fg_file_start; -class cssm_query_limits extends ffi.Struct { - @uint32() - external int TimeLimit; + @ffi.Int() + external int fg_info_request; - @uint32() - external int SizeLimit; + @ffi.Int() + external int fg_sig_is_platform; } -class cssm_query extends ffi.Struct { - @CSSM_DB_RECORDTYPE() - external int RecordType; - - @CSSM_DB_CONJUNCTIVE() - external int Conjunctive; +final class fstore extends ffi.Struct { + @ffi.UnsignedInt() + external int fst_flags; - @uint32() - external int NumSelectionPredicates; + @ffi.Int() + external int fst_posmode; - external CSSM_SELECTION_PREDICATE_PTR SelectionPredicate; + @off_t() + external int fst_offset; - external CSSM_QUERY_LIMITS QueryLimits; + @off_t() + external int fst_length; - @CSSM_QUERY_FLAGS() - external int QueryFlags; + @off_t() + external int fst_bytesalloc; } -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 fpunchhole extends ffi.Struct { + @ffi.UnsignedInt() + external int fp_flags; -class cssm_dl_pkcs11_attributes extends ffi.Struct { - @uint32() - external int DeviceAccessFlags; -} + @ffi.UnsignedInt() + external int reserved; -class cssm_name_list extends ffi.Struct { - @uint32() - external int NumStrings; + @off_t() + external int fp_offset; - external ffi.Pointer> String; + @off_t() + external int fp_length; } -class cssm_db_schema_attribute_info extends ffi.Struct { - @uint32() - external int AttributeId; - - external ffi.Pointer AttributeName; - - external SecAsn1Oid AttributeNameID; +final class ftrimactivefile extends ffi.Struct { + @off_t() + external int fta_offset; - @CSSM_DB_ATTRIBUTE_FORMAT() - external int DataType; + @off_t() + external int fta_length; } -class cssm_db_schema_index_info extends ffi.Struct { - @uint32() - external int AttributeId; +final class fspecread extends ffi.Struct { + @ffi.UnsignedInt() + external int fsr_flags; - @uint32() - external int IndexId; + @ffi.UnsignedInt() + external int reserved; - @CSSM_DB_INDEX_TYPE() - external int IndexType; + @off_t() + external int fsr_offset; - @CSSM_DB_INDEXED_DATA_LOCATION() - external int IndexedDataLocation; + @off_t() + external int fsr_length; } -class cssm_x509_type_value_pair extends ffi.Struct { - external SecAsn1Oid type; +@ffi.Packed(4) +final class log2phys extends ffi.Struct { + @ffi.UnsignedInt() + external int l2p_flags; - @CSSM_BER_TAG() - external int valueType; + @off_t() + external int l2p_contigbytes; - external SecAsn1Item value; + @off_t() + external int l2p_devoffset; } -typedef CSSM_BER_TAG = uint8; - -class cssm_x509_rdn extends ffi.Struct { - @uint32() - external int numberOfPairs; +final class _filesec extends ffi.Opaque {} - external CSSM_X509_TYPE_VALUE_PAIR_PTR AttributeTypeAndValue; +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_X509_TYPE_VALUE_PAIR_PTR = ffi.Pointer; - -class cssm_x509_name extends ffi.Struct { - @uint32() - external int numberOfRDNs; +typedef filesec_t = ffi.Pointer<_filesec>; - external CSSM_X509_RDN_PTR RelativeDistinguishedName; +abstract class os_clockid_t { + static const int OS_CLOCK_MACH_ABSOLUTE_TIME = 32; } -typedef CSSM_X509_RDN_PTR = ffi.Pointer; - -class cssm_x509_time extends ffi.Struct { - @CSSM_BER_TAG() - external int timeType; +final class os_workgroup_attr_opaque_s extends ffi.Struct { + @ffi.Uint32() + external int sig; - external SecAsn1Item time; + @ffi.Array.multi([60]) + external ffi.Array opaque; } -class x509_validity extends ffi.Struct { - external CSSM_X509_TIME notBefore; +final class os_workgroup_interval_data_opaque_s extends ffi.Struct { + @ffi.Uint32() + external int sig; - external CSSM_X509_TIME notAfter; + @ffi.Array.multi([56]) + external ffi.Array opaque; } -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; +final class os_workgroup_join_token_opaque_s extends ffi.Struct { + @ffi.Uint32() + external int sig; - @uint32() - external int pathLenConstraint; + @ffi.Array.multi([36]) + external ffi.Array opaque; } -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 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_x509_extensionTagAndValue extends ffi.Struct { - @CSSM_BER_TAG() - external int type; + /// 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 value; -} + /// 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); + } -class cssm_x509ext_pair extends ffi.Struct { - external CSSM_X509EXT_TAGandVALUE tagAndValue; + /// 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); + } - external ffi.Pointer parsedValue; -} + @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); + } -typedef CSSM_X509EXT_TAGandVALUE = cssm_x509_extensionTagAndValue; + 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); + } -class cssm_x509_extension extends ffi.Struct { - external SecAsn1Oid extnId; + 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); + } +} - @CSSM_BOOL() - external int critical; +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; - @ffi.Int32() - external int format; +final class os_workgroup_max_parallel_threads_attr_s extends ffi.Opaque {} - external cssm_x509ext_value value; +typedef os_workgroup_mpt_attr_t + = ffi.Pointer; - external SecAsn1Item BERvalue; -} +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_x509ext_value extends ffi.Union { - external ffi.Pointer tagAndValue; + /// 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 ffi.Pointer parsedValue; + /// 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); + } - external ffi.Pointer valuePair; -} + /// 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); + } -typedef CSSM_X509EXT_PAIR = cssm_x509ext_pair; + @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); + } -class cssm_x509_extensions extends ffi.Struct { - @uint32() - external int numberOfExtensions; + 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_X509_EXTENSION_PTR extensions; + 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_X509_EXTENSION_PTR = ffi.Pointer; +typedef os_workgroup_interval_t = ffi.Pointer; +typedef os_workgroup_interval_data_t + = ffi.Pointer; -class cssm_x509_tbs_certificate extends ffi.Struct { - external SecAsn1Item version; +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 SecAsn1Item serialNumber; + /// 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); + } - external SecAsn1AlgId signature; + /// 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); + } - external CSSM_X509_NAME issuer; + /// 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); + } - external CSSM_X509_VALIDITY validity; + @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); + } - external CSSM_X509_NAME subject; + 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 SecAsn1PubKeyInfo subjectPublicKeyInfo; + 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); + } +} - external SecAsn1Item issuerUniqueIdentifier; +typedef os_workgroup_parallel_t = ffi.Pointer; +typedef os_workgroup_attr_t = ffi.Pointer; - external SecAsn1Item subjectUniqueIdentifier; +final class time_value extends ffi.Struct { + @integer_t() + external int seconds; - external CSSM_X509_EXTENSIONS extensions; + @integer_t() + external int microseconds; } -typedef CSSM_X509_NAME = cssm_x509_name; -typedef CSSM_X509_VALIDITY = x509_validity; -typedef CSSM_X509_EXTENSIONS = cssm_x509_extensions; +typedef integer_t = ffi.Int; -class cssm_x509_signature extends ffi.Struct { - external SecAsn1AlgId algorithmIdentifier; +final class mach_timespec extends ffi.Struct { + @ffi.UnsignedInt() + external int tv_sec; - external SecAsn1Item encrypted; + @clock_res_t() + external int tv_nsec; } -class cssm_x509_signed_certificate extends ffi.Struct { - external CSSM_X509_TBS_CERTIFICATE certificate; +typedef clock_res_t = ffi.Int; +typedef dispatch_time_t = ffi.Uint64; - external CSSM_X509_SIGNATURE signature; +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_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; +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); } -class cssm_x509ext_policyQualifiers extends ffi.Struct { - @uint32() - external int numberOfPolicyQualifiers; +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 ffi.Pointer policyQualifier; +void _ObjCBlock24_closureTrampoline(ffi.Pointer<_ObjCBlock> block, int arg0) { + return _ObjCBlock24_closureRegistry[block.ref.target.address]!(arg0); } -typedef CSSM_X509EXT_POLICYQUALIFIERINFO = cssm_x509ext_policyQualifierInfo; +class ObjCBlock24 extends _ObjCBlockBase { + ObjCBlock24._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); -class cssm_x509ext_policyInfo extends ffi.Struct { - external SecAsn1Oid policyIdentifier; + /// Creates a block from a C function pointer. + ObjCBlock24.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) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - external CSSM_X509EXT_POLICYQUALIFIERS policyQualifiers; + /// Creates a block from a Dart function. + 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)>(_ObjCBlock24_closureTrampoline) + .cast(), + _ObjCBlock24_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); + } } -typedef CSSM_X509EXT_POLICYQUALIFIERS = cssm_x509ext_policyQualifiers; +final class dispatch_queue_s extends ffi.Opaque {} -class cssm_x509_revoked_cert_entry extends ffi.Struct { - external SecAsn1Item certificateSerialNumber; +typedef dispatch_queue_global_t = ffi.Pointer; - external CSSM_X509_TIME revocationDate; +final class dispatch_queue_attr_s extends ffi.Opaque {} - external CSSM_X509_EXTENSIONS extensions; -} +typedef dispatch_queue_attr_t = ffi.Pointer; -class cssm_x509_revoked_cert_list extends ffi.Struct { - @uint32() - external int numberOfRevokedCertEntries; +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; +} - external CSSM_X509_REVOKED_CERT_ENTRY_PTR revokedCertEntry; +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_X509_REVOKED_CERT_ENTRY_PTR - = ffi.Pointer; +final class mach_msg_type_descriptor_t extends ffi.Opaque {} -class cssm_x509_tbs_certlist extends ffi.Struct { - external SecAsn1Item version; +final class mach_msg_port_descriptor_t extends ffi.Opaque {} - external SecAsn1AlgId signature; +final class mach_msg_ool_descriptor32_t extends ffi.Opaque {} - external CSSM_X509_NAME issuer; +final class mach_msg_ool_descriptor64_t extends ffi.Opaque {} - external CSSM_X509_TIME thisUpdate; +final class mach_msg_ool_descriptor_t extends ffi.Opaque {} - external CSSM_X509_TIME nextUpdate; +final class mach_msg_ool_ports_descriptor32_t extends ffi.Opaque {} - external CSSM_X509_REVOKED_CERT_LIST_PTR revokedCertificates; +final class mach_msg_ool_ports_descriptor64_t extends ffi.Opaque {} - external CSSM_X509_EXTENSIONS extensions; -} +final class mach_msg_ool_ports_descriptor_t extends ffi.Opaque {} -typedef CSSM_X509_REVOKED_CERT_LIST_PTR - = ffi.Pointer; +final class mach_msg_guarded_port_descriptor32_t extends ffi.Opaque {} -class cssm_x509_signed_crl extends ffi.Struct { - external CSSM_X509_TBS_CERTLIST tbsCertList; +final class mach_msg_guarded_port_descriptor64_t extends ffi.Opaque {} - external CSSM_X509_SIGNATURE signature; -} +final class mach_msg_guarded_port_descriptor_t extends ffi.Opaque {} -typedef CSSM_X509_TBS_CERTLIST = cssm_x509_tbs_certlist; +final class mach_msg_descriptor_t extends ffi.Opaque {} -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 mach_msg_body_t extends ffi.Struct { + @mach_msg_size_t() + external int msgh_descriptor_count; } -class __CE_OtherName extends ffi.Struct { - external SecAsn1Oid typeId; +typedef mach_msg_size_t = natural_t; - external SecAsn1Item value; -} +final class mach_msg_header_t extends ffi.Struct { + @mach_msg_bits_t() + external int msgh_bits; -class __CE_GeneralName extends ffi.Struct { - @ffi.Int32() - external int nameType; + @mach_msg_size_t() + external int msgh_size; - @CSSM_BOOL() - external int berEncoded; + @mach_port_t() + external int msgh_remote_port; - external SecAsn1Item name; -} + @mach_port_t() + external int msgh_local_port; -class __CE_GeneralNames extends ffi.Struct { - @uint32() - external int numNames; + @mach_port_name_t() + external int msgh_voucher_port; - external ffi.Pointer generalName; + @mach_msg_id_t() + external int msgh_id; } -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; +typedef mach_msg_bits_t = ffi.UnsignedInt; +typedef mach_msg_id_t = integer_t; - @CSSM_BOOL() - external int serialNumberPresent; +final class mach_msg_base_t extends ffi.Struct { + external mach_msg_header_t header; - external SecAsn1Item serialNumber; + external mach_msg_body_t body; } -typedef CE_GeneralNames = __CE_GeneralNames; - -class __CE_ExtendedKeyUsage extends ffi.Struct { - @uint32() - external int numPurposes; +final class mach_msg_trailer_t extends ffi.Struct { + @mach_msg_trailer_type_t() + external int msgh_trailer_type; - external CSSM_OID_PTR purposes; + @mach_msg_trailer_size_t() + external int msgh_trailer_size; } -typedef CSSM_OID_PTR = ffi.Pointer; - -class __CE_BasicConstraints extends ffi.Struct { - @CSSM_BOOL() - external int cA; - - @CSSM_BOOL() - external int pathLenConstraintPresent; +typedef mach_msg_trailer_type_t = ffi.UnsignedInt; +typedef mach_msg_trailer_size_t = ffi.UnsignedInt; - @uint32() - external int pathLenConstraint; -} +final class mach_msg_seqno_trailer_t extends ffi.Struct { + @mach_msg_trailer_type_t() + external int msgh_trailer_type; -class __CE_PolicyQualifierInfo extends ffi.Struct { - external SecAsn1Oid policyQualifierId; + @mach_msg_trailer_size_t() + external int msgh_trailer_size; - external SecAsn1Item qualifier; + @mach_port_seqno_t() + external int msgh_seqno; } -class __CE_PolicyInformation extends ffi.Struct { - external SecAsn1Oid certPolicyId; - - @uint32() - external int numPolicyQualifiers; - - external ffi.Pointer policyQualifiers; +final class security_token_t extends ffi.Struct { + @ffi.Array.multi([2]) + external ffi.Array val; } -typedef CE_PolicyQualifierInfo = __CE_PolicyQualifierInfo; - -class __CE_CertPolicies extends ffi.Struct { - @uint32() - external int numPolicies; +final class mach_msg_security_trailer_t extends ffi.Struct { + @mach_msg_trailer_type_t() + external int msgh_trailer_type; - external ffi.Pointer policies; -} + @mach_msg_trailer_size_t() + external int msgh_trailer_size; -typedef CE_PolicyInformation = __CE_PolicyInformation; + @mach_port_seqno_t() + external int msgh_seqno; -abstract class __CE_CrlDistributionPointNameType { - static const int CE_CDNT_FullName = 0; - static const int CE_CDNT_NameRelativeToCrlIssuer = 1; + external security_token_t msgh_sender; } -class __CE_DistributionPointName extends ffi.Struct { - @ffi.Int32() - external int nameType; - - external UnnamedUnion4 dpn; +final class audit_token_t extends ffi.Struct { + @ffi.Array.multi([8]) + external ffi.Array val; } -class UnnamedUnion4 extends ffi.Union { - external ffi.Pointer fullName; - - external CSSM_X509_RDN_PTR rdn; -} +final class mach_msg_audit_trailer_t extends ffi.Struct { + @mach_msg_trailer_type_t() + external int msgh_trailer_type; -class __CE_CRLDistributionPoint extends ffi.Struct { - external ffi.Pointer distPointName; + @mach_msg_trailer_size_t() + external int msgh_trailer_size; - @CSSM_BOOL() - external int reasonsPresent; + @mach_port_seqno_t() + external int msgh_seqno; - @CE_CrlDistReasonFlags() - external int reasons; + external security_token_t msgh_sender; - external ffi.Pointer crlIssuer; + external audit_token_t msgh_audit; } -typedef CE_DistributionPointName = __CE_DistributionPointName; -typedef CE_CrlDistReasonFlags = uint8; +@ffi.Packed(4) +final class mach_msg_context_trailer_t extends ffi.Struct { + @mach_msg_trailer_type_t() + external int msgh_trailer_type; -class __CE_CRLDistPointsSyntax extends ffi.Struct { - @uint32() - external int numDistPoints; + @mach_msg_trailer_size_t() + external int msgh_trailer_size; - external ffi.Pointer distPoints; -} + @mach_port_seqno_t() + external int msgh_seqno; -typedef CE_CRLDistributionPoint = __CE_CRLDistributionPoint; + external security_token_t msgh_sender; -class __CE_AccessDescription extends ffi.Struct { - external SecAsn1Oid accessMethod; + external audit_token_t msgh_audit; - external CE_GeneralName accessLocation; + @mach_port_context_t() + external int msgh_context; } -class __CE_AuthorityInfoAccess extends ffi.Struct { - @uint32() - external int numAccessDescriptions; +typedef mach_port_context_t = vm_offset_t; +typedef vm_offset_t = ffi.UintPtr; - external ffi.Pointer accessDescriptions; +final class msg_labels_t extends ffi.Struct { + @mach_port_name_t() + external int sender; } -typedef CE_AccessDescription = __CE_AccessDescription; +@ffi.Packed(4) +final class mach_msg_mac_trailer_t extends ffi.Struct { + @mach_msg_trailer_type_t() + external int msgh_trailer_type; -class __CE_SemanticsInformation extends ffi.Struct { - external ffi.Pointer semanticsIdentifier; + @mach_msg_trailer_size_t() + external int msgh_trailer_size; - external ffi.Pointer - nameRegistrationAuthorities; -} + @mach_port_seqno_t() + external int msgh_seqno; -typedef CE_NameRegistrationAuthorities = CE_GeneralNames; + external security_token_t msgh_sender; -class __CE_QC_Statement extends ffi.Struct { - external SecAsn1Oid statementId; + external audit_token_t msgh_audit; - external ffi.Pointer semanticsInfo; + @mach_port_context_t() + external int msgh_context; - external ffi.Pointer otherInfo; -} + @mach_msg_filter_id() + external int msgh_ad; -typedef CE_SemanticsInformation = __CE_SemanticsInformation; + external msg_labels_t msgh_labels; +} -class __CE_QC_Statements extends ffi.Struct { - @uint32() - external int numQCStatements; +typedef mach_msg_filter_id = ffi.Int; - external ffi.Pointer qcStatements; +final class mach_msg_empty_send_t extends ffi.Struct { + external mach_msg_header_t header; } -typedef CE_QC_Statement = __CE_QC_Statement; - -class __CE_IssuingDistributionPoint extends ffi.Struct { - external ffi.Pointer distPointName; +final class mach_msg_empty_rcv_t extends ffi.Struct { + external mach_msg_header_t header; - @CSSM_BOOL() - external int onlyUserCertsPresent; + external mach_msg_trailer_t trailer; +} - @CSSM_BOOL() - external int onlyUserCerts; +final class mach_msg_empty_t extends ffi.Union { + external mach_msg_empty_send_t send; - @CSSM_BOOL() - external int onlyCACertsPresent; + external mach_msg_empty_rcv_t rcv; +} - @CSSM_BOOL() - external int onlyCACerts; +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; - @CSSM_BOOL() - external int onlySomeReasonsPresent; +final class dispatch_source_type_s extends ffi.Opaque {} - @CE_CrlDistReasonFlags() - external int onlySomeReasons; +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; - @CSSM_BOOL() - external int indirectCrlPresent; +final class dispatch_data_s extends ffi.Opaque {} - @CSSM_BOOL() - external int indirectCrl; +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); } -class __CE_GeneralSubtree extends ffi.Struct { - external ffi.Pointer base; - - @uint32() - external int minimum; - - @CSSM_BOOL() - external int maximumPresent; - - @uint32() - external int maximum; +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 __CE_GeneralSubtrees extends ffi.Struct { - @uint32() - external int numSubtrees; - - external ffi.Pointer subtrees; +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); } -typedef CE_GeneralSubtree = __CE_GeneralSubtree; +class ObjCBlock25 extends _ObjCBlockBase { + ObjCBlock25._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); -class __CE_NameConstraints extends ffi.Struct { - external ffi.Pointer permitted; + /// Creates a block from a C function pointer. + ObjCBlock25.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)>(_ObjCBlock25_fnPtrTrampoline, false) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - external ffi.Pointer excluded; + /// Creates a block from a Dart function. + ObjCBlock25.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)>( + _ObjCBlock25_closureTrampoline, false) + .cast(), + _ObjCBlock25_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 CE_GeneralSubtrees = __CE_GeneralSubtrees; - -class __CE_PolicyMapping extends ffi.Struct { - external SecAsn1Oid issuerDomainPolicy; - - external SecAsn1Oid subjectDomainPolicy; +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); } -class __CE_PolicyMappings extends ffi.Struct { - @uint32() - external int numPolicyMappings; - - external ffi.Pointer policyMappings; +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); } -typedef CE_PolicyMapping = __CE_PolicyMapping; - -class __CE_PolicyConstraints extends ffi.Struct { - @CSSM_BOOL() - external int requireExplicitPolicyPresent; +void _ObjCBlock26_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, dispatch_data_t arg0, int arg1) { + return _ObjCBlock26_closureRegistry[block.ref.target.address]!(arg0, arg1); +} - @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); +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. - ObjCBlock30.fromFunctionPointer( + ObjCBlock26.fromFunctionPointer( NativeCupertinoHttp lib, - ffi.Pointer> + 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, - sec_certificate_t arg0)>( - _ObjCBlock30_fnPtrTrampoline) + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + dispatch_data_t arg0, + ffi.Int arg1)>(_ObjCBlock26_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) + ObjCBlock26.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, - sec_certificate_t arg0)>( - _ObjCBlock30_closureTrampoline) + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + dispatch_data_t arg0, + ffi.Int arg1)>(_ObjCBlock26_closureTrampoline) .cast(), - _ObjCBlock30_registerClosure(fn)), + _ObjCBlock26_registerClosure(fn)), lib); static ffi.Pointer? _dartFuncTrampoline; - void call(sec_certificate_t arg0) { + void call(dispatch_data_t arg0, int arg1) { return _id.ref.invoke .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, sec_certificate_t arg0)>>() + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + dispatch_data_t arg0, ffi.Int arg1)>>() .asFunction< - void Function(ffi.Pointer<_ObjCBlock> block, - sec_certificate_t arg0)>()(_id, arg0); + void Function(ffi.Pointer<_ObjCBlock> block, dispatch_data_t arg0, + int arg1)>()(_id, arg0, arg1); } - - 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) { +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>() + .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 _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 _ObjCBlock31_closureTrampoline(ffi.Pointer<_ObjCBlock> block, int arg0) { - return _ObjCBlock31_closureRegistry[block.ref.target.address]!(arg0); +void _ObjCBlock27_closureTrampoline(ffi.Pointer<_ObjCBlock> block, int arg0) { + return _ObjCBlock27_closureRegistry[block.ref.target.address]!(arg0); } -class ObjCBlock31 extends _ObjCBlockBase { - ObjCBlock31._(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. - ObjCBlock31.fromFunctionPointer(NativeCupertinoHttp lib, - ffi.Pointer> ptr) + ObjCBlock27.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.Int arg0)>(_ObjCBlock27_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) + ObjCBlock27.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.Int arg0)>(_ObjCBlock27_closureTrampoline) .cast(), - _ObjCBlock31_registerClosure(fn)), + _ObjCBlock27_registerClosure(fn)), lib); static ffi.Pointer? _dartFuncTrampoline; void call(int arg0) { @@ -75940,13959 +75212,16510 @@ class ObjCBlock31 extends _ObjCBlockBase { .cast< ffi.NativeFunction< ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, ffi.Uint16 arg0)>>() + ffi.Pointer<_ObjCBlock> block, ffi.Int 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) { +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 .cast< ffi.NativeFunction< - ffi.Void Function(dispatch_data_t arg0, dispatch_data_t arg1)>>() + ffi.Void Function( + ffi.Bool arg0, dispatch_data_t arg1, ffi.Int arg2)>>() .asFunction< void Function( - dispatch_data_t arg0, dispatch_data_t arg1)>()(arg0, arg1); + bool arg0, dispatch_data_t arg1, int arg2)>()(arg0, arg1, arg2); } -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); -} - -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]!( +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); } -class ObjCBlock33 extends _ObjCBlockBase { - ObjCBlock33._(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. - ObjCBlock33.fromFunctionPointer( + ObjCBlock28.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)>> + 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, - sec_protocol_metadata_t arg0, + ffi.Bool arg0, dispatch_data_t arg1, - sec_protocol_pre_shared_key_selection_complete_t - arg2)>(_ObjCBlock33_fnPtrTrampoline) + ffi.Int arg2)>(_ObjCBlock28_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) + ObjCBlock28.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, - sec_protocol_metadata_t arg0, + ffi.Bool arg0, dispatch_data_t arg1, - sec_protocol_pre_shared_key_selection_complete_t - arg2)>(_ObjCBlock33_closureTrampoline) + ffi.Int arg2)>(_ObjCBlock28_closureTrampoline) .cast(), - _ObjCBlock33_registerClosure(fn)), + _ObjCBlock28_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(bool arg0, dispatch_data_t arg1, int 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, ffi.Bool arg0, + dispatch_data_t arg1, ffi.Int 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, bool arg0, + dispatch_data_t arg1, int 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); - } +typedef dispatch_io_close_flags_t = ffi.UnsignedLong; +typedef dispatch_io_interval_flags_t = ffi.UnsignedLong; +typedef dispatch_workloop_t = ffi.Pointer; - ffi.Pointer<_ObjCBlock> get pointer => _id; -} +final class CFStreamError extends ffi.Struct { + @CFIndex() + external int domain; -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); + @SInt32() + external int error; } -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); +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; } -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); +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 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); - } +final class CFStreamClientContext extends ffi.Struct { + @CFIndex() + external int version; - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + external ffi.Pointer info; -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); -} + external ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer info)>> retain; -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); -} + external ffi.Pointer< + ffi.NativeFunction info)>> + release; -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); + external ffi.Pointer< + ffi.NativeFunction info)>> + copyDescription; } -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; +final class __CFReadStream extends ffi.Opaque {} - /// 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); - } +final class __CFWriteStream extends ffi.Opaque {} - ffi.Pointer<_ObjCBlock> get pointer => _id; -} +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 sec_protocol_verify_complete_t = ffi.Pointer<_ObjCBlock>; -void _ObjCBlock37_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, bool arg0) { - return block.ref.target - .cast>() - .asFunction()(arg0); +abstract class CFStreamErrorDomain { + static const int kCFStreamErrorDomainCustom = -1; + static const int kCFStreamErrorDomainPOSIX = 1; + static const int kCFStreamErrorDomainMacOSStatus = 2; } -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); +abstract class CFPropertyListMutabilityOptions { + static const int kCFPropertyListImmutable = 0; + static const int kCFPropertyListMutableContainers = 1; + static const int kCFPropertyListMutableContainersAndLeaves = 2; } -void _ObjCBlock37_closureTrampoline(ffi.Pointer<_ObjCBlock> block, bool arg0) { - return _ObjCBlock37_closureRegistry[block.ref.target.address]!(arg0); +abstract class CFPropertyListFormat { + static const int kCFPropertyListOpenStepFormat = 1; + static const int kCFPropertyListXMLFormat_v1_0 = 100; + static const int kCFPropertyListBinaryFormat_v1_0 = 200; } -class ObjCBlock37 extends _ObjCBlockBase { - ObjCBlock37._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +final class CFSetCallBacks extends ffi.Struct { + @CFIndex() + external int version; - /// 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; + external CFSetRetainCallBack retain; - /// 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); - } + external CFSetReleaseCallBack release; - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + external CFSetCopyDescriptionCallBack copyDescription; -class SSLContext extends ffi.Opaque {} + external CFSetEqualCallBack equal; -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 CFSetHashCallBack hash; } -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 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)>>; -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 __CFSet extends ffi.Opaque {} -abstract class SSLProtocolSide { - static const int kSSLServerSide = 0; - static const int kSSLClientSide = 1; +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; } -abstract class SSLConnectionType { - static const int kSSLStreamType = 0; - static const int kSSLDatagramType = 1; +final class CFTreeContext extends ffi.Struct { + @CFIndex() + external int version; + + external ffi.Pointer info; + + external CFTreeRetainCallBack retain; + + external CFTreeReleaseCallBack release; + + external CFTreeCopyDescriptionCallBack copyDescription; } -typedef SSLContextRef = ffi.Pointer; -typedef SSLReadFunc = ffi.Pointer< +typedef CFTreeRetainCallBack = ffi.Pointer< ffi.NativeFunction< - OSStatus Function( - SSLConnectionRef, ffi.Pointer, ffi.Pointer)>>; -typedef SSLConnectionRef = ffi.Pointer; -typedef SSLWriteFunc = ffi.Pointer< + ffi.Pointer Function(ffi.Pointer info)>>; +typedef CFTreeReleaseCallBack = ffi + .Pointer info)>>; +typedef CFTreeCopyDescriptionCallBack = ffi.Pointer< + ffi.NativeFunction info)>>; + +final class __CFTree extends ffi.Opaque {} + +typedef CFTreeRef = ffi.Pointer<__CFTree>; +typedef CFTreeApplierFunction = ffi.Pointer< ffi.NativeFunction< - OSStatus Function( - SSLConnectionRef, ffi.Pointer, ffi.Pointer)>>; + ffi.Void Function( + ffi.Pointer value, ffi.Pointer context)>>; -abstract class SSLAuthenticate { - static const int kNeverAuthenticate = 0; - static const int kAlwaysAuthenticate = 1; - static const int kTryAuthenticate = 2; +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; } -/// 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); +final class __CFUUID extends ffi.Opaque {} - /// 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 CFUUIDBytes extends ffi.Struct { + @UInt8() + external int byte0; - /// 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); - } + @UInt8() + external int byte1; - /// 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); - } + @UInt8() + external int byte2; - /// 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); - } + @UInt8() + external int byte3; - /// 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); - } + @UInt8() + external int byte4; - 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); - } + @UInt8() + external int byte5; - 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); - } + @UInt8() + external int byte6; - 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); - } + @UInt8() + external int byte7; - 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); - } + @UInt8() + external int byte8; - /// 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); - } + @UInt8() + external int byte9; - /// 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); - } + @UInt8() + external int byte10; - /// -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); - } + @UInt8() + external int byte11; - /// -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); - } + @UInt8() + external int byte12; - /// 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); - } + @UInt8() + external int byte13; - /// 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); - } + @UInt8() + external int byte14; - /// 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); - } + @UInt8() + external int byte15; +} - /// invokes completionHandler with all outstanding tasks. - void getAllTasksWithCompletionHandler_(ObjCBlock19 completionHandler) { - return _lib._objc_msgSend_398(_id, - _lib._sel_getAllTasksWithCompletionHandler_1, completionHandler._id); - } +typedef CFUUIDRef = ffi.Pointer<__CFUUID>; - /// 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); - } +final class __CFBundle extends ffi.Opaque {} - /// 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); - } +typedef CFBundleRef = ffi.Pointer<__CFBundle>; +typedef cpu_type_t = integer_t; +typedef CFPlugInRef = ffi.Pointer<__CFBundle>; +typedef CFBundleRefNum = ffi.Int; - /// 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); - } +final class __CFMessagePort extends ffi.Opaque {} - /// 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); - } +final class CFMessagePortContext extends ffi.Struct { + @CFIndex() + external int version; - /// 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 ffi.Pointer info; - /// 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 ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer info)>> retain; - /// 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); - } + external ffi.Pointer< + ffi.NativeFunction info)>> + release; - /// 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); - } + external ffi.Pointer< + ffi.NativeFunction info)>> + copyDescription; +} - /// 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); - } +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)>>; - /// 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); - } +final class __CFPlugInInstance extends ffi.Opaque {} - /// 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); - } +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)>>; - /// 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); - } +final class __CFMachPort extends ffi.Opaque {} - /// 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); - } +final class CFMachPortContext extends ffi.Struct { + @CFIndex() + external int version; - @override - NSURLSession init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSession._(_ret, _lib, retain: true, release: true); - } + external ffi.Pointer info; - 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< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer info)>> retain; - /// 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); - } + external ffi.Pointer< + ffi.NativeFunction info)>> + release; - /// 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 ffi.Pointer< + ffi.NativeFunction info)>> + copyDescription; +} - 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); - } +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)>>; - /// 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); - } +final class __CFAttributedString extends ffi.Opaque {} - 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); - } +typedef CFAttributedStringRef = ffi.Pointer<__CFAttributedString>; +typedef CFMutableAttributedStringRef = ffi.Pointer<__CFAttributedString>; - 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); - } +final class __CFURLEnumerator extends ffi.Opaque {} - 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); - } +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; } -/// 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 CFURLEnumeratorRef = ffi.Pointer<__CFURLEnumerator>; - /// 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); - } +abstract class CFURLEnumeratorResult { + static const int kCFURLEnumeratorSuccess = 1; + static const int kCFURLEnumeratorEnd = 2; + static const int kCFURLEnumeratorError = 3; + static const int kCFURLEnumeratorDirectoryPostOrderSuccess = 4; +} - /// 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); - } +final class guid_t extends ffi.Union { + @ffi.Array.multi([16]) + external ffi.Array g_guid; - /// 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); - } + @ffi.Array.multi([4]) + external ffi.Array g_guid_asint; +} - 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); - } +@ffi.Packed(1) +final class ntsid_t extends ffi.Struct { + @u_int8_t() + external int sid_kind; - 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); - } + @u_int8_t() + external int sid_authcount; - 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); - } + @ffi.Array.multi([6]) + external ffi.Array sid_authority; - /// 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); - } + @ffi.Array.multi([16]) + external ffi.Array sid_authorities; +} - /// default cache policy for requests - int get requestCachePolicy { - return _lib._objc_msgSend_355(_id, _lib._sel_requestCachePolicy1); - } +typedef u_int8_t = ffi.UnsignedChar; +typedef u_int32_t = ffi.UnsignedInt; - /// default cache policy for requests - set requestCachePolicy(int value) { - _lib._objc_msgSend_358(_id, _lib._sel_setRequestCachePolicy_1, value); - } +final class kauth_identity_extlookup extends ffi.Struct { + @u_int32_t() + external int el_seqno; - /// 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); - } + @u_int32_t() + external int el_result; - /// 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); - } + @u_int32_t() + external int el_flags; - /// 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); - } + @__darwin_pid_t() + external int el_info_pid; - /// 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); - } + @u_int64_t() + external int el_extend; - /// type of service for requests. - int get networkServiceType { - return _lib._objc_msgSend_356(_id, _lib._sel_networkServiceType1); - } + @u_int32_t() + external int el_info_reserved_1; - /// type of service for requests. - set networkServiceType(int value) { - _lib._objc_msgSend_359(_id, _lib._sel_setNetworkServiceType_1, value); - } + @uid_t() + external int el_uid; - /// allow request to route over cellular. - bool get allowsCellularAccess { - return _lib._objc_msgSend_11(_id, _lib._sel_allowsCellularAccess1); - } + external guid_t el_uguid; - /// allow request to route over cellular. - set allowsCellularAccess(bool value) { - _lib._objc_msgSend_328(_id, _lib._sel_setAllowsCellularAccess_1, value); - } + @u_int32_t() + external int el_uguid_valid; - /// allow request to route over expensive networks. Defaults to YES. - bool get allowsExpensiveNetworkAccess { - return _lib._objc_msgSend_11(_id, _lib._sel_allowsExpensiveNetworkAccess1); - } + external ntsid_t el_usid; - /// allow request to route over expensive networks. Defaults to YES. - set allowsExpensiveNetworkAccess(bool value) { - _lib._objc_msgSend_328( - _id, _lib._sel_setAllowsExpensiveNetworkAccess_1, value); - } + @u_int32_t() + external int el_usid_valid; - /// allow request to route over networks in constrained mode. Defaults to YES. - bool get allowsConstrainedNetworkAccess { - return _lib._objc_msgSend_11( - _id, _lib._sel_allowsConstrainedNetworkAccess1); - } + @gid_t() + external int el_gid; - /// 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 guid_t el_gguid; - /// 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); - } + @u_int32_t() + external int el_gguid_valid; - /// 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); - } + external ntsid_t el_gsid; - /// 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); - } + @u_int32_t() + external int el_gsid_valid; - /// 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); - } + @u_int32_t() + external int el_member_valid; - /// 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); - } + @u_int32_t() + external int el_sup_grp_cnt; - /// 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); - } + @ffi.Array.multi([16]) + external ffi.Array el_sup_groups; +} - /// 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); - } +typedef u_int64_t = ffi.UnsignedLongLong; - /// 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); - } +final class kauth_cache_sizes extends ffi.Struct { + @u_int32_t() + external int kcs_group_size; - /// 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); - } + @u_int32_t() + external int kcs_id_size; +} - /// 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 kauth_ace extends ffi.Struct { + external guid_t ace_applicable; - /// The minimum allowable versions of the TLS protocol, from - int get TLSMinimumSupportedProtocol { - return _lib._objc_msgSend_383(_id, _lib._sel_TLSMinimumSupportedProtocol1); - } + @u_int32_t() + external int ace_flags; - /// The minimum allowable versions of the TLS protocol, from - set TLSMinimumSupportedProtocol(int value) { - _lib._objc_msgSend_384( - _id, _lib._sel_setTLSMinimumSupportedProtocol_1, value); - } + @kauth_ace_rights_t() + external int ace_rights; +} - /// The maximum allowable versions of the TLS protocol, from - int get TLSMaximumSupportedProtocol { - return _lib._objc_msgSend_383(_id, _lib._sel_TLSMaximumSupportedProtocol1); - } +typedef kauth_ace_rights_t = u_int32_t; - /// The maximum allowable versions of the TLS protocol, from - set TLSMaximumSupportedProtocol(int value) { - _lib._objc_msgSend_384( - _id, _lib._sel_setTLSMaximumSupportedProtocol_1, value); - } +final class kauth_acl extends ffi.Struct { + @u_int32_t() + external int acl_entrycount; - /// The minimum allowable versions of the TLS protocol, from - int get TLSMinimumSupportedProtocolVersion { - return _lib._objc_msgSend_385( - _id, _lib._sel_TLSMinimumSupportedProtocolVersion1); - } + @u_int32_t() + external int acl_flags; - /// The minimum allowable versions of the TLS protocol, from - set TLSMinimumSupportedProtocolVersion(int value) { - _lib._objc_msgSend_386( - _id, _lib._sel_setTLSMinimumSupportedProtocolVersion_1, value); - } + @ffi.Array.multi([1]) + external ffi.Array acl_ace; +} - /// The maximum allowable versions of the TLS protocol, from - int get TLSMaximumSupportedProtocolVersion { - return _lib._objc_msgSend_385( - _id, _lib._sel_TLSMaximumSupportedProtocolVersion1); - } +final class kauth_filesec extends ffi.Struct { + @u_int32_t() + external int fsec_magic; - /// The maximum allowable versions of the TLS protocol, from - set TLSMaximumSupportedProtocolVersion(int value) { - _lib._objc_msgSend_386( - _id, _lib._sel_setTLSMaximumSupportedProtocolVersion_1, value); - } + external guid_t fsec_owner; - /// Allow the use of HTTP pipelining - bool get HTTPShouldUsePipelining { - return _lib._objc_msgSend_11(_id, _lib._sel_HTTPShouldUsePipelining1); - } + external guid_t fsec_group; - /// Allow the use of HTTP pipelining - set HTTPShouldUsePipelining(bool value) { - _lib._objc_msgSend_328(_id, _lib._sel_setHTTPShouldUsePipelining_1, value); - } + external kauth_acl fsec_acl; +} - /// Allow the session to set cookies on requests - bool get HTTPShouldSetCookies { - return _lib._objc_msgSend_11(_id, _lib._sel_HTTPShouldSetCookies1); - } +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; +} - /// Allow the session to set cookies on requests - set HTTPShouldSetCookies(bool value) { - _lib._objc_msgSend_328(_id, _lib._sel_setHTTPShouldSetCookies_1, value); - } +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; +} - /// 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); - } +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; +} - /// 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); - } +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; +} - /// 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); - } +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; +} - /// 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); - } +final class _acl extends ffi.Opaque {} - /// The maximum number of simultanous persistent connections per host - int get HTTPMaximumConnectionsPerHost { - return _lib._objc_msgSend_81(_id, _lib._sel_HTTPMaximumConnectionsPerHost1); - } +final class _acl_entry extends ffi.Opaque {} - /// The maximum number of simultanous persistent connections per host - set HTTPMaximumConnectionsPerHost(int value) { - _lib._objc_msgSend_342( - _id, _lib._sel_setHTTPMaximumConnectionsPerHost_1, value); - } +final class _acl_permset extends ffi.Opaque {} - /// 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 _acl_flagset extends ffi.Opaque {} - /// 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); - } +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>; - /// 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); - } +final class __CFFileSecurity extends ffi.Opaque {} - /// 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); - } +typedef CFFileSecurityRef = ffi.Pointer<__CFFileSecurity>; - /// 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); - } +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; +} - /// 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); - } +final class __CFStringTokenizer extends ffi.Opaque {} - /// 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); - } +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; +} - /// 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); - } +typedef CFStringTokenizerRef = ffi.Pointer<__CFStringTokenizer>; - /// 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); - } +final class __CFFileDescriptor extends ffi.Opaque {} - /// 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); - } +final class CFFileDescriptorContext extends ffi.Struct { + @CFIndex() + external int version; - /// multipath service type to use for connections. The default is NSURLSessionMultipathServiceTypeNone - int get multipathServiceType { - return _lib._objc_msgSend_393(_id, _lib._sel_multipathServiceType1); - } + external ffi.Pointer info; - /// 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); - } + external ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer info)>> retain; - @override - NSURLSessionConfiguration init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); - } + external ffi.Pointer< + ffi.NativeFunction info)>> + release; - 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); - } + external ffi.Pointer< + ffi.NativeFunction info)>> + copyDescription; +} - 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 CFFileDescriptorRef = ffi.Pointer<__CFFileDescriptor>; +typedef CFFileDescriptorNativeDescriptor = ffi.Int; +typedef CFFileDescriptorCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(CFFileDescriptorRef f, CFOptionFlags callBackTypes, + ffi.Pointer info)>>; - 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 __CFUserNotification extends ffi.Opaque {} + +typedef CFUserNotificationRef = ffi.Pointer<__CFUserNotification>; +typedef CFUserNotificationCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(CFUserNotificationRef userNotification, + CFOptionFlags responseFlags)>>; + +final 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 NSURLCredentialStorage extends _ObjCWrapper { - NSURLCredentialStorage._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +final class CFXMLElementInfo extends ffi.Struct { + external CFDictionaryRef attributes; - /// 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); - } + external CFArrayRef attributeOrder; - /// 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); - } + @Boolean() + external int isEmpty; - /// 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); - } + @ffi.Array.multi([3]) + external ffi.Array _reserved; } -class NSURLCache extends _ObjCWrapper { - NSURLCache._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +final class CFXMLProcessingInstructionInfo extends ffi.Struct { + external CFStringRef dataString; +} - /// 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 CFXMLDocumentInfo extends ffi.Struct { + external CFURLRef sourceURL; - /// 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); - } + @CFStringEncoding() + external int encoding; +} - /// 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); - } +final class CFXMLExternalID extends ffi.Struct { + external CFURLRef systemID; + + external CFStringRef publicID; } -/// ! -/// @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; +final class CFXMLDocumentTypeInfo extends ffi.Struct { + external CFXMLExternalID externalID; +} - /// Handover - secondary flows brought up when primary flow is not performing adequately. - static const int NSURLSessionMultipathServiceTypeHandover = 1; +final class CFXMLNotationInfo extends ffi.Struct { + external CFXMLExternalID externalID; +} - /// Interactive - secondary flows created more aggressively. - static const int NSURLSessionMultipathServiceTypeInteractive = 2; +final class CFXMLElementTypeDeclarationInfo extends ffi.Struct { + external CFStringRef contentDescription; +} - /// Aggregate - multiple subflows used for greater bandwitdh. - static const int NSURLSessionMultipathServiceTypeAggregate = 3; +final class CFXMLAttributeDeclarationInfo extends ffi.Struct { + external CFStringRef attributeName; + + external CFStringRef typeString; + + external CFStringRef defaultString; } -void _ObjCBlock38_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) { +final 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; +} + +final class CFXMLEntityInfo extends ffi.Struct { + @ffi.Int32() + external int entityType; + + external CFStringRef replacementText; + + external CFXMLExternalID entityID; + + external CFStringRef notationName; +} + +final class CFXMLEntityReferenceInfo extends ffi.Struct { + @ffi.Int32() + external int entityType; +} + +typedef CFXMLNodeRef = ffi.Pointer<__CFXMLNode>; +typedef CFXMLTreeRef = CFTreeRef; + +final 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; +} + +final 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 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)>>; + +final 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< + 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( - 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.Void Function(SecTrustRef arg0, ffi.Int32 arg1)>>() + .asFunction()(arg0, arg1); } -final _ObjCBlock38_closureRegistry = {}; -int _ObjCBlock38_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock38_registerClosure(Function fn) { - final id = ++_ObjCBlock38_closureRegistryIndex; - _ObjCBlock38_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 _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); +void _ObjCBlock29_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, SecTrustRef arg0, int arg1) { + return _ObjCBlock29_closureRegistry[block.ref.target.address]!(arg0, arg1); } -class ObjCBlock38 extends _ObjCBlockBase { - ObjCBlock38._(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. - ObjCBlock38.fromFunctionPointer( + ObjCBlock29.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>> + ffi.Void Function(SecTrustRef arg0, ffi.Int32 arg1)>> ptr) : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< + 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()), + SecTrustRef arg0, + ffi.Int32 arg1)>(_ObjCBlock29_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) + 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, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>( - _ObjCBlock38_closureTrampoline) + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + SecTrustRef arg0, + ffi.Int32 arg1)>(_ObjCBlock29_closureTrampoline) .cast(), - _ObjCBlock38_registerClosure(fn)), + _ObjCBlock29_registerClosure(fn)), lib); static ffi.Pointer? _dartFuncTrampoline; - void call(ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2) { + void call(SecTrustRef arg0, int arg1) { return _id.ref.invoke .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + SecTrustRef arg0, ffi.Int32 arg1)>>() .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); + void Function(ffi.Pointer<_ObjCBlock> block, SecTrustRef arg0, + int arg1)>()(_id, arg0, arg1); } - - 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); - } +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); +} - 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); - } +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 NSURLSessionDataTask alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionDataTask1, _lib._sel_alloc1); - return NSURLSessionDataTask._(_ret, _lib, retain: false, release: true); - } +void _ObjCBlock30_closureTrampoline(ffi.Pointer<_ObjCBlock> block, + SecTrustRef arg0, bool arg1, CFErrorRef arg2) { + return _ObjCBlock30_closureRegistry[block.ref.target.address]!( + arg0, arg1, arg2); } -/// 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); +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. - ObjCBlock39.fromFunctionPointer( + ObjCBlock30.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0)>> + 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.Pointer arg0)>( - _ObjCBlock39_fnPtrTrampoline) + 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. - ObjCBlock39.fromFunction( - NativeCupertinoHttp lib, void Function(ffi.Pointer arg0) fn) + 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, - ffi.Pointer arg0)>( - _ObjCBlock39_closureTrampoline) + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + SecTrustRef arg0, + ffi.Bool arg1, + CFErrorRef arg2)>(_ObjCBlock30_closureTrampoline) .cast(), - _ObjCBlock39_registerClosure(fn)), + _ObjCBlock30_registerClosure(fn)), lib); static ffi.Pointer? _dartFuncTrampoline; - void call(ffi.Pointer arg0) { + void call(SecTrustRef arg0, bool arg1, CFErrorRef arg2) { return _id.ref.invoke .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>>() + SecTrustRef arg0, ffi.Bool arg1, CFErrorRef arg2)>>() .asFunction< - void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer 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; } -/// 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); +typedef SecKeyRef = ffi.Pointer<__SecKey>; +typedef SecCertificateRef = ffi.Pointer<__SecCertificate>; - /// 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_data extends ffi.Struct { + @ffi.Size() + external int Length; - /// 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 Data; +} - /// 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); - } +final class SecAsn1AlgId extends ffi.Struct { + external SecAsn1Oid algorithm; - /// 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 SecAsn1Item parameters; +} - /// 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 SecAsn1Oid = cssm_data; +typedef SecAsn1Item = cssm_data; - /// -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 SecAsn1PubKeyInfo extends ffi.Struct { + external SecAsn1AlgId algorithm; - /// 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 SecAsn1Item subjectPublicKey; +} - /// 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); - } +final class SecAsn1Template_struct extends ffi.Struct { + @ffi.Uint32() + external int kind; - /// 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); - } + @ffi.Uint32() + external int offset; - /// 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 ffi.Pointer sub; - @override - NSURLSessionStreamTask init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSessionStreamTask._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint32() + external int size; +} - 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); - } +final class cssm_guid extends ffi.Struct { + @uint32() + external int Data1; - 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); - } -} + @uint16() + external int Data2; -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); -} + @uint16() + external int Data3; -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); + @ffi.Array.multi([8]) + external ffi.Array Data4; } -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 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; } -class ObjCBlock40 extends _ObjCBlockBase { - ObjCBlock40._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +final class cssm_subservice_uid extends ffi.Struct { + external CSSM_GUID Guid; - /// 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 CSSM_VERSION Version; - /// 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); - } + @uint32() + external int SubserviceId; - ffi.Pointer<_ObjCBlock> get pointer => _id; + @CSSM_SERVICE_TYPE() + external int SubserviceType; } -void _ObjCBlock41_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { - return block.ref.target - .cast< - ffi.NativeFunction arg0)>>() - .asFunction arg0)>()(arg0); -} +typedef CSSM_GUID = cssm_guid; +typedef CSSM_VERSION = cssm_version; +typedef CSSM_SERVICE_TYPE = CSSM_SERVICE_MASK; +typedef CSSM_SERVICE_MASK = uint32; -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); -} +final class cssm_net_address extends ffi.Struct { + @CSSM_NET_ADDRESS_TYPE() + external int AddressType; -void _ObjCBlock41_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { - return _ObjCBlock41_closureRegistry[block.ref.target.address]!(arg0); + external SecAsn1Item Address; } -class ObjCBlock41 extends _ObjCBlockBase { - ObjCBlock41._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +typedef CSSM_NET_ADDRESS_TYPE = 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_crypto_data extends ffi.Struct { + external SecAsn1Item Param; - /// 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 CSSM_CALLBACK Callback; - ffi.Pointer<_ObjCBlock> get pointer => _id; + external ffi.Pointer CallerCtx; } -class NSNetService extends _ObjCWrapper { - NSNetService._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +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; - /// 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); - } +final class cssm_list_element extends ffi.Struct { + external ffi.Pointer NextElement; - /// 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); - } + @CSSM_WORDID_TYPE() + external int WordID; - /// 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_LIST_ELEMENT_TYPE() + external int ElementType; + + external UnnamedUnion2 Element; } -/// 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_WORDID_TYPE = sint32; +typedef CSSM_LIST_ELEMENT_TYPE = uint32; - /// 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 UnnamedUnion2 extends ffi.Union { + external CSSM_LIST Sublist; - /// 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 SecAsn1Item Word; +} - /// 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); - } +typedef CSSM_LIST = cssm_list; - /// 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); - } +final class cssm_list extends ffi.Struct { + @CSSM_LIST_TYPE() + external int ListType; - /// 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_LIST_ELEMENT_PTR Head; - /// 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_LIST_ELEMENT_PTR Tail; +} - /// 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_LIST_TYPE = uint32; +typedef CSSM_LIST_ELEMENT_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_TUPLE extends ffi.Struct { + external CSSM_LIST Issuer; - /// 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); - } + external CSSM_LIST Subject; - /// 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); - } + @CSSM_BOOL() + external int Delegate; - /// 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_LIST AuthorizationTag; - @override - NSURLSessionWebSocketTask init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSessionWebSocketTask._(_ret, _lib, retain: true, release: true); - } + external CSSM_LIST ValidityPeriod; +} - 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); - } +typedef CSSM_BOOL = sint32; - 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); - } +final class cssm_tuplegroup extends ffi.Struct { + @uint32() + external int NumberOfTuples; + + external CSSM_TUPLE_PTR Tuples; } -/// 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_TUPLE_PTR = ffi.Pointer; - /// 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_sample extends ffi.Struct { + external CSSM_LIST TypedSample; - /// 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 ffi.Pointer Verifier; +} - /// 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_SUBSERVICE_UID = cssm_subservice_uid; - /// 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); - } +final class cssm_samplegroup extends ffi.Struct { + @uint32() + external int NumberOfSamples; - /// 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); - } + external ffi.Pointer Samples; +} - int get type { - return _lib._objc_msgSend_412(_id, _lib._sel_type1); - } +typedef CSSM_SAMPLE = cssm_sample; - 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); - } +final class cssm_memory_funcs extends ffi.Struct { + external CSSM_MALLOC malloc_func; - 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_FREE free_func; - @override - NSURLSessionWebSocketMessage init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSessionWebSocketMessage._(_ret, _lib, - retain: true, release: true); - } + external CSSM_REALLOC realloc_func; - 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_CALLOC calloc_func; - 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 ffi.Pointer AllocRef; } -abstract class NSURLSessionWebSocketMessageType { - static const int NSURLSessionWebSocketMessageTypeData = 0; - static const int NSURLSessionWebSocketMessageTypeString = 1; +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)>>; + +final class cssm_encoded_cert extends ffi.Struct { + @CSSM_CERT_TYPE() + external int CertType; + + @CSSM_CERT_ENCODING() + external int CertEncoding; + + external SecAsn1Item CertBlob; } -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_CERT_TYPE = uint32; +typedef CSSM_CERT_ENCODING = uint32; + +final class cssm_parsed_cert extends ffi.Struct { + @CSSM_CERT_TYPE() + external int CertType; + + @CSSM_CERT_PARSE_FORMAT() + external int ParsedCertFormat; + + external ffi.Pointer ParsedCert; } -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); +typedef CSSM_CERT_PARSE_FORMAT = uint32; + +final class cssm_cert_pair extends ffi.Struct { + external CSSM_ENCODED_CERT EncodedCert; + + external CSSM_PARSED_CERT ParsedCert; } -void _ObjCBlock42_closureTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1) { - return _ObjCBlock42_closureRegistry[block.ref.target.address]!(arg0, arg1); +typedef CSSM_ENCODED_CERT = cssm_encoded_cert; +typedef CSSM_PARSED_CERT = cssm_parsed_cert; + +final class cssm_certgroup extends ffi.Struct { + @CSSM_CERT_TYPE() + external int CertType; + + @CSSM_CERT_ENCODING() + external int CertEncoding; + + @uint32() + external int NumCerts; + + external UnnamedUnion3 GroupList; + + @CSSM_CERTGROUP_TYPE() + external int CertGroupType; + + external ffi.Pointer Reserved; } -class ObjCBlock42 extends _ObjCBlockBase { - ObjCBlock42._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +final class UnnamedUnion3 extends ffi.Union { + external CSSM_DATA_PTR CertList; - /// 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_ENCODED_CERT_PTR EncodedCertList; - /// 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_PARSED_CERT_PTR ParsedCertList; - ffi.Pointer<_ObjCBlock> get pointer => _id; + external CSSM_CERT_PAIR_PTR PairCertList; } -/// 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_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; } -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); +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; } -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_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; + +final class cssm_authorizationgroup extends ffi.Struct { + @uint32() + external int NumberOfAuthTags; + + external ffi.Pointer AuthTags; } -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); +typedef CSSM_ACL_AUTHORIZATION_TAG = sint32; + +final class cssm_acl_validity_period extends ffi.Struct { + external SecAsn1Item StartDate; + + external SecAsn1Item EndDate; } -class ObjCBlock43 extends _ObjCBlockBase { - ObjCBlock43._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +final class cssm_acl_entry_prototype extends ffi.Struct { + external CSSM_LIST TypedSubject; - /// 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; + @CSSM_BOOL() + external int Delegate; - /// 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); - } + external CSSM_AUTHORIZATIONGROUP Authorization; - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + external CSSM_ACL_VALIDITY_PERIOD TimeRange; -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); + @ffi.Array.multi([68]) + external ffi.Array EntryTag; } -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_AUTHORIZATIONGROUP = cssm_authorizationgroup; +typedef CSSM_ACL_VALIDITY_PERIOD = cssm_acl_validity_period; + +final class cssm_acl_owner_prototype extends ffi.Struct { + external CSSM_LIST TypedSubject; + + @CSSM_BOOL() + external int Delegate; } -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); +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; } -class ObjCBlock44 extends _ObjCBlockBase { - ObjCBlock44._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, 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 SubjectRequest, + CSSM_LIST_PTR SubjectResponse, + ffi.Pointer CallerContext, + ffi.Pointer MemFuncs)>>; +typedef CSSM_LIST_PTR = ffi.Pointer; - /// 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); - } +final class cssm_resource_control_context extends ffi.Struct { + external CSSM_ACCESS_CREDENTIALS_PTR AccessCred; - ffi.Pointer<_ObjCBlock> get pointer => _id; + external CSSM_ACL_ENTRY_INPUT InitialAclEntry; } -/// 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_ACCESS_CREDENTIALS_PTR = ffi.Pointer; +typedef CSSM_ACL_ENTRY_INPUT = cssm_acl_entry_input; - /// Use the specified request, which may not be nil. - static const int NSURLSessionDelayedRequestUseNewRequest = 1; +final class cssm_acl_entry_info extends ffi.Struct { + external CSSM_ACL_ENTRY_PROTOTYPE EntryPublicInfo; - /// Cancel the task; the request parameter is ignored. - static const int NSURLSessionDelayedRequestCancel = 2; + @CSSM_ACL_HANDLE() + external int EntryHandle; } -abstract class NSURLSessionAuthChallengeDisposition { - /// Use the specified credential, which may be nil - static const int NSURLSessionAuthChallengeUseCredential = 0; +typedef CSSM_ACL_HANDLE = CSSM_HANDLE; - /// 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_acl_edit extends ffi.Struct { + @CSSM_ACL_EDIT_MODE() + external int EditMode; - /// The entire request will be canceled; the credential parameter is ignored. - static const int NSURLSessionAuthChallengeCancelAuthenticationChallenge = 2; + @CSSM_ACL_HANDLE() + external int OldEntryHandle; - /// This challenge is rejected and the next authentication protection space should be tried; the credential parameter is ignored. - static const int NSURLSessionAuthChallengeRejectProtectionSpace = 3; + external ffi.Pointer NewEntry; } -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; +typedef CSSM_ACL_EDIT_MODE = uint32; - /// Turn this request into a download - static const int NSURLSessionResponseBecomeDownload = 2; +final class cssm_func_name_addr extends ffi.Struct { + @ffi.Array.multi([68]) + external ffi.Array Name; - /// Turn this task into a stream task - static const int NSURLSessionResponseBecomeStream = 3; + external CSSM_PROC_ADDR Address; } -/// The resource fetch type. -abstract class NSURLSessionTaskMetricsResourceFetchType { - static const int NSURLSessionTaskMetricsResourceFetchTypeUnknown = 0; +typedef CSSM_PROC_ADDR = ffi.Pointer>; - /// The resource was loaded over the network. - static const int NSURLSessionTaskMetricsResourceFetchTypeNetworkLoad = 1; +final class cssm_date extends ffi.Struct { + @ffi.Array.multi([4]) + external ffi.Array Year; - /// The resource was pushed by the server to the client. - static const int NSURLSessionTaskMetricsResourceFetchTypeServerPush = 2; + @ffi.Array.multi([2]) + external ffi.Array Month; - /// The resource was retrieved from the local storage. - static const int NSURLSessionTaskMetricsResourceFetchTypeLocalCache = 3; + @ffi.Array.multi([2]) + external ffi.Array Day; } -/// DNS protocol used for domain resolution. -abstract class NSURLSessionTaskMetricsDomainResolutionProtocol { - static const int NSURLSessionTaskMetricsDomainResolutionProtocolUnknown = 0; - - /// Resolution used DNS over UDP. - static const int NSURLSessionTaskMetricsDomainResolutionProtocolUDP = 1; +final class cssm_range extends ffi.Struct { + @uint32() + external int Min; - /// Resolution used DNS over TCP. - static const int NSURLSessionTaskMetricsDomainResolutionProtocolTCP = 2; + @uint32() + external int Max; +} - /// Resolution used DNS over TLS. - static const int NSURLSessionTaskMetricsDomainResolutionProtocolTLS = 3; +final class cssm_query_size_data extends ffi.Struct { + @uint32() + external int SizeInputBlock; - /// Resolution used DNS over HTTPS. - static const int NSURLSessionTaskMetricsDomainResolutionProtocolHTTPS = 4; + @uint32() + external int SizeOutputBlock; } -/// 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); +final class cssm_key_size extends ffi.Struct { + @uint32() + external int LogicalKeySizeInBits; - /// 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); - } + @uint32() + external int EffectiveKeySizeInBits; +} - /// 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); - } +final class cssm_keyheader extends ffi.Struct { + @CSSM_HEADERVERSION() + external int HeaderVersion; - /// 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 CSSM_GUID CspId; - /// 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); - } + @CSSM_KEYBLOB_TYPE() + external int BlobType; - /// 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); - } + @CSSM_KEYBLOB_FORMAT() + external int Format; - /// 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); - } + @CSSM_ALGORITHMS() + external int AlgorithmId; - /// 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_KEYCLASS() + external int KeyClass; - /// 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); - } + @uint32() + external int LogicalKeySizeInBits; - /// 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); - } + @CSSM_KEYATTR_FLAGS() + external int KeyAttr; - /// 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_KEYUSE() + external int KeyUsage; - /// 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); - } + external CSSM_DATE StartDate; - /// 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); - } + external CSSM_DATE EndDate; - /// 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_ALGORITHMS() + external int WrapAlgorithmId; - /// 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); - } + @CSSM_ENCRYPT_MODE() + external int WrapMode; - /// 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); - } + @uint32() + external int Reserved; +} - /// 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); - } +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; - /// 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); - } +final class cssm_key extends ffi.Struct { + external CSSM_KEYHEADER KeyHeader; - /// 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); - } + external SecAsn1Item KeyData; +} - /// 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); - } +typedef CSSM_KEYHEADER = cssm_keyheader; - /// 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); - } +final class cssm_dl_db_handle extends ffi.Struct { + @CSSM_DL_HANDLE() + external int DLHandle; - /// countOfRequestHeaderBytesSent is the number of bytes transferred for request header. - int get countOfRequestHeaderBytesSent { - return _lib._objc_msgSend_325( - _id, _lib._sel_countOfRequestHeaderBytesSent1); - } + @CSSM_DB_HANDLE() + external int DBHandle; +} - /// 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); - } +typedef CSSM_DL_HANDLE = CSSM_MODULE_HANDLE; +typedef CSSM_DB_HANDLE = CSSM_MODULE_HANDLE; - /// countOfRequestBodyBytesBeforeEncoding is the size of upload body data, file, or stream. - int get countOfRequestBodyBytesBeforeEncoding { - return _lib._objc_msgSend_325( - _id, _lib._sel_countOfRequestBodyBytesBeforeEncoding1); - } +final class cssm_context_attribute extends ffi.Struct { + @CSSM_ATTRIBUTE_TYPE() + external int AttributeType; - /// countOfResponseHeaderBytesReceived is the number of bytes transferred for response header. - int get countOfResponseHeaderBytesReceived { - return _lib._objc_msgSend_325( - _id, _lib._sel_countOfResponseHeaderBytesReceived1); - } + @uint32() + external int AttributeLength; - /// 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_context_attribute_value Attribute; +} - /// 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_ATTRIBUTE_TYPE = uint32; - /// 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); - } +final class cssm_context_attribute_value extends ffi.Union { + external ffi.Pointer String; - /// 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); - } + @uint32() + external int Uint32; - /// 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); - } + external CSSM_ACCESS_CREDENTIALS_PTR AccessCredentials; - /// 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); - } + external CSSM_KEY_PTR Key; - /// 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 CSSM_DATA_PTR Data; - /// 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); - } + @CSSM_PADDING() + external int Padding; - /// Whether the connection is established over a cellular interface. - bool get cellular { - return _lib._objc_msgSend_11(_id, _lib._sel_isCellular1); - } + external CSSM_DATE_PTR Date; - /// Whether the connection is established over an expensive interface. - bool get expensive { - return _lib._objc_msgSend_11(_id, _lib._sel_isExpensive1); - } + external CSSM_RANGE_PTR Range; - /// Whether the connection is established over a constrained interface. - bool get constrained { - return _lib._objc_msgSend_11(_id, _lib._sel_isConstrained1); - } + external CSSM_CRYPTO_DATA_PTR CryptoData; - /// Whether a multipath protocol is successfully negotiated for the connection. - bool get multipath { - return _lib._objc_msgSend_11(_id, _lib._sel_isMultipath1); - } + external CSSM_VERSION_PTR Version; - /// DNS protocol used for domain resolution. - int get domainResolutionProtocol { - return _lib._objc_msgSend_429(_id, _lib._sel_domainResolutionProtocol1); - } + external CSSM_DL_DB_HANDLE_PTR DLDBHandle; - @override - NSURLSessionTaskTransactionMetrics init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSessionTaskTransactionMetrics._(_ret, _lib, - retain: true, release: true); - } + external ffi.Pointer KRProfile; +} - 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); - } +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; - 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); - } -} +final class cssm_kr_profile extends ffi.Opaque {} -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 cssm_context extends ffi.Struct { + @CSSM_CONTEXT_TYPE() + external int ContextType; - /// 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); - } + @CSSM_ALGORITHMS() + external int AlgorithmType; - /// 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); - } + @uint32() + external int NumberOfAttributes; - /// 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); - } + external CSSM_CONTEXT_ATTRIBUTE_PTR ContextAttributes; - /// 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_CSP_HANDLE() + external int CSPHandle; - /// 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); - } + @CSSM_BOOL() + external int Privileged; - /// redirectCount is the number of redirects that were recorded. - int get redirectCount { - return _lib._objc_msgSend_12(_id, _lib._sel_redirectCount1); - } + @uint32() + external int EncryptionProhibited; - @override - NSURLSessionTaskMetrics init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSessionTaskMetrics._(_ret, _lib, retain: true, release: true); - } + @uint32() + external int WorkFactor; - 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); - } + @uint32() + external int Reserved; +} - 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); - } +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; + + external SecAsn1Item HashParams; + + @CSSM_PKCS_OAEP_MGF() + external int MGF; + + external SecAsn1Item MGFParams; + + @CSSM_PKCS_OAEP_PSOURCE() + external int PSource; + + external SecAsn1Item PSourceParams; } -class NSDateInterval extends _ObjCWrapper { - NSDateInterval._(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 [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); - } +final class cssm_csp_operational_statistics extends ffi.Struct { + @CSSM_BOOL() + external int UserAuthenticated; - /// 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); - } + @CSSM_CSP_FLAGS() + external int DeviceFlags; - /// 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); - } + @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; } -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_CSP_FLAGS = uint32; + +final class cssm_pkcs5_pbkdf1_params extends ffi.Struct { + external SecAsn1Item Passphrase; + + external SecAsn1Item InitVector; } -abstract class NSItemProviderFileOptions { - static const int NSItemProviderFileOptionOpenInPlace = 1; +final class cssm_pkcs5_pbkdf2_params extends ffi.Struct { + external SecAsn1Item Passphrase; + + @CSSM_PKCS5_PBKDF2_PRF() + external int PseudoRandomFunction; } -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_PKCS5_PBKDF2_PRF = uint32; - /// 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_kea_derive_params extends ffi.Struct { + external SecAsn1Item Rb; - /// 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 Yb; +} - /// 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); - } +final class cssm_tp_authority_id extends ffi.Struct { + external ffi.Pointer AuthorityCert; - @override - NSItemProvider init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSItemProvider._(_ret, _lib, retain: true, release: true); - } + external CSSM_NET_ADDRESS_PTR AuthorityLocation; +} - 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); - } +typedef CSSM_NET_ADDRESS_PTR = ffi.Pointer; - 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); - } +final class cssm_field extends ffi.Struct { + external SecAsn1Oid FieldOid; - 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 SecAsn1Item FieldValue; +} - NSArray registeredTypeIdentifiersWithFileOptions_(int fileOptions) { - final _ret = _lib._objc_msgSend_433( - _id, _lib._sel_registeredTypeIdentifiersWithFileOptions_1, fileOptions); - return NSArray._(_ret, _lib, retain: true, release: true); - } +final class cssm_tp_policyinfo extends ffi.Struct { + @uint32() + external int NumberOfPolicyIds; - bool hasItemConformingToTypeIdentifier_(NSString? typeIdentifier) { - return _lib._objc_msgSend_22( - _id, - _lib._sel_hasItemConformingToTypeIdentifier_1, - typeIdentifier?._id ?? ffi.nullptr); - } + external CSSM_FIELD_PTR PolicyIds; - bool hasRepresentationConformingToTypeIdentifier_fileOptions_( - NSString? typeIdentifier, int fileOptions) { - return _lib._objc_msgSend_434( - _id, - _lib._sel_hasRepresentationConformingToTypeIdentifier_fileOptions_1, - typeIdentifier?._id ?? ffi.nullptr, - fileOptions); - } + external ffi.Pointer PolicyControl; +} - 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_FIELD_PTR = ffi.Pointer; - 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_dl_db_list extends ffi.Struct { + @uint32() + external int NumHandles; - 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_DL_DB_HANDLE_PTR DLDBHandle; +} - 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_tp_callerauth_context extends ffi.Struct { + external CSSM_TP_POLICYINFO Policy; - set suggestedName(NSString? value) { - _lib._objc_msgSend_327( - _id, _lib._sel_setSuggestedName_1, value?._id ?? ffi.nullptr); - } + external CSSM_TIMESTRING VerifyTime; - 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); - } + @CSSM_TP_STOP_ON() + external int VerificationAbortOn; - void registerObject_visibility_(NSObject? object, int visibility) { - return _lib._objc_msgSend_438(_id, _lib._sel_registerObject_visibility_1, - object?._id ?? ffi.nullptr, visibility); - } + external CSSM_TP_VERIFICATION_RESULTS_CALLBACK CallbackWithVerifiedCert; - 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); - } + @uint32() + external int NumberOfAnchorCerts; - bool canLoadObjectOfClass_(NSObject? aClass) { - return _lib._objc_msgSend_0( - _id, _lib._sel_canLoadObjectOfClass_1, aClass?._id ?? ffi.nullptr); - } + external CSSM_DATA_PTR AnchorCerts; - 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_DL_DB_LIST_PTR DBList; - 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_ACCESS_CREDENTIALS_PTR CallerCredentials; +} - 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); - } +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; - 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_encoded_crl extends ffi.Struct { + @CSSM_CRL_TYPE() + external int CrlType; - 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); - } + @CSSM_CRL_ENCODING() + external int CrlEncoding; - NSItemProviderLoadHandler get previewImageHandler { - return _lib._objc_msgSend_444(_id, _lib._sel_previewImageHandler1); - } + external SecAsn1Item CrlBlob; +} - set previewImageHandler(NSItemProviderLoadHandler value) { - _lib._objc_msgSend_445(_id, _lib._sel_setPreviewImageHandler_1, value); - } +typedef CSSM_CRL_TYPE = uint32; +typedef CSSM_CRL_ENCODING = uint32; - void loadPreviewImageWithOptions_completionHandler_(NSDictionary? options, - NSItemProviderCompletionHandler completionHandler) { - return _lib._objc_msgSend_446( - _id, - _lib._sel_loadPreviewImageWithOptions_completionHandler_1, - options?._id ?? ffi.nullptr, - completionHandler); - } +final class cssm_parsed_crl extends ffi.Struct { + @CSSM_CRL_TYPE() + external int CrlType; - 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); - } + @CSSM_CRL_PARSE_FORMAT() + external int ParsedCrlFormat; - 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 ffi.Pointer ParsedCrl; } -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); -} +typedef CSSM_CRL_PARSE_FORMAT = uint32; -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); +final class cssm_crl_pair extends ffi.Struct { + external CSSM_ENCODED_CRL EncodedCrl; + + external CSSM_PARSED_CRL ParsedCrl; } -ffi.Pointer _ObjCBlock45_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) { - return _ObjCBlock45_closureRegistry[block.ref.target.address]!(arg0); +typedef CSSM_ENCODED_CRL = cssm_encoded_crl; +typedef CSSM_PARSED_CRL = cssm_parsed_crl; + +final class cssm_crlgroup extends ffi.Struct { + @CSSM_CRL_TYPE() + external int CrlType; + + @CSSM_CRL_ENCODING() + external int CrlEncoding; + + @uint32() + external int NumberOfCrls; + + external UnnamedUnion4 GroupCrlList; + + @CSSM_CRLGROUP_TYPE() + external int CrlGroupType; } -class ObjCBlock45 extends _ObjCBlockBase { - ObjCBlock45._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +final class UnnamedUnion4 extends ffi.Union { + external CSSM_DATA_PTR CrlList; - /// 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 CSSM_ENCODED_CRL_PTR EncodedCrlList; - /// 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 CSSM_PARSED_CRL_PTR ParsedCrlList; - ffi.Pointer<_ObjCBlock> get pointer => _id; + external CSSM_CRL_PAIR_PTR PairCrlList; } -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); +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; } -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); +final class cssm_evidence extends ffi.Struct { + @CSSM_EVIDENCE_FORM() + external int EvidenceForm; + + external ffi.Pointer Evidence; } -void _ObjCBlock46_closureTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1) { - return _ObjCBlock46_closureRegistry[block.ref.target.address]!(arg0, arg1); +typedef CSSM_EVIDENCE_FORM = uint32; + +final 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; } -class ObjCBlock46 extends _ObjCBlockBase { - ObjCBlock46._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +typedef CSSM_TP_ACTION = uint32; +typedef CSSM_CRLGROUP = cssm_crlgroup; +typedef CSSM_TP_CALLERAUTH_CONTEXT_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; - - /// 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); - } +final class cssm_tp_verify_context_result extends ffi.Struct { + @uint32() + external int NumberOfEvidences; - ffi.Pointer<_ObjCBlock> get pointer => _id; + external CSSM_EVIDENCE_PTR Evidence; } -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); +typedef CSSM_EVIDENCE_PTR = ffi.Pointer; + +final class cssm_tp_request_set extends ffi.Struct { + @uint32() + external int NumberOfRequests; + + external ffi.Pointer Requests; } -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 cssm_tp_result_set extends ffi.Struct { + @uint32() + external int NumberOfResults; + + external ffi.Pointer Results; } -ffi.Pointer _ObjCBlock47_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) { - return _ObjCBlock47_closureRegistry[block.ref.target.address]!(arg0); +final class cssm_tp_confirm_response extends ffi.Struct { + @uint32() + external int NumberOfResponses; + + external CSSM_TP_CONFIRM_STATUS_PTR Responses; } -class ObjCBlock47 extends _ObjCBlockBase { - ObjCBlock47._(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. - 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; +final class cssm_tp_certissue_input extends ffi.Struct { + external CSSM_SUBSERVICE_UID CSPSubserviceUid; - /// 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); - } + @CSSM_CL_HANDLE() + external int CLHandle; - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + @uint32() + external int NumberOfTemplateFields; -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); -} + external CSSM_FIELD_PTR SubjectCertFields; -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); + @CSSM_TP_SERVICES() + external int MoreServiceRequests; + + @uint32() + external int NumberOfServiceControls; + + external CSSM_FIELD_PTR ServiceControls; + + external CSSM_ACCESS_CREDENTIALS_PTR UserCredentials; } -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 CSSM_TP_SERVICES = uint32; + +final 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; } -class ObjCBlock48 extends _ObjCBlockBase { - ObjCBlock48._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +typedef CSSM_TP_CERTISSUE_STATUS = uint32; +typedef CSSM_CERTGROUP_PTR = ffi.Pointer; - /// 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 cssm_tp_certchange_input extends ffi.Struct { + @CSSM_TP_CERTCHANGE_ACTION() + external int Action; - /// 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); - } + @CSSM_TP_CERTCHANGE_REASON() + external int Reason; - ffi.Pointer<_ObjCBlock> get pointer => _id; + @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; } -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 CSSM_TP_CERTCHANGE_ACTION = uint32; +typedef CSSM_TP_CERTCHANGE_REASON = uint32; + +final class cssm_tp_certchange_output extends ffi.Struct { + @CSSM_TP_CERTCHANGE_STATUS() + external int ActionStatus; + + external CSSM_FIELD RevokeInfo; } -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 CSSM_TP_CERTCHANGE_STATUS = uint32; +typedef CSSM_FIELD = cssm_field; + +final 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; } -void _ObjCBlock49_closureTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1) { - return _ObjCBlock49_closureRegistry[block.ref.target.address]!(arg0, arg1); +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; } -class ObjCBlock49 extends _ObjCBlockBase { - ObjCBlock49._(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. - 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 cssm_tp_certnotarize_input extends ffi.Struct { + @CSSM_CL_HANDLE() + external int CLHandle; - /// 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); - } + @uint32() + external int NumberOfFields; - ffi.Pointer<_ObjCBlock> get pointer => _id; + 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; } -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 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 _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); +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; } -ffi.Pointer _ObjCBlock50_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) { - return _ObjCBlock50_closureRegistry[block.ref.target.address]!(arg0); +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 ObjCBlock50 extends _ObjCBlockBase { - ObjCBlock50._(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. - 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 cssm_tp_crlissue_input extends ffi.Struct { + @CSSM_CL_HANDLE() + external int CLHandle; - /// 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); - } + @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 _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 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 _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 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 _ObjCBlock51_closureTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1) { - return _ObjCBlock51_closureRegistry[block.ref.target.address]!(arg0, arg1); +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 ObjCBlock51 extends _ObjCBlockBase { - ObjCBlock51._(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. - 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 cssm_db_attribute_info extends ffi.Struct { + @CSSM_DB_ATTRIBUTE_NAME_FORMAT() + external int AttributeNameFormat; - /// 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 cssm_db_attribute_label Label; - ffi.Pointer<_ObjCBlock> get pointer => _id; + @CSSM_DB_ATTRIBUTE_FORMAT() + external int AttributeFormat; } -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); -} +typedef CSSM_DB_ATTRIBUTE_NAME_FORMAT = uint32; -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); -} +final class cssm_db_attribute_label extends ffi.Union { + external ffi.Pointer AttributeName; -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 SecAsn1Oid AttributeOID; + + @uint32() + external int AttributeID; } -class ObjCBlock52 extends _ObjCBlockBase { - ObjCBlock52._(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. - 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; +final class cssm_db_attribute_data extends ffi.Struct { + external CSSM_DB_ATTRIBUTE_INFO Info; - /// 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); - } + @uint32() + external int NumberOfValues; - ffi.Pointer<_ObjCBlock> get pointer => _id; + external CSSM_DATA_PTR Value; } -typedef NSItemProviderCompletionHandler = ffi.Pointer<_ObjCBlock>; +typedef CSSM_DB_ATTRIBUTE_INFO = cssm_db_attribute_info; -abstract class NSItemProviderErrorCode { - static const int NSItemProviderUnknownError = -1; - static const int NSItemProviderItemUnavailableError = -1000; - static const int NSItemProviderUnexpectedValueClassError = -1100; - static const int NSItemProviderUnavailableCoercionError = -1200; +final 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 NSStringEncodingDetectionOptionsKey = ffi.Pointer; +typedef CSSM_DB_RECORDTYPE = uint32; +typedef CSSM_DB_ATTRIBUTE_INFO_PTR = 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); +final class cssm_db_record_attribute_data extends ffi.Struct { + @CSSM_DB_RECORDTYPE() + external int DataRecordType; - /// 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); - } + @uint32() + external int SemanticInformation; - /// 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); - } + @uint32() + external int NumberOfAttributes; - /// 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 CSSM_DB_ATTRIBUTE_DATA_PTR AttributeData; +} - void replaceCharactersInRange_withString_(NSRange range, NSString? aString) { - return _lib._objc_msgSend_447( - _id, - _lib._sel_replaceCharactersInRange_withString_1, - range, - aString?._id ?? ffi.nullptr); - } +typedef CSSM_DB_ATTRIBUTE_DATA_PTR = ffi.Pointer; - void insertString_atIndex_(NSString? aString, int loc) { - return _lib._objc_msgSend_448(_id, _lib._sel_insertString_atIndex_1, - aString?._id ?? ffi.nullptr, loc); - } +final class cssm_db_parsing_module_info extends ffi.Struct { + @CSSM_DB_RECORDTYPE() + external int RecordType; - void deleteCharactersInRange_(NSRange range) { - return _lib._objc_msgSend_283( - _id, _lib._sel_deleteCharactersInRange_1, range); - } + external CSSM_SUBSERVICE_UID ModuleSubserviceUid; +} - void appendString_(NSString? aString) { - return _lib._objc_msgSend_188( - _id, _lib._sel_appendString_1, aString?._id ?? ffi.nullptr); - } +final class cssm_db_index_info extends ffi.Struct { + @CSSM_DB_INDEX_TYPE() + external int IndexType; - void appendFormat_(NSString? format) { - return _lib._objc_msgSend_188( - _id, _lib._sel_appendFormat_1, format?._id ?? ffi.nullptr); - } + @CSSM_DB_INDEXED_DATA_LOCATION() + external int IndexedDataLocation; - void setString_(NSString? aString) { - return _lib._objc_msgSend_188( - _id, _lib._sel_setString_1, aString?._id ?? ffi.nullptr); - } + external CSSM_DB_ATTRIBUTE_INFO Info; +} - 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); - } +typedef CSSM_DB_INDEX_TYPE = uint32; +typedef CSSM_DB_INDEXED_DATA_LOCATION = uint32; - 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); - } +final class cssm_db_unique_record extends ffi.Struct { + external CSSM_DB_INDEX_INFO RecordLocator; - NSMutableString initWithCapacity_(int capacity) { - final _ret = - _lib._objc_msgSend_451(_id, _lib._sel_initWithCapacity_1, capacity); - return NSMutableString._(_ret, _lib, retain: true, release: true); - } + external SecAsn1Item RecordIdentifier; +} - 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); - } +typedef CSSM_DB_INDEX_INFO = cssm_db_index_info; - static ffi.Pointer getAvailableStringEncodings( - NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_242( - _lib._class_NSMutableString1, _lib._sel_availableStringEncodings1); - } +final class cssm_db_record_index_info extends ffi.Struct { + @CSSM_DB_RECORDTYPE() + external int DataRecordType; - 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); - } + @uint32() + external int NumberOfIndexes; - static int getDefaultCStringEncoding(NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSMutableString1, _lib._sel_defaultCStringEncoding1); - } + external CSSM_DB_INDEX_INFO_PTR IndexInfo; +} - 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); - } +typedef CSSM_DB_INDEX_INFO_PTR = ffi.Pointer; - 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_dbinfo extends ffi.Struct { + @uint32() + external int NumberOfRecordTypes; - 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); - } + external CSSM_DB_PARSING_MODULE_INFO_PTR DefaultParsingModules; - 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); - } + external CSSM_DB_RECORD_ATTRIBUTE_INFO_PTR RecordAttributeNames; - 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); - } + external CSSM_DB_RECORD_INDEX_INFO_PTR RecordIndexes; - 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); - } + @CSSM_BOOL() + external int IsLocal; - 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); - } + external ffi.Pointer AccessPath; - 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 Reserved; +} - 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); - } +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; - 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); - } +final class cssm_selection_predicate extends ffi.Struct { + @CSSM_DB_OPERATOR() + external int DbOperator; - 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); - } + external CSSM_DB_ATTRIBUTE_DATA Attribute; +} - 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); - } +typedef CSSM_DB_OPERATOR = uint32; +typedef CSSM_DB_ATTRIBUTE_DATA = cssm_db_attribute_data; - 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); - } +final class cssm_query_limits extends ffi.Struct { + @uint32() + external int TimeLimit; - 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 SizeLimit; +} - 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); - } +final class cssm_query extends ffi.Struct { + @CSSM_DB_RECORDTYPE() + external int RecordType; - 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); - } + @CSSM_DB_CONJUNCTIVE() + external int Conjunctive; - 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); - } + @uint32() + external int NumSelectionPredicates; - 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 CSSM_SELECTION_PREDICATE_PTR SelectionPredicate; + + external CSSM_QUERY_LIMITS QueryLimits; + + @CSSM_QUERY_FLAGS() + external int QueryFlags; } -typedef NSExceptionName = ffi.Pointer; +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 NSSimpleCString extends NSString { - NSSimpleCString._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +final class cssm_dl_pkcs11_attributes extends ffi.Struct { + @uint32() + external int DeviceAccessFlags; +} - /// 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); - } +final class cssm_name_list extends ffi.Struct { + @uint32() + external int NumStrings; - /// 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> String; +} - /// 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); - } +final class cssm_db_schema_attribute_info extends ffi.Struct { + @uint32() + external int AttributeId; - static ffi.Pointer getAvailableStringEncodings( - NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_242( - _lib._class_NSSimpleCString1, _lib._sel_availableStringEncodings1); - } + external ffi.Pointer AttributeName; - 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 SecAsn1Oid AttributeNameID; - static int getDefaultCStringEncoding(NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSSimpleCString1, _lib._sel_defaultCStringEncoding1); - } + @CSSM_DB_ATTRIBUTE_FORMAT() + external int DataType; +} - 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_db_schema_index_info extends ffi.Struct { + @uint32() + external int AttributeId; - 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 IndexId; - 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); - } + @CSSM_DB_INDEX_TYPE() + external int IndexType; - 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_DB_INDEXED_DATA_LOCATION() + external int IndexedDataLocation; +} - 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_x509_type_value_pair extends ffi.Struct { + external SecAsn1Oid type; - 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_BER_TAG() + external int valueType; - 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 SecAsn1Item value; +} - 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_BER_TAG = uint8; - 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_x509_rdn extends ffi.Struct { + @uint32() + external int numberOfPairs; - 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 CSSM_X509_TYPE_VALUE_PAIR_PTR AttributeTypeAndValue; +} - 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); - } +typedef CSSM_X509_TYPE_VALUE_PAIR_PTR = ffi.Pointer; - 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); - } +final class cssm_x509_name extends ffi.Struct { + @uint32() + external int numberOfRDNs; - 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); - } + external CSSM_X509_RDN_PTR RelativeDistinguishedName; +} - 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); - } +typedef CSSM_X509_RDN_PTR = ffi.Pointer; - 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); - } +final class cssm_x509_time extends ffi.Struct { + @CSSM_BER_TAG() + external int timeType; - 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 SecAsn1Item time; +} - 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); - } +final class x509_validity extends ffi.Struct { + external CSSM_X509_TIME notBefore; - 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_X509_TIME notAfter; } -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_X509_TIME = cssm_x509_time; - /// 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); - } +final class cssm_x509ext_basicConstraints extends ffi.Struct { + @CSSM_BOOL() + external int cA; - /// 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); - } + @CSSM_X509_OPTION() + external int pathLenConstraintPresent; - /// 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); - } + @uint32() + external int pathLenConstraint; +} - static ffi.Pointer getAvailableStringEncodings( - NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_242( - _lib._class_NSConstantString1, _lib._sel_availableStringEncodings1); - } +typedef CSSM_X509_OPTION = CSSM_BOOL; - 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); - } +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 int getDefaultCStringEncoding(NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSConstantString1, _lib._sel_defaultCStringEncoding1); - } +final class cssm_x509_extensionTagAndValue extends ffi.Struct { + @CSSM_BER_TAG() + external int type; - 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 SecAsn1Item value; +} - 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); - } +final class cssm_x509ext_pair extends ffi.Struct { + external CSSM_X509EXT_TAGandVALUE tagAndValue; - 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 parsedValue; +} - 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_X509EXT_TAGandVALUE = cssm_x509_extensionTagAndValue; - 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); - } +final class cssm_x509_extension extends ffi.Struct { + external SecAsn1Oid extnId; - 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); - } + @CSSM_BOOL() + external int critical; - 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); - } + @ffi.Int32() + external int format; - 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); - } + external cssm_x509ext_value value; - 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); - } + external SecAsn1Item BERvalue; +} - 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); - } +final class cssm_x509ext_value extends ffi.Union { + external ffi.Pointer tagAndValue; - 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); - } + external ffi.Pointer parsedValue; - 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); - } + external ffi.Pointer valuePair; +} - 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 CSSM_X509EXT_PAIR = cssm_x509ext_pair; - 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 class cssm_x509_extensions extends ffi.Struct { + @uint32() + external int numberOfExtensions; - 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); - } + external CSSM_X509_EXTENSION_PTR extensions; +} + +typedef CSSM_X509_EXTENSION_PTR = ffi.Pointer; + +final 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; + +final class cssm_x509_signature extends ffi.Struct { + external SecAsn1AlgId algorithmIdentifier; + + 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; +} + +final class cssm_x509ext_policyQualifiers extends ffi.Struct { + @uint32() + external int numberOfPolicyQualifiers; + + external ffi.Pointer policyQualifier; +} + +typedef CSSM_X509EXT_POLICYQUALIFIERINFO = cssm_x509ext_policyQualifierInfo; + +final class cssm_x509ext_policyInfo extends ffi.Struct { + external SecAsn1Oid policyIdentifier; + + external CSSM_X509EXT_POLICYQUALIFIERS policyQualifiers; +} + +typedef CSSM_X509EXT_POLICYQUALIFIERS = cssm_x509ext_policyQualifiers; + +final class cssm_x509_revoked_cert_entry extends ffi.Struct { + external SecAsn1Item certificateSerialNumber; + + external CSSM_X509_TIME revocationDate; + + external CSSM_X509_EXTENSIONS extensions; +} + +final 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; + +final 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; + +final 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; +} + +final class __CE_OtherName extends ffi.Struct { + external SecAsn1Oid typeId; + + external SecAsn1Item value; +} + +final class __CE_GeneralName extends ffi.Struct { + @ffi.Int32() + external int nameType; + + @CSSM_BOOL() + external int berEncoded; + + external SecAsn1Item name; +} + +final class __CE_GeneralNames extends ffi.Struct { + @uint32() + external int numNames; + + external ffi.Pointer generalName; +} + +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; +} + +typedef CE_GeneralNames = __CE_GeneralNames; + +final class __CE_ExtendedKeyUsage extends ffi.Struct { + @uint32() + external int numPurposes; + + external CSSM_OID_PTR purposes; +} + +typedef CSSM_OID_PTR = ffi.Pointer; + +final class __CE_BasicConstraints extends ffi.Struct { + @CSSM_BOOL() + external int cA; + + @CSSM_BOOL() + external int pathLenConstraintPresent; + + @uint32() + external int pathLenConstraint; +} + +final class __CE_PolicyQualifierInfo extends ffi.Struct { + external SecAsn1Oid policyQualifierId; + + external SecAsn1Item qualifier; +} + +final class __CE_PolicyInformation extends ffi.Struct { + external SecAsn1Oid certPolicyId; + + @uint32() + external int numPolicyQualifiers; + + external ffi.Pointer policyQualifiers; +} + +typedef CE_PolicyQualifierInfo = __CE_PolicyQualifierInfo; + +final 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; +} + +final class __CE_DistributionPointName extends ffi.Struct { + @ffi.Int32() + external int nameType; + + external UnnamedUnion5 dpn; +} + +final class UnnamedUnion5 extends ffi.Union { + external ffi.Pointer fullName; + + external CSSM_X509_RDN_PTR rdn; +} + +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; +} + +typedef CE_DistributionPointName = __CE_DistributionPointName; +typedef CE_CrlDistReasonFlags = uint8; + +final class __CE_CRLDistPointsSyntax extends ffi.Struct { + @uint32() + external int numDistPoints; + + external ffi.Pointer distPoints; +} + +typedef CE_CRLDistributionPoint = __CE_CRLDistributionPoint; + +final class __CE_AccessDescription extends ffi.Struct { + external SecAsn1Oid accessMethod; + + external CE_GeneralName accessLocation; +} + +final class __CE_AuthorityInfoAccess extends ffi.Struct { + @uint32() + external int numAccessDescriptions; + + external ffi.Pointer accessDescriptions; +} + +typedef CE_AccessDescription = __CE_AccessDescription; + +final class __CE_SemanticsInformation extends ffi.Struct { + external ffi.Pointer semanticsIdentifier; + + external ffi.Pointer + nameRegistrationAuthorities; +} + +typedef CE_NameRegistrationAuthorities = CE_GeneralNames; + +final class __CE_QC_Statement extends ffi.Struct { + external SecAsn1Oid statementId; + + external ffi.Pointer semanticsInfo; + + external ffi.Pointer otherInfo; +} + +typedef CE_SemanticsInformation = __CE_SemanticsInformation; + +final class __CE_QC_Statements extends ffi.Struct { + @uint32() + external int numQCStatements; + + external ffi.Pointer qcStatements; +} + +typedef CE_QC_Statement = __CE_QC_Statement; + +final 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; +} + +final class __CE_GeneralSubtree extends ffi.Struct { + external ffi.Pointer base; + + @uint32() + external int minimum; + + @CSSM_BOOL() + external int maximumPresent; + + @uint32() + external int maximum; +} + +final class __CE_GeneralSubtrees extends ffi.Struct { + @uint32() + external int numSubtrees; + + external ffi.Pointer subtrees; +} + +typedef CE_GeneralSubtree = __CE_GeneralSubtree; + +final class __CE_NameConstraints extends ffi.Struct { + external ffi.Pointer permitted; + + external ffi.Pointer excluded; +} + +typedef CE_GeneralSubtrees = __CE_GeneralSubtrees; + +final class __CE_PolicyMapping extends ffi.Struct { + external SecAsn1Oid issuerDomainPolicy; + + external SecAsn1Oid subjectDomainPolicy; +} + +final class __CE_PolicyMappings extends ffi.Struct { + @uint32() + external int numPolicyMappings; + + external ffi.Pointer policyMappings; +} + +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; +} + +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 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; + +final class __CE_DataAndType extends ffi.Struct { + @ffi.Int32() + external int type; + + external CE_Data extension1; + + @CSSM_BOOL() + external int critical; +} + +final 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; +} + +final 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; +} + +final 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; +} + +final class cssm_applecspdl_db_settings_parameters extends ffi.Struct { + @uint32() + external int idleTimeout; + + @uint8() + external int lockOnSleep; +} + +final class cssm_applecspdl_db_is_locked_parameters extends ffi.Struct { + @uint8() + external int isLocked; +} + +final class cssm_applecspdl_db_change_password_parameters extends ffi.Struct { + external ffi.Pointer accessCredentials; +} + +typedef CSSM_ACCESS_CREDENTIALS = cssm_access_credentials; + +final class CSSM_APPLE_TP_NAME_OID extends ffi.Struct { + external ffi.Pointer string; + + external ffi.Pointer oid; +} + +final 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; + +final 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; +} + +final 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; + +final 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; +} + +final 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; + +final 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; + +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; + + @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 _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; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock31_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, sec_certificate_t 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, + sec_certificate_t arg0)>( + _ObjCBlock31_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._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + sec_certificate_t arg0)>( + _ObjCBlock31_closureTrampoline) + .cast(), + _ObjCBlock31_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); + } +} + +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); +} + +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, int arg0) { + return _ObjCBlock32_closureRegistry[block.ref.target.address]!(arg0); +} + +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> ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Uint16 arg0)>(_ObjCBlock32_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._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Uint16 arg0)>(_ObjCBlock32_closureTrampoline) + .cast(), + _ObjCBlock32_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 _ObjCBlock33_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 _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, dispatch_data_t arg0, dispatch_data_t arg1) { + return _ObjCBlock33_closureRegistry[block.ref.target.address]!(arg0, arg1); +} + +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( + 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)>(_ObjCBlock33_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._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + dispatch_data_t arg0, dispatch_data_t arg1)>( + _ObjCBlock33_closureTrampoline) + .cast(), + _ObjCBlock33_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); + } +} + +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); +} + +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, + dispatch_data_t arg1, + sec_protocol_pre_shared_key_selection_complete_t arg2) { + return _ObjCBlock34_closureRegistry[block.ref.target.address]!( + arg0, arg1, arg2); +} + +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, + 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)>(_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, 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)>(_ObjCBlock34_closureTrampoline) + .cast(), + _ObjCBlock34_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 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 + .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 _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_key_update_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_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)>( + _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_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)>( + _ObjCBlock35_closureTrampoline) + .cast(), + _ObjCBlock35_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); + } +} + +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); +} + +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_protocol_challenge_complete_t arg1) { + return _ObjCBlock36_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); + + /// 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_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)>( + _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_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)>( + _ObjCBlock36_closureTrampoline) + .cast(), + _ObjCBlock36_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); + } +} + +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); +} + +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, + 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); +} + +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< + 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)>( + _ObjCBlock37_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock37.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)>( + _ObjCBlock37_closureTrampoline) + .cast(), + _ObjCBlock37_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); + } +} + +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); +} + +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, bool arg0) { + return _ObjCBlock38_closureRegistry[block.ref.target.address]!(arg0); +} + +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> ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Bool arg0)>(_ObjCBlock38_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._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Bool arg0)>(_ObjCBlock38_closureTrampoline) + .cast(), + _ObjCBlock38_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); + } +} + +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; + 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 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; +} + +/// 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); - 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); + /// 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); } - 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); + /// 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); } - 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); + /// 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 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); + /// The shared session uses the currently set global NSURLCache, + /// NSHTTPCookieStorage and NSURLCredentialStorage objects. + static NSURLSession? getSharedSession(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_408( + _lib._class_NSURLSession1, _lib._sel_sharedSession1); + return _ret.address == 0 + ? null + : NSURLSession._(_ret, _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); + /// 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_421( + _lib._class_NSURLSession1, + _lib._sel_sessionWithConfiguration_1, + configuration?._id ?? ffi.nullptr); + return NSURLSession._(_ret, _lib, retain: true, release: true); } - /// 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); + static NSURLSession sessionWithConfiguration_delegate_delegateQueue_( + NativeCupertinoHttp _lib, + NSURLSessionConfiguration? configuration, + NSObject? delegate, + NSOperationQueue? queue) { + final _ret = _lib._objc_msgSend_422( + _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); } - void addCharactersInRange_(NSRange aRange) { - return _lib._objc_msgSend_283( - _id, _lib._sel_addCharactersInRange_1, aRange); + 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); } - void removeCharactersInRange_(NSRange aRange) { - return _lib._objc_msgSend_283( - _id, _lib._sel_removeCharactersInRange_1, aRange); + 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); } - void addCharactersInString_(NSString? aString) { - return _lib._objc_msgSend_188( - _id, _lib._sel_addCharactersInString_1, aString?._id ?? ffi.nullptr); + 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); } - void removeCharactersInString_(NSString? aString) { - return _lib._objc_msgSend_188( - _id, _lib._sel_removeCharactersInString_1, aString?._id ?? ffi.nullptr); + /// 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); } - void formUnionWithCharacterSet_(NSCharacterSet? otherSet) { - return _lib._objc_msgSend_452(_id, _lib._sel_formUnionWithCharacterSet_1, - otherSet?._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_360( + _id, _lib._sel_setSessionDescription_1, value?._id ?? ffi.nullptr); } - void formIntersectionWithCharacterSet_(NSCharacterSet? otherSet) { - return _lib._objc_msgSend_452( - _id, - _lib._sel_formIntersectionWithCharacterSet_1, - otherSet?._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); } - void invert() { - return _lib._objc_msgSend_1(_id, _lib._sel_invert1); + /// -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); } - 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); + /// 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( + _id, _lib._sel_resetWithCompletionHandler_1, completionHandler._id); } - 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); + /// flush storage to disk and clear transient network caches. Invokes completionHandler() on the delegate queue. + void flushWithCompletionHandler_(ObjCBlock completionHandler) { + return _lib._objc_msgSend_387( + _id, _lib._sel_flushWithCompletionHandler_1, completionHandler._id); } - 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); + /// invokes completionHandler with outstanding data, upload and download tasks. + void getTasksWithCompletionHandler_(ObjCBlock39 completionHandler) { + return _lib._objc_msgSend_423( + _id, _lib._sel_getTasksWithCompletionHandler_1, completionHandler._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); + /// invokes completionHandler with all outstanding tasks. + void getAllTasksWithCompletionHandler_(ObjCBlock21 completionHandler) { + return _lib._objc_msgSend_424(_id, + _lib._sel_getAllTasksWithCompletionHandler_1, completionHandler._id); } - 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); + /// 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); + return NSURLSessionDataTask._(_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); + /// 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); + return NSURLSessionDataTask._(_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); + /// 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); + return NSURLSessionUploadTask._(_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); + /// 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); + return NSURLSessionUploadTask._(_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); + /// 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); + return NSURLSessionUploadTask._(_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); + /// 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); + return NSURLSessionDownloadTask._(_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); + /// 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); + return NSURLSessionDownloadTask._(_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); + /// 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); + return NSURLSessionDownloadTask._(_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); + /// 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); + return NSURLSessionStreamTask._(_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); + /// 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); + return NSURLSessionStreamTask._(_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); + /// 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); + return NSURLSessionWebSocketTask._(_ret, _lib, retain: true, 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); + /// 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_445( + _id, + _lib._sel_webSocketTaskWithURL_protocols_1, + url?._id ?? ffi.nullptr, + protocols?._id ?? ffi.nullptr); + return NSURLSessionWebSocketTask._(_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); + /// 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); + return NSURLSessionWebSocketTask._(_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); + @override + NSURLSession init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLSession._(_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); + 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); } - /// 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); + /// 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, ObjCBlock44 completionHandler) { + final _ret = _lib._objc_msgSend_447( + _id, + _lib._sel_dataTaskWithRequest_completionHandler_1, + request?._id ?? ffi.nullptr, + completionHandler._id); + return NSURLSessionDataTask._(_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); + NSURLSessionDataTask dataTaskWithURL_completionHandler_( + NSURL? url, ObjCBlock44 completionHandler) { + final _ret = _lib._objc_msgSend_448( + _id, + _lib._sel_dataTaskWithURL_completionHandler_1, + url?._id ?? ffi.nullptr, + completionHandler._id); + return NSURLSessionDataTask._(_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); + /// upload convenience method. + NSURLSessionUploadTask uploadTaskWithRequest_fromFile_completionHandler_( + NSURLRequest? request, NSURL? fileURL, ObjCBlock44 completionHandler) { + final _ret = _lib._objc_msgSend_449( + _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); } - /// 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); + NSURLSessionUploadTask uploadTaskWithRequest_fromData_completionHandler_( + NSURLRequest? request, NSData? bodyData, ObjCBlock44 completionHandler) { + final _ret = _lib._objc_msgSend_450( + _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); } - /// 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); + /// 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( + _id, + _lib._sel_downloadTaskWithRequest_completionHandler_1, + request?._id ?? ffi.nullptr, + completionHandler._id); + return NSURLSessionDownloadTask._(_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); + NSURLSessionDownloadTask downloadTaskWithURL_completionHandler_( + NSURL? url, ObjCBlock45 completionHandler) { + final _ret = _lib._objc_msgSend_452( + _id, + _lib._sel_downloadTaskWithURL_completionHandler_1, + url?._id ?? ffi.nullptr, + completionHandler._id); + return NSURLSessionDownloadTask._(_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); + NSURLSessionDownloadTask downloadTaskWithResumeData_completionHandler_( + NSData? resumeData, ObjCBlock45 completionHandler) { + final _ret = _lib._objc_msgSend_453( + _id, + _lib._sel_downloadTaskWithResumeData_completionHandler_1, + resumeData?._id ?? ffi.nullptr, + completionHandler._id); + return NSURLSessionDownloadTask._(_ret, _lib, retain: true, 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); + 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); } } -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, +/// 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 [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 [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 [NSURLQueryItem] that wraps the given raw object pointer. - static NSURLQueryItem 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 NSURLQueryItem._(other, lib, retain: retain, release: release); + return NSURLSessionConfiguration._(other, lib, + retain: retain, release: release); } - /// Returns whether [obj] is an instance of [NSURLQueryItem]. + /// 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_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); + obj._lib._class_NSURLSessionConfiguration1); } - 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); + static NSURLSessionConfiguration? getDefaultSessionConfiguration( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_409(_lib._class_NSURLSessionConfiguration1, + _lib._sel_defaultSessionConfiguration1); + return _ret.address == 0 + ? null + : NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); } - NSString? get name { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_name1); + static NSURLSessionConfiguration? getEphemeralSessionConfiguration( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_409(_lib._class_NSURLSessionConfiguration1, + _lib._sel_ephemeralSessionConfiguration1); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); + : NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); } - NSString? get value { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_value1); + static NSURLSessionConfiguration + backgroundSessionConfigurationWithIdentifier_( + NativeCupertinoHttp _lib, NSString? identifier) { + final _ret = _lib._objc_msgSend_410( + _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); } - 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); + /// default cache policy for requests + int get requestCachePolicy { + return _lib._objc_msgSend_325(_id, _lib._sel_requestCachePolicy1); } - 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); + /// default cache policy for requests + set requestCachePolicy(int value) { + _lib._objc_msgSend_393(_id, _lib._sel_setRequestCachePolicy_1, value); } -} -class NSURLComponents extends NSObject { - NSURLComponents._(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. + double get timeoutIntervalForRequest { + return _lib._objc_msgSend_85(_id, _lib._sel_timeoutIntervalForRequest1); + } - /// 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); + /// 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( + _id, _lib._sel_setTimeoutIntervalForRequest_1, value); } - /// 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); + /// 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 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); + /// 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( + _id, _lib._sel_setTimeoutIntervalForResource_1, value); } - /// 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 of service for requests. + int get networkServiceType { + return _lib._objc_msgSend_326(_id, _lib._sel_networkServiceType1); } - /// 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); + /// type of service for requests. + set networkServiceType(int value) { + _lib._objc_msgSend_394(_id, _lib._sel_setNetworkServiceType_1, value); } - /// 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); + /// allow request to route over cellular. + bool get allowsCellularAccess { + return _lib._objc_msgSend_11(_id, _lib._sel_allowsCellularAccess1); } - /// 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); + /// allow request to route over cellular. + set allowsCellularAccess(bool value) { + _lib._objc_msgSend_361(_id, _lib._sel_setAllowsCellularAccess_1, value); } - /// 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); + /// allow request to route over expensive networks. Defaults to YES. + bool get allowsExpensiveNetworkAccess { + return _lib._objc_msgSend_11(_id, _lib._sel_allowsExpensiveNetworkAccess1); } - /// 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); + /// allow request to route over expensive networks. Defaults to YES. + set allowsExpensiveNetworkAccess(bool value) { + _lib._objc_msgSend_361( + _id, _lib._sel_setAllowsExpensiveNetworkAccess_1, value); } - /// 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); + /// 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 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); + /// allow request to route over networks in constrained mode. Defaults to YES. + set allowsConstrainedNetworkAccess(bool value) { + _lib._objc_msgSend_361( + _id, _lib._sel_setAllowsConstrainedNetworkAccess_1, value); } - /// 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); + /// 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); } - /// 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); + /// 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); } - 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); + /// 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); } - set user(NSString? value) { - _lib._objc_msgSend_327(_id, _lib._sel_setUser_1, value?._id ?? ffi.nullptr); + /// 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_361(_id, _lib._sel_setWaitsForConnectivity_1, value); } - 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); + /// 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); } - set password(NSString? value) { - _lib._objc_msgSend_327( - _id, _lib._sel_setPassword_1, value?._id ?? ffi.nullptr); + /// 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); } - NSString? get host { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_host1); + /// 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); } - set host(NSString? value) { - _lib._objc_msgSend_327(_id, _lib._sel_setHost_1, value?._id ?? ffi.nullptr); + /// 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_360(_id, _lib._sel_setSharedContainerIdentifier_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); + /// 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); } - /// 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); + /// 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_361(_id, _lib._sel_setSessionSendsLaunchEvents_1, value); } - NSString? get path { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_path1); + /// The proxy dictionary, as described by + NSDictionary? get connectionProxyDictionary { + final _ret = + _lib._objc_msgSend_180(_id, _lib._sel_connectionProxyDictionary1); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); + : NSDictionary._(_ret, _lib, retain: true, release: true); } - set path(NSString? value) { - _lib._objc_msgSend_327(_id, _lib._sel_setPath_1, value?._id ?? ffi.nullptr); + /// The proxy dictionary, as described by + set connectionProxyDictionary(NSDictionary? value) { + _lib._objc_msgSend_396(_id, _lib._sel_setConnectionProxyDictionary_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 minimum allowable versions of the TLS protocol, from + int get TLSMinimumSupportedProtocol { + return _lib._objc_msgSend_411(_id, _lib._sel_TLSMinimumSupportedProtocol1); } - set query(NSString? value) { - _lib._objc_msgSend_327( - _id, _lib._sel_setQuery_1, value?._id ?? ffi.nullptr); + /// The minimum allowable versions of the TLS protocol, from + set TLSMinimumSupportedProtocol(int value) { + _lib._objc_msgSend_412( + _id, _lib._sel_setTLSMinimumSupportedProtocol_1, value); } - 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); + /// The maximum allowable versions of the TLS protocol, from + int get TLSMaximumSupportedProtocol { + return _lib._objc_msgSend_411(_id, _lib._sel_TLSMaximumSupportedProtocol1); } - set fragment(NSString? value) { - _lib._objc_msgSend_327( - _id, _lib._sel_setFragment_1, value?._id ?? ffi.nullptr); + /// The maximum allowable versions of the TLS protocol, from + set TLSMaximumSupportedProtocol(int value) { + _lib._objc_msgSend_412( + _id, _lib._sel_setTLSMaximumSupportedProtocol_1, value); } - /// 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); + /// The minimum allowable versions of the TLS protocol, from + int get TLSMinimumSupportedProtocolVersion { + return _lib._objc_msgSend_413( + _id, _lib._sel_TLSMinimumSupportedProtocolVersion1); } - /// 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); + /// The minimum allowable versions of the TLS protocol, from + set TLSMinimumSupportedProtocolVersion(int value) { + _lib._objc_msgSend_414( + _id, _lib._sel_setTLSMinimumSupportedProtocolVersion_1, value); } - 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); + /// The maximum allowable versions of the TLS protocol, from + int get TLSMaximumSupportedProtocolVersion { + return _lib._objc_msgSend_413( + _id, _lib._sel_TLSMaximumSupportedProtocolVersion1); } - set percentEncodedPassword(NSString? value) { - _lib._objc_msgSend_327( - _id, _lib._sel_setPercentEncodedPassword_1, value?._id ?? ffi.nullptr); + /// The maximum allowable versions of the TLS protocol, from + set TLSMaximumSupportedProtocolVersion(int value) { + _lib._objc_msgSend_414( + _id, _lib._sel_setTLSMaximumSupportedProtocolVersion_1, value); } - 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); + /// Allow the use of HTTP pipelining + bool get HTTPShouldUsePipelining { + return _lib._objc_msgSend_11(_id, _lib._sel_HTTPShouldUsePipelining1); } - set percentEncodedHost(NSString? value) { - _lib._objc_msgSend_327( - _id, _lib._sel_setPercentEncodedHost_1, value?._id ?? ffi.nullptr); + /// Allow the use of HTTP pipelining + set HTTPShouldUsePipelining(bool value) { + _lib._objc_msgSend_361(_id, _lib._sel_setHTTPShouldUsePipelining_1, value); } - 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); + /// Allow the session to set cookies on requests + bool get HTTPShouldSetCookies { + return _lib._objc_msgSend_11(_id, _lib._sel_HTTPShouldSetCookies1); } - set percentEncodedPath(NSString? value) { - _lib._objc_msgSend_327( - _id, _lib._sel_setPercentEncodedPath_1, value?._id ?? ffi.nullptr); + /// Allow the session to set cookies on requests + set HTTPShouldSetCookies(bool value) { + _lib._objc_msgSend_361(_id, _lib._sel_setHTTPShouldSetCookies_1, value); } - 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); + /// 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); } - set percentEncodedQuery(NSString? value) { - _lib._objc_msgSend_327( - _id, _lib._sel_setPercentEncodedQuery_1, value?._id ?? ffi.nullptr); + /// 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); } - NSString? get percentEncodedFragment { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_percentEncodedFragment1); + /// 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 - : NSString._(_ret, _lib, retain: true, release: true); + : NSDictionary._(_ret, _lib, retain: true, release: true); } - set percentEncodedFragment(NSString? value) { - _lib._objc_msgSend_327( - _id, _lib._sel_setPercentEncodedFragment_1, value?._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. + set HTTPAdditionalHeaders(NSDictionary? value) { + _lib._objc_msgSend_396( + _id, _lib._sel_setHTTPAdditionalHeaders_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); + /// The maximum number of simultaneous persistent connections per host + int get HTTPMaximumConnectionsPerHost { + return _lib._objc_msgSend_81(_id, _lib._sel_HTTPMaximumConnectionsPerHost1); } - NSRange get rangeOfUser { - return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfUser1); + /// The maximum number of simultaneous persistent connections per host + set HTTPMaximumConnectionsPerHost(int value) { + _lib._objc_msgSend_388( + _id, _lib._sel_setHTTPMaximumConnectionsPerHost_1, value); } - NSRange get rangeOfPassword { - return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfPassword1); + /// 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); + return _ret.address == 0 + ? null + : NSHTTPCookieStorage._(_ret, _lib, retain: true, release: true); } - NSRange get rangeOfHost { - return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfHost1); + /// The cookie storage object to use, or nil to indicate that no cookies should be handled + set HTTPCookieStorage(NSHTTPCookieStorage? value) { + _lib._objc_msgSend_415( + _id, _lib._sel_setHTTPCookieStorage_1, value?._id ?? ffi.nullptr); } - NSRange get rangeOfPort { - return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfPort1); + /// 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); + return _ret.address == 0 + ? null + : NSURLCredentialStorage._(_ret, _lib, retain: true, release: true); } - NSRange get rangeOfPath { - return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfPath1); + /// The credential storage object, or nil to indicate that no credential storage is to be used + set URLCredentialStorage(NSURLCredentialStorage? value) { + _lib._objc_msgSend_417( + _id, _lib._sel_setURLCredentialStorage_1, value?._id ?? ffi.nullptr); } - NSRange get rangeOfQuery { - return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfQuery1); + /// 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); + return _ret.address == 0 + ? null + : NSURLCache._(_ret, _lib, retain: true, release: true); } - NSRange get rangeOfFragment { - return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfFragment1); + /// The URL resource cache, or nil to indicate that no caching is to be performed + set URLCache(NSURLCache? value) { + _lib._objc_msgSend_321( + _id, _lib._sel_setURLCache_1, value?._id ?? ffi.nullptr); } - /// 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); + /// 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); } - /// 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); + /// 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( + _id, _lib._sel_setShouldUseExtendedBackgroundIdleMode_1, value); } - /// 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); + /// 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); } - /// 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); + /// 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_418( + _id, _lib._sel_setProtocolClasses_1, value?._id ?? 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); - /// 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); + /// multipath service type to use for connections. The default is NSURLSessionMultipathServiceTypeNone + int get multipathServiceType { + return _lib._objc_msgSend_419(_id, _lib._sel_multipathServiceType1); } - /// 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); + /// 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); } - /// 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); + @override + NSURLSessionConfiguration init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); } - 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 new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionConfiguration1, _lib._sel_new1); + return NSURLSessionConfiguration._(_ret, _lib, + retain: false, 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 backgroundSessionConfiguration_( + NativeCupertinoHttp _lib, NSString? identifier) { + final _ret = _lib._objc_msgSend_410( + _lib._class_NSURLSessionConfiguration1, + _lib._sel_backgroundSessionConfiguration_1, + identifier?._id ?? ffi.nullptr); + return 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 alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionConfiguration1, _lib._sel_alloc1); + return NSURLSessionConfiguration._(_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, +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 [NSHTTPURLResponse] that points to the same underlying object as [other]. - static NSHTTPURLResponse castFrom(T other) { - return NSHTTPURLResponse._(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 [NSHTTPURLResponse] that wraps the given raw object pointer. - static NSHTTPURLResponse 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 NSHTTPURLResponse._(other, lib, retain: retain, release: release); + return NSURLCredentialStorage._(other, lib, + retain: retain, release: release); } - /// Returns whether [obj] is an instance of [NSHTTPURLResponse]. + /// 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_NSHTTPURLResponse1); + obj._lib._class_NSURLCredentialStorage1); } +} - /// ! - /// @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); - } +/// ! +/// @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; - /// ! - /// @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); - } + /// Handover - secondary flows brought up when primary flow is not performing adequately. + static const int NSURLSessionMultipathServiceTypeHandover = 1; - /// ! - /// @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); - } + /// Interactive - secondary flows created more aggressively. + static const int NSURLSessionMultipathServiceTypeInteractive = 2; - /// ! - /// @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); - } + /// Aggregate - multiple subflows used for greater bandwidth. + static const int NSURLSessionMultipathServiceTypeAggregate = 3; +} - /// ! - /// @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); - } +void _ObjCBlock39_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); +} - 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); - } +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); +} - 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); +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); +} + +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, + 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)>( + _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, 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)>( + _ObjCBlock39_closureTrampoline) + .cast(), + _ObjCBlock39_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 NSException extends NSObject { - NSException._(ffi.Pointer id, NativeCupertinoHttp lib, +/// 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 [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 [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 [NSException] that wraps the given raw object pointer. - static NSException castFromPointer( + /// 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 NSException._(other, lib, retain: retain, release: release); + return NSURLSessionUploadTask._(other, lib, + retain: retain, release: release); } - /// Returns whether [obj] is an instance of [NSException]. + /// 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_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); + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSURLSessionUploadTask1); } - 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); + @override + NSURLSessionUploadTask init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLSessionUploadTask._(_ret, _lib, retain: true, 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); + 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 NSException alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSException1, _lib._sel_alloc1); - return NSException._(_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); } } -typedef NSUncaughtExceptionHandler - = ffi.NativeFunction)>; - -class NSAssertionHandler extends NSObject { - NSAssertionHandler._(ffi.Pointer id, NativeCupertinoHttp lib, +/// 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 [NSAssertionHandler] that points to the same underlying object as [other]. - static NSAssertionHandler castFrom(T other) { - return NSAssertionHandler._(other._id, other._lib, + /// 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 [NSAssertionHandler] that wraps the given raw object pointer. - static NSAssertionHandler castFromPointer( + /// 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 NSAssertionHandler._(other, lib, retain: retain, release: release); + return NSURLSessionDownloadTask._(other, lib, + retain: retain, release: release); } - /// Returns whether [obj] is an instance of [NSAssertionHandler]. + /// 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_NSAssertionHandler1); + obj._lib._class_NSURLSessionDownloadTask1); } - 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); + /// 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_(ObjCBlock40 completionHandler) { + return _lib._objc_msgSend_430( + _id, _lib._sel_cancelByProducingResumeData_1, completionHandler._id); } - 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); + @override + NSURLSessionDownloadTask init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); } - 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 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 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 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 _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; - 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 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); } } -class NSBlockOperation extends NSOperation { - NSBlockOperation._(ffi.Pointer id, NativeCupertinoHttp lib, +/// 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); - /// Returns a [NSBlockOperation] that points to the same underlying object as [other]. - static NSBlockOperation castFrom(T other) { - return NSBlockOperation._(other._id, other._lib, + /// 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 [NSBlockOperation] that wraps the given raw object pointer. - static NSBlockOperation castFromPointer( + /// 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 NSBlockOperation._(other, lib, retain: retain, release: release); + return NSURLSessionStreamTask._(other, lib, + retain: retain, release: release); } - /// Returns whether [obj] is an instance of [NSBlockOperation]. + /// 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_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); + obj._lib._class_NSURLSessionStreamTask1); } - 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); + /// 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, ObjCBlock41 completionHandler) { + return _lib._objc_msgSend_434( + _id, + _lib._sel_readDataOfMinLength_maxLength_timeout_completionHandler_1, + minBytes, + maxBytes, + timeout, + completionHandler._id); } -} - -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); + /// 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, ObjCBlock42 completionHandler) { + return _lib._objc_msgSend_435( + _id, + _lib._sel_writeData_timeout_completionHandler_1, + data?._id ?? ffi.nullptr, + timeout, + completionHandler._id); } - /// 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); + /// -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); } - /// 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); + /// 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); } - 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); + /// 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); } - 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); + /// 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); } - 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); + /// 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); } - NSObject get result { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_result1); - return NSObject._(_ret, _lib, retain: true, release: true); + @override + NSURLSessionStreamTask init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLSessionStreamTask._(_ret, _lib, retain: true, release: true); } - static NSInvocationOperation new1(NativeCupertinoHttp _lib) { + static NSURLSessionStreamTask new1(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2( - _lib._class_NSInvocationOperation1, _lib._sel_new1); - return NSInvocationOperation._(_ret, _lib, retain: false, release: true); + _lib._class_NSURLSessionStreamTask1, _lib._sel_new1); + return NSURLSessionStreamTask._(_ret, _lib, retain: false, release: true); } - static NSInvocationOperation alloc(NativeCupertinoHttp _lib) { + static NSURLSessionStreamTask alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2( - _lib._class_NSInvocationOperation1, _lib._sel_alloc1); - return NSInvocationOperation._(_ret, _lib, retain: false, release: true); + _lib._class_NSURLSessionStreamTask1, _lib._sel_alloc1); + return NSURLSessionStreamTask._(_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; +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); } -/// Forward declaration -class Dart_CodeObserver extends ffi.Struct { - external ffi.Pointer data; - - external Dart_OnNewCodeCallback on_new_code; +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); } -/// 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; +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); } -/// 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)>>; +class ObjCBlock41 extends _ObjCBlockBase { + ObjCBlock41._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); -/// 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>; + /// Creates a block from a C function pointer. + ObjCBlock41.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)>( + _ObjCBlock41_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; -/// 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 Dart function. + ObjCBlock41.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)>( + _ObjCBlock41_closureTrampoline) + .cast(), + _ObjCBlock41_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); + } +} -/// A port is used to send or receive inter-isolate messages -typedef Dart_Port = ffi.Int64; +void _ObjCBlock42_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { + return block.ref.target + .cast< + ffi.NativeFunction arg0)>>() + .asFunction arg0)>()(arg0); +} -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; +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); } -/// ========== -/// 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 _ObjCBlock42_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { + return _ObjCBlock42_closureRegistry[block.ref.target.address]!(arg0); } -class _Dart_NativeArguments extends ffi.Opaque {} +class ObjCBlock42 extends _ObjCBlockBase { + ObjCBlock42._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, 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>; + /// Creates a block from a C function pointer. + ObjCBlock42.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)>( + _ObjCBlock42_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; -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; + /// Creates a block from a Dart function. + 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)>( + _ObjCBlock42_closureTrampoline) + .cast(), + _ObjCBlock42_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 _Dart_NativeArgument_Descriptor extends ffi.Struct { - @ffi.Uint8() - external int type; +class NSNetService extends _ObjCWrapper { + NSNetService._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); - @ffi.Uint8() - external int index; -} + /// 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 _Dart_NativeArgument_Value extends ffi.Opaque {} + /// 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 Dart_NativeArgument_Descriptor = _Dart_NativeArgument_Descriptor; -typedef Dart_NativeArgument_Value = _Dart_NativeArgument_Value; + /// 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); + } +} -/// 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>; +/// 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); -/// 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 [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); + } -/// A native function. -typedef Dart_NativeFunction - = ffi.Pointer>; + /// 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); + } -/// 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)>>; + /// 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); + } -/// FFI Native C function pointer resolver callback. -/// -/// See Dart_SetFfiNativeResolver. -typedef Dart_FfiNativeResolver = ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, uintptr_t)>>; + /// 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, ObjCBlock42 completionHandler) { + return _lib._objc_msgSend_439( + _id, + _lib._sel_sendMessage_completionHandler_1, + message?._id ?? ffi.nullptr, + completionHandler._id); + } -/// ===================== -/// 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; -} + /// 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); + } -/// 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>; + /// 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); + } -/// 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>; + /// 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, + closeCode, reason?._id ?? ffi.nullptr); + } -/// 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; -} + /// 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); + } -class Dart_KernelCompilationResult extends ffi.Struct { - @ffi.Int32() - external int status; + /// 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); + } - @ffi.Bool() - external bool null_safety; + /// 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); + } - external ffi.Pointer error; + /// 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 ffi.Pointer kernel; + @override + NSURLSessionWebSocketTask init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLSessionWebSocketTask._(_ret, _lib, retain: true, release: true); + } - @ffi.IntPtr() - external int kernel_size; -} + 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); + } -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; + 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); + } } -class Dart_SourceFile extends ffi.Struct { - external ffi.Pointer uri; +/// 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); - external ffi.Pointer source; -} + /// 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); + } -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)>>; + /// 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); + } -/// 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; -} + /// 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); + } -class _Dart_CObject extends ffi.Struct { - @ffi.Int32() - external int type; + /// 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); + } - external UnnamedUnion5 value; -} + /// 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); + } -class UnnamedUnion5 extends ffi.Union { - @ffi.Bool() - external bool as_bool; + int get type { + return _lib._objc_msgSend_438(_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); + } - @ffi.Int32() - external int as_int32; + @override + NSURLSessionWebSocketMessage init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLSessionWebSocketMessage._(_ret, _lib, + retain: true, release: true); + } - @ffi.Int64() - external int as_int64; + 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); + } - @ffi.Double() - external double as_double; + 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 ffi.Pointer as_string; +abstract class NSURLSessionWebSocketMessageType { + static const int NSURLSessionWebSocketMessageTypeData = 0; + static const int NSURLSessionWebSocketMessageTypeString = 1; +} - external UnnamedStruct5 as_send_port; +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); +} - external UnnamedStruct6 as_capability; +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); +} - external UnnamedStruct7 as_array; +void _ObjCBlock43_closureTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1) { + return _ObjCBlock43_closureRegistry[block.ref.target.address]!(arg0, arg1); +} - external UnnamedStruct8 as_typed_data; +class ObjCBlock43 extends _ObjCBlockBase { + ObjCBlock43._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - external UnnamedStruct9 as_external_typed_data; + /// 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)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>( + _ObjCBlock43_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - external UnnamedStruct10 as_native_pointer; + /// Creates a block from a Dart function. + ObjCBlock43.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)>( + _ObjCBlock43_closureTrampoline) + .cast(), + _ObjCBlock43_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); + } } -class UnnamedStruct5 extends ffi.Struct { - @Dart_Port() - external int id; - - @Dart_Port() - external int origin_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; } -class UnnamedStruct6 extends ffi.Struct { - @ffi.Int64() - external int 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); } -class UnnamedStruct7 extends ffi.Struct { - @ffi.IntPtr() - external int length; +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); +} - external ffi.Pointer> values; +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 UnnamedStruct8 extends ffi.Struct { - @ffi.Int32() - external int type; +class ObjCBlock44 extends _ObjCBlockBase { + ObjCBlock44._(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. + 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; - external ffi.Pointer values; + /// 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 UnnamedStruct9 extends ffi.Struct { - @ffi.Int32() - external int type; - - /// in elements, not bytes - @ffi.IntPtr() - external int length; - - external ffi.Pointer data; +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); +} - external ffi.Pointer peer; +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); +} - external Dart_HandleFinalizer callback; +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); } -class UnnamedStruct10 extends ffi.Struct { - @ffi.IntPtr() - external int ptr; +class ObjCBlock45 extends _ObjCBlockBase { + ObjCBlock45._(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. + ObjCBlock45.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)>( + _ObjCBlock45_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - external Dart_HandleFinalizer callback; + /// Creates a block from a Dart function. + ObjCBlock45.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)>( + _ObjCBlock45_closureTrampoline) + .cast(), + _ObjCBlock45_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_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)>>; +/// 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; -/// ============================================================================ -/// 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>; + /// Use the specified request, which may not be nil. + static const int NSURLSessionDelayedRequestUseNewRequest = 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; + /// Cancel the task; the request parameter is ignored. + static const int NSURLSessionDelayedRequestCancel = 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); +abstract class NSURLSessionAuthChallengeDisposition { + /// Use the specified credential, which may be nil + static const int NSURLSessionAuthChallengeUseCredential = 0; - /// 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); - } + /// Default handling for the challenge - as if this delegate were not implemented; the credential parameter is ignored. + static const int NSURLSessionAuthChallengePerformDefaultHandling = 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); - } + /// The entire request will be canceled; the credential parameter is ignored. + static const int NSURLSessionAuthChallengeCancelAuthenticationChallenge = 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); - } + /// This challenge is rejected and the next authentication protection space should be tried; the credential parameter is ignored. + static const int NSURLSessionAuthChallengeRejectProtectionSpace = 3; +} - NSObject initWithPort_(int sendPort) { - final _ret = - _lib._objc_msgSend_470(_id, _lib._sel_initWithPort_1, sendPort); - 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; - int get sendPort { - return _lib._objc_msgSend_325(_id, _lib._sel_sendPort1); - } + /// Allow the load to continue + static const int NSURLSessionResponseAllow = 1; - 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); - } + /// Turn this request into a download + static const int NSURLSessionResponseBecomeDownload = 2; - 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); - } + /// Turn this task into a stream task + static const int NSURLSessionResponseBecomeStream = 3; } -/// 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); +/// The resource fetch type. +abstract class NSURLSessionTaskMetricsResourceFetchType { + static const int NSURLSessionTaskMetricsResourceFetchTypeUnknown = 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); - } + /// 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; - /// 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 resource was retrieved from the local storage. + static const int NSURLSessionTaskMetricsResourceFetchTypeLocalCache = 3; +} - /// 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); - } +/// DNS protocol used for domain resolution. +abstract class NSURLSessionTaskMetricsDomainResolutionProtocol { + static const int NSURLSessionTaskMetricsDomainResolutionProtocolUnknown = 0; - /// 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); - } + /// Resolution used DNS over UDP. + static const int NSURLSessionTaskMetricsDomainResolutionProtocolUDP = 1; - 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); - } + /// Resolution used DNS over TCP. + static const int NSURLSessionTaskMetricsDomainResolutionProtocolTCP = 2; - 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); - } + /// Resolution used DNS over TLS. + static const int NSURLSessionTaskMetricsDomainResolutionProtocolTLS = 3; + + /// Resolution used DNS over HTTPS. + static const int NSURLSessionTaskMetricsDomainResolutionProtocolHTTPS = 4; } -/// 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._( +/// 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 [CUPHTTPForwardedDelegate] that points to the same underlying object as [other]. - static CUPHTTPForwardedDelegate castFrom(T other) { - return CUPHTTPForwardedDelegate._(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 [CUPHTTPForwardedDelegate] that wraps the given raw object pointer. - static CUPHTTPForwardedDelegate 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 CUPHTTPForwardedDelegate._(other, lib, + return NSURLSessionTaskTransactionMetrics._(other, lib, retain: retain, release: release); } - /// Returns whether [obj] is an instance of [CUPHTTPForwardedDelegate]. + /// 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_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); + obj._lib._class_NSURLSessionTaskTransactionMetrics1); } - NSURLSession? get session { - final _ret = _lib._objc_msgSend_380(_id, _lib._sel_session1); + /// Represents the transaction request. + NSURLRequest? get request { + final _ret = _lib._objc_msgSend_350(_id, _lib._sel_request1); return _ret.address == 0 ? null - : NSURLSession._(_ret, _lib, retain: true, release: true); + : NSURLRequest._(_ret, _lib, retain: true, release: true); } - NSURLSessionTask? get task { - final _ret = _lib._objc_msgSend_473(_id, _lib._sel_task1); + /// 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); return _ret.address == 0 ? null - : NSURLSessionTask._(_ret, _lib, retain: true, release: true); + : NSURLResponse._(_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); + /// 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_348(_id, _lib._sel_fetchStartDate1); 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); + : NSDate._(_ret, _lib, retain: true, 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); + /// 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); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, 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); - /// 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); + /// domainLookupEndDate returns the time after the name lookup was completed. + NSDate? get domainLookupEndDate { + final _ret = _lib._objc_msgSend_348(_id, _lib._sel_domainLookupEndDate1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _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); + /// 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_348(_id, _lib._sel_connectStartDate1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, 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); + /// 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_348(_id, _lib._sel_secureConnectionStartDate1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); } - 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); + /// 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_348(_id, _lib._sel_secureConnectionEndDate1); + return _ret.address == 0 + ? null + : NSDate._(_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); + /// 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); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); } - NSHTTPURLResponse? get response { - final _ret = _lib._objc_msgSend_477(_id, _lib._sel_response1); + /// 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_348(_id, _lib._sel_requestStartDate1); 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); + /// 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_348(_id, _lib._sel_requestEndDate1); 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); + /// 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_348(_id, _lib._sel_responseStartDate1); 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); + /// 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); + 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); + /// 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 + : NSString._(_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); - /// 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); + /// 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); } - /// 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); + /// 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); } - /// 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); + /// 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); } - 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); + /// countOfRequestHeaderBytesSent is the number of bytes transferred for request header. + int get countOfRequestHeaderBytesSent { + return _lib._objc_msgSend_358( + _id, _lib._sel_countOfRequestHeaderBytesSent1); } - void finishWithDisposition_(int disposition) { - return _lib._objc_msgSend_479( - _id, _lib._sel_finishWithDisposition_1, disposition); + /// 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); } - 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); + /// countOfRequestBodyBytesBeforeEncoding is the size of upload body data, file, or stream. + int get countOfRequestBodyBytesBeforeEncoding { + return _lib._objc_msgSend_358( + _id, _lib._sel_countOfRequestBodyBytesBeforeEncoding1); } - /// This property is meant to be used only by CUPHTTPClientDelegate. - int get disposition { - return _lib._objc_msgSend_480(_id, _lib._sel_disposition1); + /// countOfResponseHeaderBytesReceived is the number of bytes transferred for response header. + int get countOfResponseHeaderBytesReceived { + return _lib._objc_msgSend_358( + _id, _lib._sel_countOfResponseHeaderBytesReceived1); } - 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); + /// 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( + _id, _lib._sel_countOfResponseBodyBytesReceived1); } - 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); + /// countOfResponseBodyBytesAfterDecoding is the size of data delivered to your delegate or completion handler. + int get countOfResponseBodyBytesAfterDecoding { + return _lib._objc_msgSend_358( + _id, _lib._sel_countOfResponseBodyBytesAfterDecoding1); } -} - -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); + /// 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); } - /// 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); + /// 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); } - /// 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); + /// 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); } - 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); + /// 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); } - NSData? get data { - final _ret = _lib._objc_msgSend_51(_id, _lib._sel_data1); + /// 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 - : NSData._(_ret, _lib, retain: true, release: true); + : NSNumber._(_ret, _lib, retain: true, release: true); } - static CUPHTTPForwardedData new1(NativeCupertinoHttp _lib) { + /// 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_2(_lib._class_CUPHTTPForwardedData1, _lib._sel_new1); - return CUPHTTPForwardedData._(_ret, _lib, retain: false, release: true); + _lib._objc_msgSend_89(_id, _lib._sel_negotiatedTLSCipherSuite1); + 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); + /// Whether the connection is established over a cellular interface. + bool get cellular { + return _lib._objc_msgSend_11(_id, _lib._sel_isCellular1); } -} - -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); + /// Whether the connection is established over an expensive interface. + bool get expensive { + return _lib._objc_msgSend_11(_id, _lib._sel_isExpensive1); } - /// 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); + /// Whether the connection is established over a constrained interface. + bool get constrained { + return _lib._objc_msgSend_11(_id, _lib._sel_isConstrained1); } - /// 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 a multipath protocol is successfully negotiated for the connection. + bool get multipath { + return _lib._objc_msgSend_11(_id, _lib._sel_isMultipath1); } - 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); + /// DNS protocol used for domain resolution. + int get domainResolutionProtocol { + return _lib._objc_msgSend_455(_id, _lib._sel_domainResolutionProtocol1); } - 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); + @override + NSURLSessionTaskTransactionMetrics init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLSessionTaskTransactionMetrics._(_ret, _lib, + retain: true, release: true); } - static CUPHTTPForwardedComplete new1(NativeCupertinoHttp _lib) { + 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) { - final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPForwardedComplete1, _lib._sel_alloc1); - return CUPHTTPForwardedComplete._(_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 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_456(_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; +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 errSecInteractionNotAllowed = -25308; + /// 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 errSecReadOnlyAttr = -25309; + /// 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 errSecWrongSecVersion = -25310; + /// 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 errSecKeySizeNotAllowed = -25311; +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 errSecNoStorageModule = -25312; +abstract class NSItemProviderFileOptions { + static const int NSItemProviderFileOptionOpenInPlace = 1; +} -const int errSecNoCertificateModule = -25313; +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 errSecNoPolicyModule = -25314; + /// 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 errSecInteractionRequired = -25315; + /// 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 errSecDataNotAvailable = -25316; + /// 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 errSecDataNotModifiable = -25317; + @override + NSItemProvider init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSItemProvider._(_ret, _lib, retain: true, release: true); + } -const int errSecCreateChainFailed = -25318; + void registerDataRepresentationForTypeIdentifier_visibility_loadHandler_( + NSString? typeIdentifier, int visibility, ObjCBlock46 loadHandler) { + return _lib._objc_msgSend_457( + _id, + _lib._sel_registerDataRepresentationForTypeIdentifier_visibility_loadHandler_1, + typeIdentifier?._id ?? ffi.nullptr, + visibility, + loadHandler._id); + } -const int errSecInvalidPrefsDomain = -25319; + void + registerFileRepresentationForTypeIdentifier_fileOptions_visibility_loadHandler_( + NSString? typeIdentifier, + int fileOptions, + int visibility, + ObjCBlock48 loadHandler) { + return _lib._objc_msgSend_458( + _id, + _lib._sel_registerFileRepresentationForTypeIdentifier_fileOptions_visibility_loadHandler_1, + typeIdentifier?._id ?? ffi.nullptr, + fileOptions, + visibility, + loadHandler._id); + } -const int errSecInDarkWake = -25320; + 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 errSecACLNotSimple = -25240; + NSArray registeredTypeIdentifiersWithFileOptions_(int fileOptions) { + final _ret = _lib._objc_msgSend_459( + _id, _lib._sel_registeredTypeIdentifiersWithFileOptions_1, fileOptions); + return NSArray._(_ret, _lib, retain: true, release: true); + } -const int errSecPolicyNotFound = -25241; + bool hasItemConformingToTypeIdentifier_(NSString? typeIdentifier) { + return _lib._objc_msgSend_22( + _id, + _lib._sel_hasItemConformingToTypeIdentifier_1, + typeIdentifier?._id ?? ffi.nullptr); + } -const int errSecInvalidTrustSetting = -25242; + bool hasRepresentationConformingToTypeIdentifier_fileOptions_( + NSString? typeIdentifier, int fileOptions) { + return _lib._objc_msgSend_460( + _id, + _lib._sel_hasRepresentationConformingToTypeIdentifier_fileOptions_1, + typeIdentifier?._id ?? ffi.nullptr, + fileOptions); + } -const int errSecNoAccessForItem = -25243; + NSProgress loadDataRepresentationForTypeIdentifier_completionHandler_( + NSString? typeIdentifier, ObjCBlock47 completionHandler) { + final _ret = _lib._objc_msgSend_461( + _id, + _lib._sel_loadDataRepresentationForTypeIdentifier_completionHandler_1, + typeIdentifier?._id ?? ffi.nullptr, + completionHandler._id); + return NSProgress._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidOwnerEdit = -25244; + NSProgress loadFileRepresentationForTypeIdentifier_completionHandler_( + NSString? typeIdentifier, ObjCBlock50 completionHandler) { + final _ret = _lib._objc_msgSend_462( + _id, + _lib._sel_loadFileRepresentationForTypeIdentifier_completionHandler_1, + typeIdentifier?._id ?? ffi.nullptr, + completionHandler._id); + return NSProgress._(_ret, _lib, retain: true, release: true); + } -const int errSecTrustNotAvailable = -25245; + NSProgress loadInPlaceFileRepresentationForTypeIdentifier_completionHandler_( + NSString? typeIdentifier, ObjCBlock49 completionHandler) { + final _ret = _lib._objc_msgSend_463( + _id, + _lib._sel_loadInPlaceFileRepresentationForTypeIdentifier_completionHandler_1, + typeIdentifier?._id ?? ffi.nullptr, + completionHandler._id); + return NSProgress._(_ret, _lib, retain: true, release: true); + } -const int errSecUnsupportedFormat = -25256; + 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 errSecUnknownFormat = -25257; + set suggestedName(NSString? value) { + _lib._objc_msgSend_360( + _id, _lib._sel_setSuggestedName_1, value?._id ?? ffi.nullptr); + } -const int errSecKeyIsSensitive = -25258; + 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 errSecMultiplePrivKeys = -25259; + void registerObject_visibility_(NSObject? object, int visibility) { + return _lib._objc_msgSend_464(_id, _lib._sel_registerObject_visibility_1, + object?._id ?? ffi.nullptr, visibility); + } -const int errSecPassphraseRequired = -25260; + void registerObjectOfClass_visibility_loadHandler_( + NSObject? aClass, int visibility, ObjCBlock51 loadHandler) { + return _lib._objc_msgSend_465( + _id, + _lib._sel_registerObjectOfClass_visibility_loadHandler_1, + aClass?._id ?? ffi.nullptr, + visibility, + loadHandler._id); + } -const int errSecInvalidPasswordRef = -25261; + bool canLoadObjectOfClass_(NSObject? aClass) { + return _lib._objc_msgSend_0( + _id, _lib._sel_canLoadObjectOfClass_1, aClass?._id ?? ffi.nullptr); + } -const int errSecInvalidTrustSettings = -25262; + NSProgress loadObjectOfClass_completionHandler_( + NSObject? aClass, ObjCBlock52 completionHandler) { + final _ret = _lib._objc_msgSend_466( + _id, + _lib._sel_loadObjectOfClass_completionHandler_1, + aClass?._id ?? ffi.nullptr, + completionHandler._id); + return NSProgress._(_ret, _lib, retain: true, release: true); + } -const int errSecNoTrustSettings = -25263; + NSItemProvider initWithItem_typeIdentifier_( + NSObject? item, NSString? typeIdentifier) { + final _ret = _lib._objc_msgSend_467( + _id, + _lib._sel_initWithItem_typeIdentifier_1, + item?._id ?? ffi.nullptr, + typeIdentifier?._id ?? ffi.nullptr); + return NSItemProvider._(_ret, _lib, retain: true, release: true); + } -const int errSecPkcs12VerifyFailure = -25264; + 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 errSecNotSigner = -26267; + void registerItemForTypeIdentifier_loadHandler_( + NSString? typeIdentifier, NSItemProviderLoadHandler loadHandler) { + return _lib._objc_msgSend_468( + _id, + _lib._sel_registerItemForTypeIdentifier_loadHandler_1, + typeIdentifier?._id ?? ffi.nullptr, + loadHandler); + } -const int errSecDecode = -26275; + void loadItemForTypeIdentifier_options_completionHandler_( + NSString? typeIdentifier, + NSDictionary? options, + NSItemProviderCompletionHandler completionHandler) { + return _lib._objc_msgSend_469( + _id, + _lib._sel_loadItemForTypeIdentifier_options_completionHandler_1, + typeIdentifier?._id ?? ffi.nullptr, + options?._id ?? ffi.nullptr, + completionHandler); + } -const int errSecServiceNotAvailable = -67585; + NSItemProviderLoadHandler get previewImageHandler { + return _lib._objc_msgSend_470(_id, _lib._sel_previewImageHandler1); + } -const int errSecInsufficientClientID = -67586; + set previewImageHandler(NSItemProviderLoadHandler value) { + _lib._objc_msgSend_471(_id, _lib._sel_setPreviewImageHandler_1, value); + } -const int errSecDeviceReset = -67587; + void loadPreviewImageWithOptions_completionHandler_(NSDictionary? options, + NSItemProviderCompletionHandler completionHandler) { + return _lib._objc_msgSend_472( + _id, + _lib._sel_loadPreviewImageWithOptions_completionHandler_1, + options?._id ?? ffi.nullptr, + completionHandler); + } -const int errSecDeviceFailed = -67588; + 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 errSecAppleAddAppACLSubject = -67589; + 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 errSecApplePublicKeyIncomplete = -67590; +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); +} -const int errSecAppleSignatureMismatch = -67591; +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 errSecAppleInvalidKeyStartDate = -67592; +ffi.Pointer _ObjCBlock46_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) { + return _ObjCBlock46_closureRegistry[block.ref.target.address]!(arg0); +} -const int errSecAppleInvalidKeyEndDate = -67593; +class ObjCBlock46 extends _ObjCBlockBase { + ObjCBlock46._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); -const int errSecConversionError = -67594; + /// Creates a block from a C function pointer. + ObjCBlock46.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)>( + _ObjCBlock46_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; -const int errSecAppleSSLv2Rollback = -67595; + /// Creates a block from a Dart function. + ObjCBlock46.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)>( + _ObjCBlock46_closureTrampoline) + .cast(), + _ObjCBlock46_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 errSecQuotaExceeded = -67596; +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); +} -const int errSecFileTooBig = -67597; +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 errSecInvalidDatabaseBlob = -67598; +void _ObjCBlock47_closureTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1) { + return _ObjCBlock47_closureRegistry[block.ref.target.address]!(arg0, arg1); +} -const int errSecInvalidKeyBlob = -67599; +class ObjCBlock47 extends _ObjCBlockBase { + ObjCBlock47._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); -const int errSecIncompatibleDatabaseBlob = -67600; + /// Creates a block from a C function pointer. + ObjCBlock47.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)>( + _ObjCBlock47_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; -const int errSecIncompatibleKeyBlob = -67601; + /// Creates a block from a Dart function. + ObjCBlock47.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)>( + _ObjCBlock47_closureTrampoline) + .cast(), + _ObjCBlock47_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 errSecHostNameMismatch = -67602; +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); +} -const int errSecUnknownCriticalExtensionFlag = -67603; +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 errSecNoBasicConstraints = -67604; +ffi.Pointer _ObjCBlock48_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) { + return _ObjCBlock48_closureRegistry[block.ref.target.address]!(arg0); +} -const int errSecNoBasicConstraintsCA = -67605; +class ObjCBlock48 extends _ObjCBlockBase { + ObjCBlock48._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); -const int errSecInvalidAuthorityKeyID = -67606; + /// Creates a block from a C function pointer. + ObjCBlock48.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)>( + _ObjCBlock48_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; -const int errSecInvalidSubjectKeyID = -67607; + /// Creates a block from a Dart function. + ObjCBlock48.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)>( + _ObjCBlock48_closureTrampoline) + .cast(), + _ObjCBlock48_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 errSecInvalidKeyUsageForPolicy = -67608; +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); +} -const int errSecInvalidExtendedKeyUsage = -67609; +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 errSecInvalidIDLinkage = -67610; +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); +} -const int errSecPathLengthConstraintExceeded = -67611; +class ObjCBlock49 extends _ObjCBlockBase { + ObjCBlock49._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); -const int errSecInvalidRoot = -67612; + /// Creates a block from a C function pointer. + ObjCBlock49.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)>( + _ObjCBlock49_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; -const int errSecCRLExpired = -67613; + /// Creates a block from a Dart function. + ObjCBlock49.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)>( + _ObjCBlock49_closureTrampoline) + .cast(), + _ObjCBlock49_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 errSecCRLNotValidYet = -67614; +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); +} -const int errSecCRLNotFound = -67615; +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 errSecCRLServerDown = -67616; +void _ObjCBlock50_closureTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1) { + return _ObjCBlock50_closureRegistry[block.ref.target.address]!(arg0, arg1); +} -const int errSecCRLBadURI = -67617; +class ObjCBlock50 extends _ObjCBlockBase { + ObjCBlock50._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); -const int errSecUnknownCertExtension = -67618; + /// Creates a block from a C function pointer. + ObjCBlock50.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)>( + _ObjCBlock50_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; -const int errSecUnknownCRLExtension = -67619; + /// Creates a block from a Dart function. + ObjCBlock50.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)>( + _ObjCBlock50_closureTrampoline) + .cast(), + _ObjCBlock50_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 errSecCRLNotTrusted = -67620; +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); +} -const int errSecCRLPolicyFailed = -67621; +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 errSecIDPFailure = -67622; +ffi.Pointer _ObjCBlock51_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) { + return _ObjCBlock51_closureRegistry[block.ref.target.address]!(arg0); +} -const int errSecSMIMEEmailAddressesNotFound = -67623; +class ObjCBlock51 extends _ObjCBlockBase { + ObjCBlock51._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); -const int errSecSMIMEBadExtendedKeyUsage = -67624; + /// Creates a block from a C function pointer. + ObjCBlock51.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)>( + _ObjCBlock51_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; -const int errSecSMIMEBadKeyUsage = -67625; + /// Creates a block from a Dart function. + ObjCBlock51.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)>( + _ObjCBlock51_closureTrampoline) + .cast(), + _ObjCBlock51_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 errSecSMIMEKeyUsageNotCritical = -67626; +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); +} -const int errSecSMIMENoEmailAddress = -67627; +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 errSecSMIMESubjAltNameNotCritical = -67628; +void _ObjCBlock52_closureTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1) { + return _ObjCBlock52_closureRegistry[block.ref.target.address]!(arg0, arg1); +} -const int errSecSSLBadExtendedKeyUsage = -67629; +class ObjCBlock52 extends _ObjCBlockBase { + ObjCBlock52._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); -const int errSecOCSPBadResponse = -67630; + /// Creates a block from a C function pointer. + ObjCBlock52.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)>( + _ObjCBlock52_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; -const int errSecOCSPBadRequest = -67631; + /// Creates a block from a Dart function. + ObjCBlock52.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)>( + _ObjCBlock52_closureTrampoline) + .cast(), + _ObjCBlock52_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 errSecOCSPUnavailable = -67632; +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); +} -const int errSecOCSPStatusUnrecognized = -67633; +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); +} -const int errSecEndOfData = -67634; +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); +} -const int errSecIncompleteCertRevocationCheck = -67635; +class ObjCBlock53 extends _ObjCBlockBase { + ObjCBlock53._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); -const int errSecNetworkFailure = -67636; + /// Creates a block from a C function pointer. + ObjCBlock53.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)>( + _ObjCBlock53_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; -const int errSecOCSPNotTrustedToAnchor = -67637; + /// Creates a block from a Dart function. + ObjCBlock53.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)>( + _ObjCBlock53_closureTrampoline) + .cast(), + _ObjCBlock53_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 errSecRecordModified = -67638; +typedef NSItemProviderCompletionHandler = ffi.Pointer<_ObjCBlock>; -const int errSecOCSPSignatureError = -67639; +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 errSecOCSPNoSigner = -67640; +typedef NSStringEncodingDetectionOptionsKey = ffi.Pointer; -const int errSecOCSPResponderMalformedReq = -67641; +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 errSecOCSPResponderInternalError = -67642; + /// 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 errSecOCSPResponderTryLater = -67643; + /// 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 errSecOCSPResponderSignatureRequired = -67644; + /// 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 errSecOCSPResponderUnauthorized = -67645; + void replaceCharactersInRange_withString_(NSRange range, NSString? aString) { + return _lib._objc_msgSend_473( + _id, + _lib._sel_replaceCharactersInRange_withString_1, + range, + aString?._id ?? ffi.nullptr); + } -const int errSecOCSPResponseNonceMismatch = -67646; + void insertString_atIndex_(NSString? aString, int loc) { + return _lib._objc_msgSend_474(_id, _lib._sel_insertString_atIndex_1, + aString?._id ?? ffi.nullptr, loc); + } -const int errSecCodeSigningBadCertChainLength = -67647; + void deleteCharactersInRange_(NSRange range) { + return _lib._objc_msgSend_287( + _id, _lib._sel_deleteCharactersInRange_1, range); + } -const int errSecCodeSigningNoBasicConstraints = -67648; + void appendString_(NSString? aString) { + return _lib._objc_msgSend_188( + _id, _lib._sel_appendString_1, aString?._id ?? ffi.nullptr); + } -const int errSecCodeSigningBadPathLengthConstraint = -67649; + void appendFormat_(NSString? format) { + return _lib._objc_msgSend_188( + _id, _lib._sel_appendFormat_1, format?._id ?? ffi.nullptr); + } -const int errSecCodeSigningNoExtendedKeyUsage = -67650; + void setString_(NSString? aString) { + return _lib._objc_msgSend_188( + _id, _lib._sel_setString_1, aString?._id ?? ffi.nullptr); + } -const int errSecCodeSigningDevelopment = -67651; + int replaceOccurrencesOfString_withString_options_range_(NSString? target, + NSString? replacement, int options, NSRange searchRange) { + return _lib._objc_msgSend_475( + _id, + _lib._sel_replaceOccurrencesOfString_withString_options_range_1, + target?._id ?? ffi.nullptr, + replacement?._id ?? ffi.nullptr, + options, + searchRange); + } -const int errSecResourceSignBadCertChainLength = -67652; + bool applyTransform_reverse_range_updatedRange_(NSStringTransform transform, + bool reverse, NSRange range, NSRangePointer resultingRange) { + return _lib._objc_msgSend_476( + _id, + _lib._sel_applyTransform_reverse_range_updatedRange_1, + transform, + reverse, + range, + resultingRange); + } -const int errSecResourceSignBadExtKeyUsage = -67653; + NSMutableString initWithCapacity_(int capacity) { + final _ret = + _lib._objc_msgSend_477(_id, _lib._sel_initWithCapacity_1, capacity); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } -const int errSecTrustSettingDeny = -67654; + static NSMutableString stringWithCapacity_( + NativeCupertinoHttp _lib, int capacity) { + final _ret = _lib._objc_msgSend_477( + _lib._class_NSMutableString1, _lib._sel_stringWithCapacity_1, capacity); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidSubjectName = -67655; + static ffi.Pointer getAvailableStringEncodings( + NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_242( + _lib._class_NSMutableString1, _lib._sel_availableStringEncodings1); + } -const int errSecUnknownQualifiedCertStatement = -67656; + 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 errSecMobileMeRequestQueued = -67657; + static int getDefaultCStringEncoding(NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSMutableString1, _lib._sel_defaultCStringEncoding1); + } -const int errSecMobileMeRequestRedirected = -67658; + 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 errSecMobileMeServerError = -67659; + 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 errSecMobileMeServerNotAvailable = -67660; + 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 errSecMobileMeServerAlreadyExists = -67661; + 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 errSecMobileMeServerServiceErr = -67662; + 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 errSecMobileMeRequestAlreadyPending = -67663; + 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 errSecMobileMeNoRequestPending = -67664; + 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 errSecMobileMeCSRVerifyFailure = -67665; + 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 errSecMobileMeFailedConsistencyCheck = -67666; + 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 errSecNotInitialized = -67667; + 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 errSecInvalidHandleUsage = -67668; + 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 errSecPVCReferentNotFound = -67669; + 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 errSecFunctionIntegrityFail = -67670; + 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 errSecInternalError = -67671; + 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 errSecMemoryError = -67672; + 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 errSecInvalidData = -67673; + 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 errSecMDSError = -67674; + 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 errSecInvalidPointer = -67675; + 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 errSecSelfCheckFailed = -67676; + 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 errSecFunctionFailed = -67677; + 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 errSecModuleManifestVerifyFailed = -67678; +typedef NSExceptionName = ffi.Pointer; -const int errSecInvalidGUID = -67679; +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 errSecInvalidHandle = -67680; + /// 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 errSecInvalidDBList = -67681; + /// 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 errSecInvalidPassthroughID = -67682; + /// 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 errSecInvalidNetworkAddress = -67683; + static ffi.Pointer getAvailableStringEncodings( + NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_242( + _lib._class_NSSimpleCString1, _lib._sel_availableStringEncodings1); + } -const int errSecCRLAlreadySigned = -67684; + 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 errSecInvalidNumberOfFields = -67685; + static int getDefaultCStringEncoding(NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSSimpleCString1, _lib._sel_defaultCStringEncoding1); + } -const int errSecVerificationFailure = -67686; + 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 errSecUnknownTag = -67687; + 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 errSecInvalidSignature = -67688; + 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 errSecInvalidName = -67689; + 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 errSecInvalidCertificateRef = -67690; + 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 errSecInvalidCertificateGroup = -67691; + 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 errSecTagNotFound = -67692; + 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 errSecInvalidQuery = -67693; + 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 errSecInvalidValue = -67694; + 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 errSecCallbackFailed = -67695; + 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 errSecACLDeleteFailed = -67696; + 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 errSecACLReplaceFailed = -67697; + 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 errSecACLAddFailed = -67698; + 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 errSecACLChangeFailed = -67699; + 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 errSecInvalidAccessCredentials = -67700; + 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 errSecInvalidRecord = -67701; + 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 errSecInvalidACL = -67702; + 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 errSecInvalidSampleValue = -67703; + 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 errSecIncompatibleVersion = -67704; + 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 errSecPrivilegeNotGranted = -67705; + 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 errSecInvalidScope = -67706; +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 errSecPVCAlreadyConfigured = -67707; + /// 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 errSecInvalidPVC = -67708; + /// 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 errSecEMMLoadFailed = -67709; + /// 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 errSecEMMUnloadFailed = -67710; + static ffi.Pointer getAvailableStringEncodings( + NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_242( + _lib._class_NSConstantString1, _lib._sel_availableStringEncodings1); + } -const int errSecAddinLoadFailed = -67711; + 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 errSecInvalidKeyRef = -67712; + static int getDefaultCStringEncoding(NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSConstantString1, _lib._sel_defaultCStringEncoding1); + } -const int errSecInvalidKeyHierarchy = -67713; + 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 errSecAddinUnloadFailed = -67714; + 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 errSecLibraryReferenceNotFound = -67715; + 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 errSecInvalidAddinFunctionTable = -67716; + 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 errSecInvalidServiceMask = -67717; + 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 errSecModuleNotLoaded = -67718; + 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 errSecInvalidSubServiceID = -67719; + 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 errSecAttributeNotInContext = -67720; + 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 errSecModuleManagerInitializeFailed = -67721; + 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 errSecModuleManagerNotFound = -67722; + 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 errSecEventNotificationCallbackNotFound = -67723; + 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 errSecInputLengthError = -67724; + 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 errSecOutputLengthError = -67725; + 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 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_NSConstantString1, + _lib._sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_1, + data?._id ?? ffi.nullptr, + opts?._id ?? ffi.nullptr, + string, + usedLossyConversion); + } -const int errSecDeviceError = -67727; + 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 errSecAttachHandleBusy = -67728; + 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 errSecNotLoggedIn = -67729; + 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 errSecAlgorithmMismatch = -67730; + 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 errSecKeyUsageIncorrect = -67731; + 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 errSecKeyBlobTypeIncorrect = -67732; + 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 errSecKeyHeaderInconsistent = -67733; +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 errSecUnsupportedKeyFormat = -67734; + /// 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 errSecUnsupportedKeySize = -67735; + /// 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 errSecInvalidKeyUsageMask = -67736; + /// 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 errSecUnsupportedKeyUsageMask = -67737; + void addCharactersInRange_(NSRange aRange) { + return _lib._objc_msgSend_287( + _id, _lib._sel_addCharactersInRange_1, aRange); + } -const int errSecInvalidKeyAttributeMask = -67738; + void removeCharactersInRange_(NSRange aRange) { + return _lib._objc_msgSend_287( + _id, _lib._sel_removeCharactersInRange_1, aRange); + } -const int errSecUnsupportedKeyAttributeMask = -67739; + void addCharactersInString_(NSString? aString) { + return _lib._objc_msgSend_188( + _id, _lib._sel_addCharactersInString_1, aString?._id ?? ffi.nullptr); + } -const int errSecInvalidKeyLabel = -67740; + void removeCharactersInString_(NSString? aString) { + return _lib._objc_msgSend_188( + _id, _lib._sel_removeCharactersInString_1, aString?._id ?? ffi.nullptr); + } -const int errSecUnsupportedKeyLabel = -67741; + void formUnionWithCharacterSet_(NSCharacterSet? otherSet) { + return _lib._objc_msgSend_478(_id, _lib._sel_formUnionWithCharacterSet_1, + otherSet?._id ?? ffi.nullptr); + } -const int errSecInvalidKeyFormat = -67742; + void formIntersectionWithCharacterSet_(NSCharacterSet? otherSet) { + return _lib._objc_msgSend_478( + _id, + _lib._sel_formIntersectionWithCharacterSet_1, + otherSet?._id ?? ffi.nullptr); + } -const int errSecUnsupportedVectorOfBuffers = -67743; + void invert() { + return _lib._objc_msgSend_1(_id, _lib._sel_invert1); + } -const int errSecInvalidInputVector = -67744; + 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 errSecInvalidOutputVector = -67745; + 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 errSecInvalidContext = -67746; + 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 errSecInvalidAlgorithm = -67747; + 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 errSecInvalidAttributeKey = -67748; + 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 errSecMissingAttributeKey = -67749; + 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 errSecInvalidAttributeInitVector = -67750; + 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 errSecMissingAttributeInitVector = -67751; + 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 errSecInvalidAttributeSalt = -67752; + 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 errSecMissingAttributeSalt = -67753; + 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 errSecInvalidAttributePadding = -67754; + 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 errSecMissingAttributePadding = -67755; + 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 errSecInvalidAttributeRandom = -67756; + 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 errSecMissingAttributeRandom = -67757; + 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 errSecInvalidAttributeSeed = -67758; + 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 errSecMissingAttributeSeed = -67759; + static NSMutableCharacterSet characterSetWithRange_( + NativeCupertinoHttp _lib, NSRange aRange) { + final _ret = _lib._objc_msgSend_479(_lib._class_NSMutableCharacterSet1, + _lib._sel_characterSetWithRange_1, aRange); + return NSMutableCharacterSet._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidAttributePassphrase = -67760; + static NSMutableCharacterSet characterSetWithCharactersInString_( + NativeCupertinoHttp _lib, NSString? aString) { + final _ret = _lib._objc_msgSend_480( + _lib._class_NSMutableCharacterSet1, + _lib._sel_characterSetWithCharactersInString_1, + aString?._id ?? ffi.nullptr); + return NSMutableCharacterSet._(_ret, _lib, retain: true, release: true); + } -const int errSecMissingAttributePassphrase = -67761; + static NSMutableCharacterSet characterSetWithBitmapRepresentation_( + NativeCupertinoHttp _lib, NSData? data) { + final _ret = _lib._objc_msgSend_481( + _lib._class_NSMutableCharacterSet1, + _lib._sel_characterSetWithBitmapRepresentation_1, + data?._id ?? ffi.nullptr); + return NSMutableCharacterSet._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidAttributeKeyLength = -67762; + static NSMutableCharacterSet characterSetWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString? fName) { + 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); + } -const int errSecMissingAttributeKeyLength = -67763; + /// 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 errSecInvalidAttributeBlockSize = -67764; + /// 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 errSecMissingAttributeBlockSize = -67765; + /// 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 errSecInvalidAttributeOutputSize = -67766; + /// 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 errSecMissingAttributeOutputSize = -67767; + /// 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 errSecInvalidAttributeRounds = -67768; + /// 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 errSecMissingAttributeRounds = -67769; + 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 errSecInvalidAlgorithmParms = -67770; + 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 errSecMissingAlgorithmParms = -67771; +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 errSecInvalidAttributeLabel = -67772; +/// 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 errSecMissingAttributeLabel = -67773; + /// 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 errSecInvalidAttributeKeyType = -67774; + /// 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 errSecMissingAttributeKeyType = -67775; + /// 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 errSecInvalidAttributeMode = -67776; + 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); + return NSURLQueryItem._(_ret, _lib, retain: true, release: true); + } -const int errSecMissingAttributeMode = -67777; + static NSURLQueryItem queryItemWithName_value_( + NativeCupertinoHttp _lib, NSString? name, NSString? value) { + final _ret = _lib._objc_msgSend_482( + _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 errSecInvalidAttributeEffectiveBits = -67778; + 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 errSecMissingAttributeEffectiveBits = -67779; + 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 errSecInvalidAttributeStartDate = -67780; + 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 errSecMissingAttributeStartDate = -67781; + 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 errSecInvalidAttributeEndDate = -67782; +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 errSecMissingAttributeEndDate = -67783; + /// 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 errSecInvalidAttributeVersion = -67784; + /// 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 errSecMissingAttributeVersion = -67785; + /// 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 errSecInvalidAttributePrime = -67786; + /// 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 errSecMissingAttributePrime = -67787; + /// 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 errSecInvalidAttributeBase = -67788; + /// 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 errSecMissingAttributeBase = -67789; + /// 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 errSecInvalidAttributeSubprime = -67790; + /// 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 errSecMissingAttributeSubprime = -67791; + /// 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 errSecInvalidAttributeIterationCount = -67792; + /// 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( + _id, _lib._sel_URLRelativeToURL_1, baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } -const int errSecMissingAttributeIterationCount = -67793; + /// 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 errSecInvalidAttributeDLDBHandle = -67794; + /// 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 errSecMissingAttributeDLDBHandle = -67795; + /// Attempting to set the scheme with an invalid scheme string will cause an exception. + set scheme(NSString? value) { + _lib._objc_msgSend_360( + _id, _lib._sel_setScheme_1, value?._id ?? ffi.nullptr); + } -const int errSecInvalidAttributeAccessCredentials = -67796; + 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 errSecMissingAttributeAccessCredentials = -67797; + set user(NSString? value) { + _lib._objc_msgSend_360(_id, _lib._sel_setUser_1, value?._id ?? ffi.nullptr); + } -const int errSecInvalidAttributePublicKeyFormat = -67798; + 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 errSecMissingAttributePublicKeyFormat = -67799; + set password(NSString? value) { + _lib._objc_msgSend_360( + _id, _lib._sel_setPassword_1, value?._id ?? ffi.nullptr); + } -const int errSecInvalidAttributePrivateKeyFormat = -67800; + 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 errSecMissingAttributePrivateKeyFormat = -67801; + set host(NSString? value) { + _lib._objc_msgSend_360(_id, _lib._sel_setHost_1, value?._id ?? ffi.nullptr); + } -const int errSecInvalidAttributeSymmetricKeyFormat = -67802; + /// 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 errSecMissingAttributeSymmetricKeyFormat = -67803; + /// 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); + } -const int errSecInvalidAttributeWrappedKeyFormat = -67804; + 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 errSecMissingAttributeWrappedKeyFormat = -67805; + set path(NSString? value) { + _lib._objc_msgSend_360(_id, _lib._sel_setPath_1, value?._id ?? ffi.nullptr); + } -const int errSecStagedOperationInProgress = -67806; + 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 errSecStagedOperationNotStarted = -67807; + set query(NSString? value) { + _lib._objc_msgSend_360( + _id, _lib._sel_setQuery_1, value?._id ?? ffi.nullptr); + } -const int errSecVerifyFailed = -67808; + 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 errSecQuerySizeUnknown = -67809; + set fragment(NSString? value) { + _lib._objc_msgSend_360( + _id, _lib._sel_setFragment_1, value?._id ?? ffi.nullptr); + } -const int errSecBlockSizeMismatch = -67810; + /// 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 errSecPublicKeyInconsistent = -67811; + /// 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( + _id, _lib._sel_setPercentEncodedUser_1, value?._id ?? ffi.nullptr); + } -const int errSecDeviceVerifyFailed = -67812; + 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 errSecInvalidLoginName = -67813; + set percentEncodedPassword(NSString? value) { + _lib._objc_msgSend_360( + _id, _lib._sel_setPercentEncodedPassword_1, value?._id ?? ffi.nullptr); + } -const int errSecAlreadyLoggedIn = -67814; + 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 errSecInvalidDigestAlgorithm = -67815; + set percentEncodedHost(NSString? value) { + _lib._objc_msgSend_360( + _id, _lib._sel_setPercentEncodedHost_1, value?._id ?? ffi.nullptr); + } -const int errSecInvalidCRLGroup = -67816; + 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 errSecCertificateCannotOperate = -67817; + set percentEncodedPath(NSString? value) { + _lib._objc_msgSend_360( + _id, _lib._sel_setPercentEncodedPath_1, value?._id ?? ffi.nullptr); + } -const int errSecCertificateExpired = -67818; + 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 errSecCertificateNotValidYet = -67819; + set percentEncodedQuery(NSString? value) { + _lib._objc_msgSend_360( + _id, _lib._sel_setPercentEncodedQuery_1, value?._id ?? ffi.nullptr); + } -const int errSecCertificateRevoked = -67820; + 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 errSecCertificateSuspended = -67821; + set percentEncodedFragment(NSString? value) { + _lib._objc_msgSend_360( + _id, _lib._sel_setPercentEncodedFragment_1, value?._id ?? ffi.nullptr); + } -const int errSecInsufficientCredentials = -67822; + 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 errSecInvalidAction = -67823; + set encodedHost(NSString? value) { + _lib._objc_msgSend_360( + _id, _lib._sel_setEncodedHost_1, value?._id ?? ffi.nullptr); + } -const int errSecInvalidAuthority = -67824; + /// 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 errSecVerifyActionFailed = -67825; + NSRange get rangeOfUser { + return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfUser1); + } -const int errSecInvalidCertAuthority = -67826; + NSRange get rangeOfPassword { + return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfPassword1); + } -const int errSecInvalidCRLAuthority = -67827; + NSRange get rangeOfHost { + return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfHost1); + } -const int errSecInvaldCRLAuthority = -67827; + NSRange get rangeOfPort { + return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfPort1); + } -const int errSecInvalidCRLEncoding = -67828; + NSRange get rangeOfPath { + return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfPath1); + } -const int errSecInvalidCRLType = -67829; + NSRange get rangeOfQuery { + return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfQuery1); + } -const int errSecInvalidCRL = -67830; + NSRange get rangeOfFragment { + return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfFragment1); + } -const int errSecInvalidFormType = -67831; + /// 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 errSecInvalidID = -67832; + /// 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_418( + _id, _lib._sel_setQueryItems_1, value?._id ?? ffi.nullptr); + } -const int errSecInvalidIdentifier = -67833; + /// 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 errSecInvalidIndex = -67834; + /// 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_418(_id, _lib._sel_setPercentEncodedQueryItems_1, + value?._id ?? ffi.nullptr); + } -const int errSecInvalidPolicyIdentifiers = -67835; + 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 errSecInvalidTimeString = -67836; + 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 errSecInvalidReason = -67837; +/// 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 errSecInvalidRequestInputs = -67838; + /// 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 errSecInvalidResponseVector = -67839; + /// 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 errSecInvalidStopOnPolicy = -67840; + /// 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 errSecInvalidTuple = -67841; + 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 errSecMultipleValuesUnsupported = -67842; + 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 errSecNotTrusted = -67843; + 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 errSecNoDefaultAuthority = -67844; +/// ! +/// @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 errSecRejectedForm = -67845; + /// 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 errSecRequestLost = -67846; + /// 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 errSecRequestRejected = -67847; + /// 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 errSecUnsupportedAddressType = -67848; + /// ! + /// @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_484( + _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 errSecUnsupportedService = -67849; + /// ! + /// @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 errSecInvalidTupleGroup = -67850; + /// ! + /// @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 errSecInvalidBaseACLs = -67851; + /// ! + /// @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 errSecInvalidTupleCredentials = -67852; + /// ! + /// @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_485(_lib._class_NSHTTPURLResponse1, + _lib._sel_localizedStringForStatusCode_1, statusCode); + return NSString._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidTupleCredendtials = -67852; + 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 errSecInvalidEncoding = -67853; + 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 errSecInvalidValidityPeriod = -67854; +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 errSecInvalidRequestor = -67855; + /// 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 errSecRequestDescriptor = -67856; + /// 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 errSecInvalidBundleInfo = -67857; + /// 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 errSecInvalidCRLIndex = -67858; + static NSException exceptionWithName_reason_userInfo_( + NativeCupertinoHttp _lib, + NSExceptionName name, + NSString? reason, + NSDictionary? userInfo) { + final _ret = _lib._objc_msgSend_486( + _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 errSecNoFieldValues = -67859; + NSException initWithName_reason_userInfo_( + NSExceptionName aName, NSString? aReason, NSDictionary? aUserInfo) { + final _ret = _lib._objc_msgSend_487( + _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 errSecUnsupportedFieldFormat = -67860; + NSExceptionName get name { + return _lib._objc_msgSend_32(_id, _lib._sel_name1); + } -const int errSecUnsupportedIndexInfo = -67861; + 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 errSecUnsupportedLocality = -67862; + 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 errSecUnsupportedNumAttributes = -67863; + 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 errSecUnsupportedNumIndexes = -67864; + 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 errSecUnsupportedNumRecordTypes = -67865; + void raise() { + return _lib._objc_msgSend_1(_id, _lib._sel_raise1); + } -const int errSecFieldSpecifiedMultiple = -67866; + 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); + } -const int errSecIncompatibleFieldFormat = -67867; + 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); + } -const int errSecInvalidParsingModule = -67868; + 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 errSecDatabaseLocked = -67869; + 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 errSecDatastoreIsOpen = -67870; +typedef NSUncaughtExceptionHandler + = ffi.NativeFunction exception)>; -const int errSecMissingValue = -67871; +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 errSecUnsupportedQueryLimits = -67872; + /// 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 errSecUnsupportedNumSelectionPreds = -67873; + /// 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 errSecUnsupportedOperator = -67874; + /// 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 errSecInvalidDBLocation = -67875; + static NSAssertionHandler? getCurrentHandler(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_489( + _lib._class_NSAssertionHandler1, _lib._sel_currentHandler1); + return _ret.address == 0 + ? null + : NSAssertionHandler._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidAccessRequest = -67876; + void handleFailureInMethod_object_file_lineNumber_description_( + ffi.Pointer selector, + NSObject object, + NSString? fileName, + int line, + NSString? format) { + return _lib._objc_msgSend_490( + _id, + _lib._sel_handleFailureInMethod_object_file_lineNumber_description_1, + selector, + object._id, + fileName?._id ?? ffi.nullptr, + line, + format?._id ?? ffi.nullptr); + } -const int errSecInvalidIndexInfo = -67877; + void handleFailureInFunction_file_lineNumber_description_( + NSString? functionName, NSString? fileName, int line, NSString? format) { + return _lib._objc_msgSend_491( + _id, + _lib._sel_handleFailureInFunction_file_lineNumber_description_1, + functionName?._id ?? ffi.nullptr, + fileName?._id ?? ffi.nullptr, + line, + format?._id ?? ffi.nullptr); + } -const int errSecInvalidNewOwner = -67878; + 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 errSecInvalidModifyMode = -67879; + 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 errSecMissingRequiredExtension = -67880; +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 errSecExtendedKeyUsageNotCritical = -67881; + /// 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 errSecTimestampMissing = -67882; + /// 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 errSecTimestampInvalid = -67883; + /// 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 errSecTimestampNotTrusted = -67884; + static NSBlockOperation blockOperationWithBlock_( + NativeCupertinoHttp _lib, ObjCBlock block) { + final _ret = _lib._objc_msgSend_492(_lib._class_NSBlockOperation1, + _lib._sel_blockOperationWithBlock_1, block._id); + return NSBlockOperation._(_ret, _lib, retain: true, release: true); + } -const int errSecTimestampServiceNotAvailable = -67885; + void addExecutionBlock_(ObjCBlock block) { + return _lib._objc_msgSend_387( + _id, _lib._sel_addExecutionBlock_1, block._id); + } -const int errSecTimestampBadAlg = -67886; + 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 errSecTimestampBadRequest = -67887; + 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 errSecTimestampBadDataFormat = -67888; + 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 errSecTimestampTimeNotAvailable = -67889; +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 errSecTimestampUnacceptedPolicy = -67890; + /// 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 errSecTimestampUnacceptedExtension = -67891; + /// 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 errSecTimestampAddInfoNotAvailable = -67892; + /// 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 errSecTimestampSystemFailure = -67893; + 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); + } -const int errSecSigningTimeMissing = -67894; + NSInvocationOperation initWithInvocation_(NSInvocation? inv) { + final _ret = _lib._objc_msgSend_494( + _id, _lib._sel_initWithInvocation_1, inv?._id ?? ffi.nullptr); + return NSInvocationOperation._(_ret, _lib, retain: true, release: true); + } -const int errSecTimestampRejection = -67895; + NSInvocation? get invocation { + final _ret = _lib._objc_msgSend_495(_id, _lib._sel_invocation1); + return _ret.address == 0 + ? null + : NSInvocation._(_ret, _lib, retain: true, release: true); + } -const int errSecTimestampWaiting = -67896; + NSObject get result { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_result1); + return NSObject._(_ret, _lib, retain: true, release: true); + } -const int errSecTimestampRevocationWarning = -67897; + 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 errSecTimestampRevocationNotification = -67898; + 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 errSecCertificatePolicyNotAllowed = -67899; +final class _Dart_Isolate extends ffi.Opaque {} -const int errSecCertificateNameNotAllowed = -67900; +final class _Dart_IsolateGroup extends ffi.Opaque {} -const int errSecCertificateValidityPeriodTooLong = -67901; +final class _Dart_Handle extends ffi.Opaque {} -const int errSecCertificateIsCA = -67902; +final class _Dart_WeakPersistentHandle extends ffi.Opaque {} -const int errSecCertificateDuplicateExtension = -67903; +final class _Dart_FinalizableHandle extends ffi.Opaque {} -const int errSSLProtocol = -9800; +typedef Dart_WeakPersistentHandle = ffi.Pointer<_Dart_WeakPersistentHandle>; -const int errSSLNegotiation = -9801; +/// 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 errSSLFatalAlert = -9802; +final class Dart_IsolateFlags extends ffi.Struct { + @ffi.Int32() + external int version; -const int errSSLWouldBlock = -9803; + @ffi.Bool() + external bool enable_asserts; -const int errSSLSessionNotFound = -9804; + @ffi.Bool() + external bool use_field_guards; -const int errSSLClosedGraceful = -9805; + @ffi.Bool() + external bool use_osr; -const int errSSLClosedAbort = -9806; + @ffi.Bool() + external bool obfuscate; -const int errSSLXCertChainInvalid = -9807; + @ffi.Bool() + external bool load_vmservice_library; -const int errSSLBadCert = -9808; + @ffi.Bool() + external bool copy_parent_code; -const int errSSLCrypto = -9809; + @ffi.Bool() + external bool null_safety; -const int errSSLInternal = -9810; + @ffi.Bool() + external bool is_system_isolate; +} -const int errSSLModuleAttach = -9811; +/// Forward declaration +final class Dart_CodeObserver extends ffi.Struct { + external ffi.Pointer data; -const int errSSLUnknownRootCert = -9812; + external Dart_OnNewCodeCallback on_new_code; +} -const int errSSLNoRootCert = -9813; +/// 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 errSSLCertExpired = -9814; +/// 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 errSSLCertNotYetValid = -9815; + external ffi.Pointer vm_snapshot_data; -const int errSSLClosedNoNotify = -9816; + external ffi.Pointer vm_snapshot_instructions; -const int errSSLBufferOverflow = -9817; + external Dart_IsolateGroupCreateCallback create_group; -const int errSSLBadCipherSuite = -9818; + external Dart_InitializeIsolateCallback initialize_isolate; -const int errSSLPeerUnexpectedMsg = -9819; + external Dart_IsolateShutdownCallback shutdown_isolate; -const int errSSLPeerBadRecordMac = -9820; + external Dart_IsolateCleanupCallback cleanup_isolate; -const int errSSLPeerDecryptionFail = -9821; + external Dart_IsolateGroupCleanupCallback cleanup_group; -const int errSSLPeerRecordOverflow = -9822; + external Dart_ThreadExitCallback thread_exit; -const int errSSLPeerDecompressFail = -9823; + external Dart_FileOpenCallback file_open; -const int errSSLPeerHandshakeFail = -9824; + external Dart_FileReadCallback file_read; -const int errSSLPeerBadCert = -9825; + external Dart_FileWriteCallback file_write; -const int errSSLPeerUnsupportedCert = -9826; + external Dart_FileCloseCallback file_close; -const int errSSLPeerCertRevoked = -9827; + external Dart_EntropySource entropy_source; -const int errSSLPeerCertExpired = -9828; + external Dart_GetVMServiceAssetsArchive get_service_assets; -const int errSSLPeerCertUnknown = -9829; + @ffi.Bool() + external bool start_kernel_isolate; -const int errSSLIllegalParam = -9830; + external ffi.Pointer code_observer; +} -const int errSSLPeerUnknownCA = -9831; +/// 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 errSSLPeerAccessDenied = -9832; +/// 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 errSSLPeerDecodeError = -9833; +/// 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 errSSLPeerDecryptError = -9834; +/// 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 errSSLPeerExportRestriction = -9835; +/// 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 errSSLPeerProtocolVersion = -9836; +/// 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 errSSLPeerInsufficientSecurity = -9837; +/// 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 errSSLPeerInternalError = -9838; +/// 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 errSSLPeerUserCancelled = -9839; +/// 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 errSSLPeerNoRenegotiation = -9840; +/// 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 errSSLPeerAuthCompleted = -9841; +/// A port is used to send or receive inter-isolate messages +typedef Dart_Port = ffi.Int64; -const int errSSLClientCertRequested = -9842; +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 errSSLHostNameMismatch = -9843; +/// ========== +/// 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 errSSLConnectionRefused = -9844; +final class _Dart_NativeArguments extends ffi.Opaque {} -const int errSSLDecryptionFail = -9845; +/// 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 errSSLBadRecordMac = -9846; +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 errSSLRecordOverflow = -9847; +final class _Dart_NativeArgument_Descriptor extends ffi.Struct { + @ffi.Uint8() + external int type; -const int errSSLBadConfiguration = -9848; + @ffi.Uint8() + external int index; +} -const int errSSLUnexpectedRecord = -9849; +final class _Dart_NativeArgument_Value extends ffi.Opaque {} -const int errSSLWeakPeerEphemeralDHKey = -9850; +typedef Dart_NativeArgument_Descriptor = _Dart_NativeArgument_Descriptor; +typedef Dart_NativeArgument_Value = _Dart_NativeArgument_Value; -const int errSSLClientHelloReceived = -9851; +/// 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 errSSLTransportReset = -9852; +/// 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 errSSLNetworkTimeout = -9853; +/// A native function. +typedef Dart_NativeFunction = ffi.Pointer< + ffi.NativeFunction>; -const int errSSLConfigurationFailed = -9854; +/// 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 nf)>>; -const int errSSLUnsupportedExtension = -9855; +/// 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 errSSLUnexpectedMessage = -9856; +/// ===================== +/// 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 errSSLDecompressFail = -9857; +/// 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 errSSLHandshakeFail = -9858; +/// 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 errSSLDecodeError = -9859; +/// 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 errSSLInappropriateFallback = -9860; +final class Dart_KernelCompilationResult extends ffi.Struct { + @ffi.Int32() + external int status; -const int errSSLMissingExtension = -9861; + @ffi.Bool() + external bool null_safety; -const int errSSLBadCertificateStatusResponse = -9862; + external ffi.Pointer error; -const int errSSLCertificateRequired = -9863; + external ffi.Pointer kernel; -const int errSSLUnknownPSKIdentity = -9864; + @ffi.IntPtr() + external int kernel_size; +} -const int errSSLUnrecognizedName = -9865; +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 errSSLATSViolation = -9880; +final class Dart_SourceFile extends ffi.Struct { + external ffi.Pointer uri; -const int errSSLATSMinimumVersionViolation = -9881; + external ffi.Pointer source; +} -const int errSSLATSCiphersuiteViolation = -9882; +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 errSSLATSMinimumKeySizeViolation = -9883; +/// 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 errSSLATSLeafCertificateHashAlgorithmViolation = -9884; +final class _Dart_CObject extends ffi.Struct { + @ffi.Int32() + external int type; -const int errSSLATSCertificateHashAlgorithmViolation = -9885; + external UnnamedUnion6 value; +} -const int errSSLATSCertificateTrustViolation = -9886; +final class UnnamedUnion6 extends ffi.Union { + @ffi.Bool() + external bool as_bool; -const int errSSLEarlyDataRejected = -9890; + @ffi.Int32() + external int as_int32; -const int OSUnknownByteOrder = 0; + @ffi.Int64() + external int as_int64; -const int OSLittleEndian = 1; + @ffi.Double() + external double as_double; -const int OSBigEndian = 2; + external ffi.Pointer as_string; -const int kCFNotificationDeliverImmediately = 1; + external UnnamedStruct5 as_send_port; -const int kCFNotificationPostToAllSessions = 2; + external UnnamedStruct6 as_capability; -const int kCFCalendarComponentsWrap = 1; + external UnnamedStruct7 as_array; -const int kCFSocketAutomaticallyReenableReadCallBack = 1; + external UnnamedStruct8 as_typed_data; -const int kCFSocketAutomaticallyReenableAcceptCallBack = 2; + external UnnamedStruct9 as_external_typed_data; -const int kCFSocketAutomaticallyReenableDataCallBack = 3; + external UnnamedStruct10 as_native_pointer; +} -const int kCFSocketAutomaticallyReenableWriteCallBack = 8; +final class UnnamedStruct5 extends ffi.Struct { + @Dart_Port() + external int id; -const int kCFSocketLeaveErrors = 64; + @Dart_Port() + external int origin_id; +} -const int kCFSocketCloseOnInvalidate = 128; +final class UnnamedStruct6 extends ffi.Struct { + @ffi.Int64() + external int id; +} -const int DISPATCH_WALLTIME_NOW = -2; +final class UnnamedStruct7 extends ffi.Struct { + @ffi.IntPtr() + external int length; -const int kCFPropertyListReadCorruptError = 3840; + external ffi.Pointer> values; +} -const int kCFPropertyListReadUnknownVersionError = 3841; +final class UnnamedStruct8 extends ffi.Struct { + @ffi.Int32() + external int type; -const int kCFPropertyListReadStreamError = 3842; + /// in elements, not bytes + @ffi.IntPtr() + external int length; -const int kCFPropertyListWriteStreamError = 3851; + external ffi.Pointer values; +} -const int kCFBundleExecutableArchitectureI386 = 7; +final class UnnamedStruct9 extends ffi.Struct { + @ffi.Int32() + external int type; -const int kCFBundleExecutableArchitecturePPC = 18; + /// in elements, not bytes + @ffi.IntPtr() + external int length; -const int kCFBundleExecutableArchitectureX86_64 = 16777223; + external ffi.Pointer data; -const int kCFBundleExecutableArchitecturePPC64 = 16777234; + external ffi.Pointer peer; -const int kCFBundleExecutableArchitectureARM64 = 16777228; + external Dart_HandleFinalizer callback; +} -const int kCFMessagePortSuccess = 0; +final class UnnamedStruct10 extends ffi.Struct { + @ffi.IntPtr() + external int ptr; -const int kCFMessagePortSendTimeout = -1; + @ffi.IntPtr() + external int size; -const int kCFMessagePortReceiveTimeout = -2; + external Dart_HandleFinalizer callback; +} -const int kCFMessagePortIsInvalid = -3; +typedef Dart_CObject = _Dart_CObject; -const int kCFMessagePortTransportError = -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 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 kCFMessagePortBecameInvalidError = -5; +/// ============================================================================ +/// 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 kCFStringTokenizerUnitWord = 0; +/// 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; +} -const int kCFStringTokenizerUnitSentence = 1; +/// 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 kCFStringTokenizerUnitParagraph = 2; + /// 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 kCFStringTokenizerUnitLineBreak = 3; + /// 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 kCFStringTokenizerUnitWordBoundary = 4; + /// 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 kCFStringTokenizerAttributeLatinTranscription = 65536; + NSObject initWithPort_(int sendPort) { + final _ret = + _lib._objc_msgSend_496(_id, _lib._sel_initWithPort_1, sendPort); + return NSObject._(_ret, _lib, retain: true, release: true); + } -const int kCFStringTokenizerAttributeLanguage = 131072; + int get sendPort { + return _lib._objc_msgSend_358(_id, _lib._sel_sendPort1); + } -const int kCFFileDescriptorReadCallBack = 1; + 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 kCFFileDescriptorWriteCallBack = 2; + 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 kCFUserNotificationStopAlertLevel = 0; +/// 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 kCFUserNotificationNoteAlertLevel = 1; + /// 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 kCFUserNotificationCautionAlertLevel = 2; + /// 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 kCFUserNotificationPlainAlertLevel = 3; + /// 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 kCFUserNotificationDefaultResponse = 0; + /// 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); + } -const int kCFUserNotificationAlternateResponse = 1; + 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 kCFUserNotificationOtherResponse = 2; + 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 kCFUserNotificationCancelResponse = 3; +/// 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 kCFUserNotificationNoDefaultButtonFlag = 32; + /// 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 kCFUserNotificationUseRadioButtonsFlag = 64; + /// 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 kCFXMLNodeCurrentVersion = 1; + /// 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_INVALID_HANDLE = 0; + 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); + return NSObject._(_ret, _lib, retain: true, release: true); + } -const int CSSM_FALSE = 0; + /// 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_TRUE = 1; + 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); + } -const int CSSM_OK = 0; + 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); + } -const int CSSM_MODULE_STRING_SIZE = 64; + /// 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); + } -const int CSSM_KEY_HIERARCHY_NONE = 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); + } -const int CSSM_KEY_HIERARCHY_INTEG = 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); + } +} -const int CSSM_KEY_HIERARCHY_EXPORT = 2; +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_PVC_NONE = 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_PVC_APP = 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_PVC_SP = 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_PRIVILEGE_SCOPE_NONE = 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 CSSM_PRIVILEGE_SCOPE_PROCESS = 1; + /// 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_PRIVILEGE_SCOPE_THREAD = 2; + /// 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_SERVICE_CSSM = 1; + /// 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_SERVICE_CSP = 2; + NSObject initWithSession_task_response_request_( + NSURLSession? session, + NSURLSessionTask? task, + NSHTTPURLResponse? response, + NSURLRequest? request) { + final _ret = _lib._objc_msgSend_501( + _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_SERVICE_DL = 4; + /// 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_341( + _id, _lib._sel_finishWithRequest_1, request?._id ?? ffi.nullptr); + } -const int CSSM_SERVICE_CL = 8; + 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); + } -const int CSSM_SERVICE_TP = 16; + 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); + } -const int CSSM_SERVICE_AC = 32; + /// 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); + } -const int CSSM_SERVICE_KR = 64; + 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_NOTIFY_INSERT = 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_NOTIFY_REMOVE = 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_NOTIFY_FAULT = 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_ATTACH_READ_ONLY = 1; + /// 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_USEE_LAST = 255; + /// 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_USEE_NONE = 0; + NSObject initWithSession_task_response_( + NSURLSession? session, NSURLSessionTask? task, NSURLResponse? response) { + final _ret = _lib._objc_msgSend_503( + _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_USEE_DOMESTIC = 1; + void finishWithDisposition_(int disposition) { + return _lib._objc_msgSend_504( + _id, _lib._sel_finishWithDisposition_1, disposition); + } -const int CSSM_USEE_FINANCIAL = 2; + 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); + } -const int CSSM_USEE_KRLE = 3; + /// This property is meant to be used only by CUPHTTPClientDelegate. + int get disposition { + return _lib._objc_msgSend_505(_id, _lib._sel_disposition1); + } -const int CSSM_USEE_KRENT = 4; + 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_USEE_SSL = 5; + 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_USEE_AUTHENTICATION = 6; +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_USEE_KEYEXCH = 7; + /// 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_USEE_MEDICAL = 8; + /// 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_USEE_INSURANCE = 9; + /// 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_USEE_WEAK = 10; + 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); + return NSObject._(_ret, _lib, retain: true, release: true); + } -const int CSSM_ADDR_NONE = 0; + 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_ADDR_CUSTOM = 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 CSSM_ADDR_URL = 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 CSSM_ADDR_SOCKADDR = 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 CSSM_ADDR_NAME = 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 CSSM_NET_PROTO_NONE = 0; + /// 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_NET_PROTO_CUSTOM = 1; + /// 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_NET_PROTO_UNSPECIFIED = 2; + NSObject initWithSession_task_error_( + NSURLSession? session, NSURLSessionTask? task, NSError? error) { + final _ret = _lib._objc_msgSend_507( + _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_NET_PROTO_LDAP = 3; + 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); + } -const int CSSM_NET_PROTO_LDAPS = 4; + 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_NET_PROTO_LDAPNS = 5; + 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_NET_PROTO_X500DAP = 6; +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_NET_PROTO_FTP = 7; + /// 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_NET_PROTO_FTPS = 8; + /// 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_NET_PROTO_OCSP = 9; + /// 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_NET_PROTO_CMP = 10; + NSObject initWithSession_downloadTask_url_(NSURLSession? session, + NSURLSessionDownloadTask? downloadTask, NSURL? location) { + final _ret = _lib._objc_msgSend_508( + _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_NET_PROTO_CMPS = 11; + 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__UNK_ = -1; + 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__NLU_ = 0; + 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__STAR_ = 1; +class CUPHTTPForwardedWebSocketOpened extends CUPHTTPForwardedDelegate { + CUPHTTPForwardedWebSocketOpened._( + ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -const int CSSM_WORDID_A = 2; + /// 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); + } -const int CSSM_WORDID_ACL = 3; + /// 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); + } -const int CSSM_WORDID_ALPHA = 4; + /// 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); + } -const int CSSM_WORDID_B = 5; + NSObject initWithSession_webSocketTask_didOpenWithProtocol_( + NSURLSession? session, + NSURLSessionWebSocketTask? webSocketTask, + NSString? protocol) { + final _ret = _lib._objc_msgSend_509( + _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); + } -const int CSSM_WORDID_BER = 6; + 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); + } -const int CSSM_WORDID_BINARY = 7; + 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); + } -const int CSSM_WORDID_BIOMETRIC = 8; + 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); + } +} -const int CSSM_WORDID_C = 9; +class CUPHTTPForwardedWebSocketClosed extends CUPHTTPForwardedDelegate { + CUPHTTPForwardedWebSocketClosed._( + ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -const int CSSM_WORDID_CANCELED = 10; + /// 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); + } -const int CSSM_WORDID_CERT = 11; + /// 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); + } -const int CSSM_WORDID_COMMENT = 12; + /// 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); + } -const int CSSM_WORDID_CRL = 13; + NSObject initWithSession_webSocketTask_code_reason_(NSURLSession? session, + NSURLSessionWebSocketTask? webSocketTask, int closeCode, NSData? reason) { + final _ret = _lib._objc_msgSend_510( + _id, + _lib._sel_initWithSession_webSocketTask_code_reason_1, + session?._id ?? ffi.nullptr, + webSocketTask?._id ?? ffi.nullptr, + closeCode, + reason?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } -const int CSSM_WORDID_CUSTOM = 14; + int get closeCode { + return _lib._objc_msgSend_443(_id, _lib._sel_closeCode1); + } -const int CSSM_WORDID_D = 15; + 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); + } -const int CSSM_WORDID_DATE = 16; + 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); + } -const int CSSM_WORDID_DB_DELETE = 17; + 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 CSSM_WORDID_DB_EXEC_STORED_QUERY = 18; +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; +} -const int CSSM_WORDID_DB_INSERT = 19; +typedef NSStreamSocketSecurityLevel = ffi.Pointer; +typedef NSStreamSOCKSProxyConfiguration = ffi.Pointer; +typedef NSStreamSOCKSProxyVersion = ffi.Pointer; +typedef NSErrorDomain1 = ffi.Pointer; +typedef NSStreamNetworkServiceTypeValue = ffi.Pointer; -const int CSSM_WORDID_DB_MODIFY = 20; +/// A helper to convert a Dart Stream> into an Objective-C input stream. +class CUPHTTPStreamToNSInputStreamAdapter extends NSInputStream { + CUPHTTPStreamToNSInputStreamAdapter._( + 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 [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); + } -const int CSSM_WORDID_DBS_CREATE = 22; + /// 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); + } -const int CSSM_WORDID_DBS_DELETE = 23; + /// 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); + } -const int CSSM_WORDID_DECRYPT = 24; + CUPHTTPStreamToNSInputStreamAdapter initWithPort_(int sendPort) { + final _ret = + _lib._objc_msgSend_496(_id, _lib._sel_initWithPort_1, sendPort); + return CUPHTTPStreamToNSInputStreamAdapter._(_ret, _lib, + retain: true, release: true); + } -const int CSSM_WORDID_DELETE = 25; + int addData_(NSData? data) { + return _lib._objc_msgSend_511( + _id, _lib._sel_addData_1, data?._id ?? ffi.nullptr); + } -const int CSSM_WORDID_DELTA_CRL = 26; + void setDone() { + return _lib._objc_msgSend_1(_id, _lib._sel_setDone1); + } -const int CSSM_WORDID_DER = 27; + void setError_(NSError? error) { + return _lib._objc_msgSend_512( + _id, _lib._sel_setError_1, error?._id ?? ffi.nullptr); + } -const int CSSM_WORDID_DERIVE = 28; + 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); + } -const int CSSM_WORDID_DISPLAY = 29; + 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); + } -const int CSSM_WORDID_DO = 30; + 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); + } -const int CSSM_WORDID_DSA = 31; + 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_CUPHTTPStreamToNSInputStreamAdapter1, + _lib._sel_getStreamsToHostWithName_port_inputStream_outputStream_1, + hostname?._id ?? ffi.nullptr, + port, + inputStream, + outputStream); + } -const int CSSM_WORDID_DSA_SHA1 = 32; + 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_CUPHTTPStreamToNSInputStreamAdapter1, + _lib._sel_getStreamsToHost_port_inputStream_outputStream_1, + host?._id ?? ffi.nullptr, + port, + inputStream, + outputStream); + } -const int CSSM_WORDID_E = 33; + static void getBoundStreamsWithBufferSize_inputStream_outputStream_( + NativeCupertinoHttp _lib, + int bufferSize, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + return _lib._objc_msgSend_336( + _lib._class_CUPHTTPStreamToNSInputStreamAdapter1, + _lib._sel_getBoundStreamsWithBufferSize_inputStream_outputStream_1, + bufferSize, + inputStream, + outputStream); + } -const int CSSM_WORDID_ELGAMAL = 34; + 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); + } -const int CSSM_WORDID_ENCRYPT = 35; + 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 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 +91787,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 +91933,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 +92073,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 +92149,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 +92207,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 +92231,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 +92631,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 +92731,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 +92769,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 +92807,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 +92981,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 +93489,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 +93513,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 +93641,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 +93719,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 +93741,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 +93927,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 +93955,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 +94003,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 +94035,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 +94157,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 +94203,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 +94251,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/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/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/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 cd107fe350..0a97bdd25d 100644 --- a/pkgs/cupertino_http/pubspec.yaml +++ b/pkgs/cupertino_http/pubspec.yaml @@ -1,24 +1,24 @@ name: cupertino_http -description: > +version: 1.2.0 +description: >- A macOS/iOS Flutter plugin that provides access to the Foundation URL Loading System. -version: 0.1.2-dev 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 + async: ^2.5.0 + ffi: ^2.1.0 flutter: sdk: flutter - http: ^0.13.4 - meta: ^1.7.0 + http: '>=0.13.4 <2.0.0' dev_dependencies: - dart_flutter_team_lints: ^1.0.0 - ffigen: ^7.2.0 + dart_flutter_team_lints: ^2.0.0 + ffigen: ^9.0.1 flutter: plugin: 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 a1eff15f9a..b89b93c076 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; @@ -52,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]; } @@ -161,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."); @@ -219,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/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."); + }]; +} diff --git a/pkgs/cupertino_http/src/CUPHTTPForwardedDelegate.h b/pkgs/cupertino_http/src/CUPHTTPForwardedDelegate.h index 7e6ce336a2..3cf0e827da 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 + code:(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 + 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/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 0000000000..db77bb4b7b Binary files /dev/null and b/pkgs/flutter_http_example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ 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 0000000000..17987b79bb Binary files /dev/null and b/pkgs/flutter_http_example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/pkgs/flutter_http_example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/pkgs/flutter_http_example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000000..09d4391482 Binary files /dev/null and b/pkgs/flutter_http_example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ 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 0000000000..d5f1c8d34e Binary files /dev/null and b/pkgs/flutter_http_example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ 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 0000000000..4d6372eebd Binary files /dev/null and b/pkgs/flutter_http_example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ 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 0000000000..dc9ada4725 Binary files /dev/null and b/pkgs/flutter_http_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ diff --git a/pkgs/flutter_http_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/pkgs/flutter_http_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png new file mode 100644 index 0000000000..7353c41ecf Binary files /dev/null and b/pkgs/flutter_http_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ 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 0000000000..797d452e45 Binary files /dev/null and b/pkgs/flutter_http_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ 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 0000000000..6ed2d933e1 Binary files /dev/null and b/pkgs/flutter_http_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ 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 0000000000..4cd7b0099c Binary files /dev/null and b/pkgs/flutter_http_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ 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 0000000000..fe730945a0 Binary files /dev/null and b/pkgs/flutter_http_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/pkgs/flutter_http_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/pkgs/flutter_http_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png new file mode 100644 index 0000000000..321773cd85 Binary files /dev/null and b/pkgs/flutter_http_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/pkgs/flutter_http_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/pkgs/flutter_http_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png new file mode 100644 index 0000000000..797d452e45 Binary files /dev/null and b/pkgs/flutter_http_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ 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 0000000000..502f463a9b Binary files /dev/null and b/pkgs/flutter_http_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/pkgs/flutter_http_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/pkgs/flutter_http_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png new file mode 100644 index 0000000000..0ec3034392 Binary files /dev/null and b/pkgs/flutter_http_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ 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 0000000000..0ec3034392 Binary files /dev/null and b/pkgs/flutter_http_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ 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 0000000000..e9f5fea27c Binary files /dev/null and b/pkgs/flutter_http_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/pkgs/flutter_http_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/pkgs/flutter_http_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png new file mode 100644 index 0000000000..84ac32ae7d Binary files /dev/null and b/pkgs/flutter_http_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/pkgs/flutter_http_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/pkgs/flutter_http_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png new file mode 100644 index 0000000000..8953cba090 Binary files /dev/null and b/pkgs/flutter_http_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ 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 0000000000..0467bf12aa Binary files /dev/null and b/pkgs/flutter_http_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ 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 0000000000..9da19eacad Binary files /dev/null and b/pkgs/flutter_http_example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ 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 0000000000..9da19eacad Binary files /dev/null and b/pkgs/flutter_http_example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ 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 0000000000..9da19eacad Binary files /dev/null and b/pkgs/flutter_http_example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ 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..406b9e6b71 --- /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.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); +} + +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 0000000000..82b6f9d9a3 Binary files /dev/null and b/pkgs/flutter_http_example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png differ 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 0000000000..13b35eba55 Binary files /dev/null and b/pkgs/flutter_http_example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png differ 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 0000000000..0a3f5fa40f Binary files /dev/null and b/pkgs/flutter_http_example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png differ diff --git a/pkgs/flutter_http_example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png b/pkgs/flutter_http_example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png new file mode 100644 index 0000000000..bdb57226d5 Binary files /dev/null and b/pkgs/flutter_http_example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png differ diff --git a/pkgs/flutter_http_example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png b/pkgs/flutter_http_example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png new file mode 100644 index 0000000000..f083318e09 Binary files /dev/null and b/pkgs/flutter_http_example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png differ diff --git a/pkgs/flutter_http_example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png b/pkgs/flutter_http_example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png new file mode 100644 index 0000000000..326c0e72c9 Binary files /dev/null and b/pkgs/flutter_http_example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png differ 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 0000000000..2f1632cfdd Binary files /dev/null and b/pkgs/flutter_http_example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png differ diff --git a/pkgs/flutter_http_example/macos/Runner/Base.lproj/MainMenu.xib b/pkgs/flutter_http_example/macos/Runner/Base.lproj/MainMenu.xib new file mode 100644 index 0000000000..80e867a4e0 --- /dev/null +++ b/pkgs/flutter_http_example/macos/Runner/Base.lproj/MainMenu.xib @@ -0,0 +1,343 @@ + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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..0331490003 --- /dev/null +++ b/pkgs/flutter_http_example/pubspec.yaml @@ -0,0 +1,31 @@ +name: flutter_http_example +version: 1.0.0 +description: Demonstrates how to use package:http in a Flutter app. + +publish_to: 'none' + +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: ^1.0.0 + provider: ^6.0.5 + +dev_dependencies: + dart_flutter_team_lints: ^2.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 0000000000..8aaa46ac1a Binary files /dev/null and b/pkgs/flutter_http_example/web/favicon.png differ 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 0000000000..b749bfef07 Binary files /dev/null and b/pkgs/flutter_http_example/web/icons/Icon-192.png differ 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 0000000000..88cfd48dff Binary files /dev/null and b/pkgs/flutter_http_example/web/icons/Icon-512.png differ 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 0000000000..eb9b4d76e5 Binary files /dev/null and b/pkgs/flutter_http_example/web/icons/Icon-maskable-192.png differ 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 0000000000..d69c56691f Binary files /dev/null and b/pkgs/flutter_http_example/web/icons/Icon-maskable-512.png differ 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 0000000000..c04e20caf6 Binary files /dev/null and b/pkgs/flutter_http_example/windows/runner/resources/app_icon.ico differ 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/pkgs/http/CHANGELOG.md b/pkgs/http/CHANGELOG.md index 14adfa76ad..7b8dec4fdd 100644 --- a/pkgs/http/CHANGELOG.md +++ b/pkgs/http/CHANGELOG.md @@ -1,4 +1,33 @@ -## 0.13.6-dev +## 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'`. + +## 1.1.1 + +* `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 + +* 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. + +## 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`. * If `no_default_http_client=true` is set in the environment then disk usage diff --git a/pkgs/http/README.md b/pkgs/http/README.md index c889f2b54a..642c238035 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,181 @@ 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 | 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 | ✅︎ | ✅︎ | ✅︎ | + +> [!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` 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 +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 +> 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 +[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 diff --git a/pkgs/http/lib/http.dart b/pkgs/http/lib/http.dart index 62004240c7..19845be08d 100644 --- a/pkgs/http/lib/http.dart +++ b/pkgs/http/lib/http.dart @@ -20,6 +20,7 @@ export 'src/base_response.dart'; export 'src/byte_stream.dart'; export 'src/client.dart' hide zoneClient; export 'src/exception.dart'; +export 'src/headers.dart'; export 'src/multipart_file.dart'; export 'src/multipart_request.dart'; export 'src/request.dart'; @@ -34,7 +35,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(Uri 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. @@ -44,7 +45,7 @@ Future head(Uri 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(Uri 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. @@ -66,7 +67,9 @@ Future get(Uri url, {Map? headers}) => /// For more fine-grained control over the request, use [Request] or /// [StreamedRequest] instead. Future post(Uri url, - {Map? headers, Object? body, Encoding? encoding}) => + {Map>? headers, + Object? body, + Encoding? encoding}) => _withClient((client) => client.post(url, headers: headers, body: body, encoding: encoding)); @@ -89,7 +92,9 @@ Future post(Uri url, /// For more fine-grained control over the request, use [Request] or /// [StreamedRequest] instead. Future put(Uri url, - {Map? headers, Object? body, Encoding? encoding}) => + {Map>? headers, + Object? body, + Encoding? encoding}) => _withClient((client) => client.put(url, headers: headers, body: body, encoding: encoding)); @@ -113,7 +118,9 @@ Future put(Uri url, /// For more fine-grained control over the request, use [Request] or /// [StreamedRequest] instead. Future patch(Uri url, - {Map? headers, Object? body, Encoding? encoding}) => + {Map>? headers, + Object? body, + Encoding? encoding}) => _withClient((client) => client.patch(url, headers: headers, body: body, encoding: encoding)); @@ -125,7 +132,9 @@ Future patch(Uri url, /// /// For more fine-grained control over the request, use [Request] instead. Future delete(Uri url, - {Map? headers, Object? body, Encoding? encoding}) => + {Map>? headers, + Object? body, + Encoding? encoding}) => _withClient((client) => client.delete(url, headers: headers, body: body, encoding: encoding)); @@ -141,7 +150,7 @@ Future delete(Uri url, /// /// For more fine-grained control over the request and response, use [Request] /// instead. -Future read(Uri 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 and @@ -157,7 +166,8 @@ Future read(Uri url, {Map? headers}) => /// /// For more fine-grained control over the request and response, use [Request] /// instead. -Future readBytes(Uri 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/pkgs/http/lib/retry.dart b/pkgs/http/lib/retry.dart index a1ae73acbb..a808e27d91 100644 --- a/pkgs/http/lib/retry.dart +++ b/pkgs/http/lib/retry.dart @@ -10,7 +10,11 @@ import 'package:async/async.dart'; import 'http.dart'; /// An HTTP client wrapper that automatically retries failing requests. -class RetryClient extends BaseClient { +/// +/// 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]. +final class RetryClient extends BaseClient { /// The wrapped client. final Client _inner; @@ -132,10 +136,16 @@ class RetryClient extends BaseClient { final request = StreamedRequest(original.method, original.url) ..contentLength = original.contentLength ..followRedirects = original.followRedirects - ..headers.addAll(original.headers) ..maxRedirects = original.maxRedirects ..persistentConnection = original.persistentConnection; + for (final (name, value) in original.headers.entries()) { + request.headers.append(name, value); + } + for (final cookie in original.headers.getSetCookie()) { + request.headers.append('set-cookie', cookie); + } + body.listen(request.sink.add, onError: request.sink.addError, onDone: request.sink.close, diff --git a/pkgs/http/lib/src/base_client.dart b/pkgs/http/lib/src/base_client.dart index 9020495b88..b3cd6623fe 100644 --- a/pkgs/http/lib/src/base_client.dart +++ b/pkgs/http/lib/src/base_client.dart @@ -9,6 +9,7 @@ import 'base_request.dart'; import 'byte_stream.dart'; import 'client.dart'; import 'exception.dart'; +import 'headers.dart'; import 'request.dart'; import 'response.dart'; import 'streamed_response.dart'; @@ -17,44 +18,53 @@ 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}) => + Future head(Uri url, {Map>? headers}) => _sendUnstreamed('HEAD', url, headers); @override - Future get(Uri url, {Map? headers}) => + Future get(Uri url, {Map>? headers}) => _sendUnstreamed('GET', url, headers); @override Future post(Uri url, - {Map? headers, Object? body, Encoding? encoding}) => + {Map>? headers, + Object? body, + Encoding? encoding}) => _sendUnstreamed('POST', url, headers, body, encoding); @override Future put(Uri url, - {Map? headers, Object? body, Encoding? encoding}) => + {Map>? headers, + Object? body, + Encoding? encoding}) => _sendUnstreamed('PUT', url, headers, body, encoding); @override Future patch(Uri url, - {Map? headers, Object? body, Encoding? encoding}) => + {Map>? headers, + Object? body, + Encoding? encoding}) => _sendUnstreamed('PATCH', url, headers, body, encoding); @override Future delete(Uri url, - {Map? headers, Object? body, Encoding? encoding}) => + {Map>? headers, + Object? body, + Encoding? encoding}) => _sendUnstreamed('DELETE', url, headers, body, encoding); @override - Future read(Uri 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(Uri url, {Map? headers}) async { + Future readBytes(Uri url, + {Map>? headers}) async { final response = await get(url, headers: headers); _checkResponseSuccess(url, response); return response.bodyBytes; @@ -72,11 +82,20 @@ abstract class BaseClient implements Client { /// Sends a non-streaming [Request] and returns a non-streaming [Response]. Future _sendUnstreamed( - String method, Uri url, Map? headers, + String method, Uri url, Map>? headers, [Object? body, Encoding? encoding]) async { var request = Request(method, url); - if (headers != null) request.headers.addAll(headers); + if (headers != null) { + final newHeaders = Headers(headers); + for (final (name, value) in newHeaders.entries()) { + request.headers.append(name, value); + } + for (final cookie in newHeaders.getSetCookie()) { + request.headers.append('Set-Cookie', cookie); + } + } + if (encoding != null) request.encoding = encoding; if (body != null) { if (body is String) { diff --git a/pkgs/http/lib/src/base_request.dart b/pkgs/http/lib/src/base_request.dart index fd18bad332..25aae9d86e 100644 --- a/pkgs/http/lib/src/base_request.dart +++ b/pkgs/http/lib/src/base_request.dart @@ -2,15 +2,14 @@ // for 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: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'; import 'client.dart'; +import 'headers.dart'; import 'streamed_response.dart'; import 'utils.dart'; @@ -70,7 +69,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; @@ -82,7 +81,7 @@ abstract class BaseRequest { // TODO(nweiz): automatically parse cookies from headers // TODO(nweiz): make this a HttpHeaders object - final Map headers; + final Headers headers = Headers(); /// Whether [finalize] has been called. bool get finalized => _finalized; @@ -96,11 +95,7 @@ abstract class BaseRequest { return method; } - BaseRequest(String method, this.url) - : method = _validateMethod(method), - headers = LinkedHashMap( - equals: (key1, key2) => key1.toLowerCase() == key2.toLowerCase(), - hashCode: (key) => key.toLowerCase().hashCode); + BaseRequest(String method, this.url) : method = _validateMethod(method); /// Finalizes the HTTP request in preparation for it being sent. /// diff --git a/pkgs/http/lib/src/base_response.dart b/pkgs/http/lib/src/base_response.dart index a09dcea4ed..d853f6600f 100644 --- a/pkgs/http/lib/src/base_response.dart +++ b/pkgs/http/lib/src/base_response.dart @@ -4,6 +4,7 @@ import 'base_client.dart'; import 'base_request.dart'; +import 'headers.dart'; /// The base class for HTTP responses. /// @@ -26,8 +27,28 @@ 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; + final Headers headers; final bool isRedirect; @@ -37,10 +58,11 @@ abstract class BaseResponse { BaseResponse(this.statusCode, {this.contentLength, this.request, - this.headers = const {}, + Headers? headers, this.isRedirect = false, this.persistentConnection = true, - this.reasonPhrase}) { + this.reasonPhrase}) + : headers = headers ?? Headers() { if (statusCode < 100) { throw ArgumentError('Invalid status code $statusCode.'); } else if (contentLength != null && contentLength! < 0) { diff --git a/pkgs/http/lib/src/browser_client.dart b/pkgs/http/lib/src/browser_client.dart index ddaa43feae..14b2872f5f 100644 --- a/pkgs/http/lib/src/browser_client.dart +++ b/pkgs/http/lib/src/browser_client.dart @@ -3,15 +3,20 @@ // BSD-style license that can be found in the LICENSE file. import 'dart:async'; -import 'dart:html'; -import 'dart:typed_data'; +import 'dart:convert'; +import 'dart:js_interop'; + +import 'package:web/helpers.dart' hide Headers; import 'base_client.dart'; import 'base_request.dart'; import 'byte_stream.dart'; import 'exception.dart'; +import 'headers.dart'; import 'streamed_response.dart'; +final _digitRegex = RegExp(r'^\d+$'); + /// Create a [BrowserClient]. /// /// Used from conditional imports, matches the definition in `client_stub.dart`. @@ -23,8 +28,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], @@ -35,7 +40,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. @@ -53,20 +58,39 @@ 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); + + // Sets all headers without set-cookie headers. + for (final (name, value) in request.headers.entries()) { + xhr.setRequestHeader(name, value); + } + + // Sets cookie headers. + for (final cookie in request.headers.getSetCookie()) { + xhr.setRequestHeader('set-cookie', cookie); + } var completer = Completer(); unawaited(xhr.onLoad.first.then((_) { - var body = (xhr.response as ByteBuffer).asUint8List(); + if (xhr.responseHeaders.get('content-length') + case final contentLengthHeader + when contentLengthHeader != null && + !_digitRegex.hasMatch(contentLengthHeader)) { + completer.completeError(ClientException( + 'Invalid content-length header [$contentLengthHeader].', + request.url, + )); + return; + } + var body = (xhr.response as JSArrayBuffer).toDart.asUint8List(); completer.complete(StreamedResponse( - ByteStream.fromBytes(body), xhr.status!, + ByteStream.fromBytes(body), xhr.status, contentLength: body.length, request: request, headers: xhr.responseHeaders, @@ -81,7 +105,7 @@ class BrowserClient extends BaseClient { StackTrace.current); })); - xhr.send(bytes); + xhr.send(bytes.toJS); try { return await completer.future; @@ -102,3 +126,29 @@ class BrowserClient extends BaseClient { _xhrs.clear(); } } + +extension on XMLHttpRequest { + Headers get responseHeaders { + final headers = Headers(); + final lines = const LineSplitter().convert(getAllResponseHeaders()); + + // from Closure's goog.net.Xhrio.getResponseHeaders. + for (var header in lines) { + 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); + + headers.append(key, value); + } + // return headers; + return 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..db9456601e 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'; @@ -25,26 +25,31 @@ 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 /// 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 - /// `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. /// /// For more fine-grained control over the request, use [send] instead. - Future head(Uri url, {Map? headers}); + Future head(Uri url, {Map>? headers}); /// 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(Uri url, {Map? headers}); + Future get(Uri url, {Map>? headers}); /// Sends an HTTP POST request with the given headers and body to the given /// URL. @@ -67,7 +72,9 @@ abstract class Client { /// /// For more fine-grained control over the request, use [send] instead. Future post(Uri url, - {Map? headers, Object? body, Encoding? encoding}); + {Map>? headers, + Object? body, + Encoding? encoding}); /// Sends an HTTP PUT request with the given headers and body to the given /// URL. @@ -88,7 +95,9 @@ abstract class Client { /// /// For more fine-grained control over the request, use [send] instead. Future put(Uri url, - {Map? headers, Object? body, Encoding? encoding}); + {Map>? headers, + Object? body, + Encoding? encoding}); /// Sends an HTTP PATCH request with the given headers and body to the given /// URL. @@ -109,13 +118,17 @@ abstract class Client { /// /// For more fine-grained control over the request, use [send] instead. Future patch(Uri url, - {Map? headers, Object? body, Encoding? encoding}); + {Map>? headers, + Object? body, + Encoding? encoding}); /// 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(Uri url, - {Map? headers, Object? body, Encoding? encoding}); + {Map>? headers, + Object? body, + Encoding? encoding}); /// 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. @@ -125,7 +138,7 @@ abstract class Client { /// /// For more fine-grained control over the request and response, use [send] or /// [get] instead. - Future read(Uri url, {Map? headers}); + Future read(Uri url, {Map>? headers}); /// 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 @@ -136,7 +149,8 @@ abstract class Client { /// /// For more fine-grained control over the request and response, use [send] or /// [get] instead. - Future readBytes(Uri 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/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/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/headers.dart b/pkgs/http/lib/src/headers.dart new file mode 100644 index 0000000000..58594b89a7 --- /dev/null +++ b/pkgs/http/lib/src/headers.dart @@ -0,0 +1,175 @@ +import 'dart:convert'; + +/// This Fetch API interface allows you to perform various actions on HTTP +/// request and response headers. These actions include retrieving, setting, +/// adding to, and removing. A Headers object has an associated header list, +/// which is initially empty and consists of zero or more name and value pairs. +///  You can add to this using methods like append() (see Examples.) In all +/// methods of this interface, header names are matched by case-insensitive +/// byte sequence. +/// +/// [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers) +class Headers { + final List<(String, String)> _storage; + + /// Internal constructor, to create a new instance of `Headers`. + const Headers._(this._storage); + + /// The Headers() constructor creates a new Headers object. + /// + /// [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/Headers) + factory Headers([Object? init]) => Headers._((init,).toStorage()); + + /// Appends a new value onto an existing header inside a Headers object, or + /// adds the header if it does not already exist. + /// + /// [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/append) + void append(String name, String value) => _storage.add((name, value)); + + /// Deletes a header from a Headers object. + /// + /// [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/delete) + void delete(String name) => + _storage.removeWhere((element) => element.$1.equals(name)); + + /// Returns an iterator allowing to go through all key/value pairs contained + /// in this object. + /// + /// [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/entries) + Iterable<(String, String)> entries() sync* { + for (final (name, value) in _storage) { + // https://fetch.spec.whatwg.org/#ref-for-forbidden-response-header-name%E2%91%A0 + if (name.equals('set-cookie')) continue; + + yield (name, value); + } + } + + /// Executes a provided function once for each key/value pair in this Headers object. + /// + /// [MDN Reference](https://developer.mozilla.org/en-US/docs/Web/API/Headers/forEach) + void forEach(void Function(String value, String name, Headers parent) fn) => + entries().forEach((element) => fn(element.$2, element.$1, this)); + + /// Returns a String sequence of all the values of a header within a Headers + /// object with a given name. + /// + /// [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/get) + String? get(String name) => switch (_storage.valuesOf(name)) { + Iterable values when values.isNotEmpty => values.join(', '), + _ => null, + }; + + /// Returns an array containing the values of all Set-Cookie headers + /// associated with a response. + /// + /// [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/getSetCookie) + Iterable getSetCookie() => _storage.valuesOf('Set-Cookie'); + + /// Returns a boolean stating whether a Headers object contains a certain + /// header. + /// + /// [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/has) + bool has(String name) => _storage.any((element) => element.$1.equals(name)); + + /// Returns an iterator allowing you to go through all keys of the key/value + /// pairs contained in this object. + /// + /// [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/keys) + Iterable keys() => _storage.map((e) => e.$1).toSet(); + + /// Sets a new value for an existing header inside a Headers object, or adds + /// the header if it does not already exist. + /// + /// [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/set) + void set(String name, String value) => this + ..delete(name) + ..append(name, value); + + /// Returns an iterator allowing you to go through all values of the + /// key/value pairs contained in this object. + /// + /// [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/values) + Iterable values() => keys().map(get).whereType(); +} + +extension on String { + bool equals(String other) => other.toLowerCase() == toLowerCase(); +} + +extension on Iterable<(String, String)> { + Iterable valuesOf(String name) => + where((element) => element.$1.equals(name)).map((e) => e.$2); +} + +extension on (Object?,) { + List<(String, String)> toStorage() => switch (this.$1) { + Headers value => value.toStorage(), + String value => value.toStorage(), + Iterable value => value.toStorage(), + Iterable<(String, String)> value => value.toList(), + Iterable> value => value.toStorage(), + Map value => value.toStorage(), + Map> value => value.toStorage(), + _ => [], + }; +} + +extension on Map> { + List<(String, String)> toStorage() => entries + .map((e) => e.value.map((value) => (e.key, value))) + .expand((e) => e) + .toList(); +} + +extension on Map { + List<(String, String)> toStorage() => + entries.map((e) => (e.key, e.value)).toList(); +} + +extension on Iterable> { + List<(String, String)> toStorage() { + final storage = <(String, String)>[]; + for (final element in this) { + switch (element) { + case Iterable value when value.length == 2: + storage.add((value.first, value.last)); + break; + case Iterable value when value.length == 1: + final pair = value.first.toHeadersPair(); + if (pair != null) storage.add(pair); + break; + case Iterable value when value.length > 2: + for (final element in value.skip(1)) { + storage.add((value.first, element)); + } + break; + } + } + + return storage; + } +} + +extension on Iterable { + List<(String, String)> toStorage() => + map((e) => e.toHeadersPair()).whereType<(String, String)>().toList(); +} + +extension on Headers { + List<(String, String)> toStorage() => entries().toList(); +} + +extension on String { + /// Converts a string to a list of headers. + List<(String, String)> toStorage() => + const LineSplitter().convert(this).toStorage(); + + /// Parses to a header pair. + (String, String)? toHeadersPair() { + final index = indexOf(':'); + if (index == -1) return null; + + return (substring(0, index), substring(index + 1)); + } +} diff --git a/pkgs/http/lib/src/io_client.dart b/pkgs/http/lib/src/io_client.dart index 4ebb434f9c..2276a8ab48 100644 --- a/pkgs/http/lib/src/io_client.dart +++ b/pkgs/http/lib/src/io_client.dart @@ -6,7 +6,9 @@ import 'dart:io'; import 'base_client.dart'; import 'base_request.dart'; +import 'client.dart'; import 'exception.dart'; +import 'headers.dart'; import 'io_streamed_response.dart'; /// Create an [IOClient]. @@ -28,9 +30,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,13 +42,49 @@ 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; + /// 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. @@ -65,15 +103,27 @@ class IOClient extends BaseClient { ..maxRedirects = request.maxRedirects ..contentLength = (request.contentLength ?? -1) ..persistentConnection = request.persistentConnection; - request.headers.forEach((name, value) { - ioRequest.headers.set(name, value); + + // Sets headers with set-cookie headers. + request.headers.forEach((value, name, parent) { + ioRequest.headers.add(name, value); }); + // Sets cookie headers. + for (final cookie in request.headers.getSetCookie()) { + ioRequest.headers.add('set-cookie', cookie); + } + var response = await stream.pipe(ioRequest) as HttpClientResponse; - var headers = {}; - response.headers.forEach((key, values) { - headers[key] = values.join(','); + final headers = Headers(); + response.headers.forEach((name, values) { + // 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. + for (final value in values) { + headers.append(name, value.trimRight()); + } }); return IOStreamedResponse( diff --git a/pkgs/http/lib/src/mock_client.dart b/pkgs/http/lib/src/mock_client.dart index bf2df40ee7..22fbea3198 100644 --- a/pkgs/http/lib/src/mock_client.dart +++ b/pkgs/http/lib/src/mock_client.dart @@ -2,14 +2,22 @@ // for 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'; +import 'headers.dart'; import 'request.dart'; 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. @@ -35,10 +43,16 @@ class MockClient extends BaseClient { ..persistentConnection = baseRequest.persistentConnection ..followRedirects = baseRequest.followRedirects ..maxRedirects = baseRequest.maxRedirects - ..headers.addAll(baseRequest.headers) ..bodyBytes = bodyBytes ..finalize(); + for (final (name, value) in baseRequest.headers.entries()) { + request.headers.append(name, value); + } + for (final cookie in baseRequest.headers.getSetCookie()) { + request.headers.append('set-cookie', cookie); + } + final response = await fn(request); return StreamedResponse( ByteStream.fromBytes(response.bodyBytes), response.statusCode, @@ -69,6 +83,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 = 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/lib/src/multipart_request.dart b/pkgs/http/lib/src/multipart_request.dart index 79525421fb..6e3591237b 100644 --- a/pkgs/http/lib/src/multipart_request.dart +++ b/pkgs/http/lib/src/multipart_request.dart @@ -87,7 +87,7 @@ class MultipartRequest extends BaseRequest { ByteStream finalize() { // TODO: freeze fields and files final boundary = _boundaryString(); - headers['content-type'] = 'multipart/form-data; boundary=$boundary'; + headers.set('content-type', 'multipart/form-data; boundary=$boundary'); super.finalize(); return ByteStream(_finalize(boundary)); } diff --git a/pkgs/http/lib/src/request.dart b/pkgs/http/lib/src/request.dart index 1c7aa306ba..4015bf72d5 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) { @@ -151,17 +163,18 @@ class Request extends BaseRequest { /// The `Content-Type` header of the request (if it exists) as a [MediaType]. MediaType? get _contentType { - var contentType = headers['content-type']; + var contentType = headers.get('content-type'); if (contentType == null) return null; return MediaType.parse(contentType); } set _contentType(MediaType? value) { + // If the content type is null, remove the header. if (value == null) { - headers.remove('content-type'); - } else { - headers['content-type'] = value.toString(); + return headers.delete('content-type'); } + + headers.set('content-type', value.toString()); } /// Throw an error if this request has been finalized. diff --git a/pkgs/http/lib/src/response.dart b/pkgs/http/lib/src/response.dart index 1ba7c466cf..cac141de99 100644 --- a/pkgs/http/lib/src/response.dart +++ b/pkgs/http/lib/src/response.dart @@ -9,6 +9,7 @@ import 'package:http_parser/http_parser.dart'; import 'base_request.dart'; import 'base_response.dart'; +import 'headers.dart'; import 'streamed_response.dart'; import 'utils.dart'; @@ -30,7 +31,7 @@ class Response extends BaseResponse { /// Creates a new HTTP response with a string body. Response(String body, int statusCode, {BaseRequest? request, - Map headers = const {}, + Headers? headers, bool isRedirect = false, bool persistentConnection = true, String? reasonPhrase}) @@ -68,14 +69,14 @@ class Response extends BaseResponse { /// /// Defaults to [latin1] if the headers don't specify a charset or if that /// charset is unknown. -Encoding _encodingForHeaders(Map headers) => +Encoding _encodingForHeaders(Headers? headers) => encodingForCharset(_contentTypeForHeaders(headers).parameters['charset']); /// Returns the [MediaType] object for the given headers's content-type. /// /// Defaults to `application/octet-stream`. -MediaType _contentTypeForHeaders(Map headers) { - var contentType = headers['content-type']; +MediaType _contentTypeForHeaders(Headers? headers) { + var contentType = headers?.get('content-type'); if (contentType != null) return MediaType.parse(contentType); return MediaType('application', 'octet-stream'); } 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/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); } 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/pkgs/http/pubspec.yaml b/pkgs/http/pubspec.yaml index 2f3232a38d..1645f96048 100644 --- a/pkgs/http/pubspec.yaml +++ b/pkgs/http/pubspec.yaml @@ -1,18 +1,19 @@ name: http -version: 0.13.6-dev +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 environment: - sdk: '>=2.19.0 <3.0.0' + sdk: ^3.2.0 dependencies: async: ^2.5.0 http_parser: ^4.0.0 meta: ^1.3.0 + web: '>=0.3.0 <0.5.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/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/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/pkgs/http/test/http_retry_test.dart b/pkgs/http/test/http_retry_test.dart index da51154c4a..a7eff9d05f 100644 --- a/pkgs/http/test/http_retry_test.dart +++ b/pkgs/http/test/http_retry_test.dart @@ -53,9 +53,9 @@ void main() { MockClient(expectAsync1((request) async { count++; return Response('', 503, - headers: {'retry': count < 2 ? 'true' : 'false'}); + headers: Headers({'retry': count < 2 ? 'true' : 'false'})); }, count: 2)), - when: (response) => response.headers['retry'] == 'true', + when: (response) => response.headers.get('retry') == 'true', delay: (_) => Duration.zero); final response = await client.get(Uri.http('example.org', '')); @@ -217,7 +217,7 @@ void main() { final request = Request('POST', Uri.http('example.org', '')) ..body = 'hello' ..followRedirects = false - ..headers['foo'] = 'bar' + ..headers.append('foo', 'bar') ..maxRedirects = 12 ..persistentConnection = false; @@ -228,7 +228,7 @@ void main() { test('async when, whenError and onRetry', () async { final client = RetryClient( MockClient(expectAsync1( - (request) async => request.headers['Authorization'] != null + (request) async => request.headers.get('Authorization') != null ? Response('', 200) : Response('', 401), count: 2)), @@ -245,7 +245,7 @@ void main() { onRetry: (request, response, retryCount) async { expect(response?.statusCode, equals(401)); await Future.delayed(const Duration(milliseconds: 500)); - request.headers['Authorization'] = 'Bearer TOKEN'; + request.headers.set('Authorization', 'Bearer TOKEN'); }, ); 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/test/io/client_test.dart b/pkgs/http/test/io/client_test.dart index e493931802..c8aac64aa2 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'; @@ -37,20 +38,19 @@ void main() { 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'; + ..headers + .set(HttpHeaders.contentTypeHeader, 'application/json; charset=utf-8') + ..headers.set(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; expect(response.request, equals(request)); expect(response.statusCode, equals(200)); - expect(response.headers['single'], equals('value')); + expect(response.headers.get('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. @@ -76,20 +76,19 @@ void main() { 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'; + ..headers + .set(HttpHeaders.contentTypeHeader, 'application/json; charset=utf-8') + ..headers.set(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; expect(response.request, equals(request)); expect(response.statusCode, equals(200)); - expect(response.headers['single'], equals('value')); + expect(response.headers.get('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. @@ -115,10 +114,18 @@ void main() { var client = http.Client(); var url = Uri.http('http.invalid', ''); var request = http.StreamedRequest('POST', url); - request.headers[HttpHeaders.contentTypeHeader] = - 'application/json; charset=utf-8'; + request.headers + .set(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(); diff --git a/pkgs/http/test/io/http_test.dart b/pkgs/http/test/io/http_test.dart index 3f9aad815e..37ff7eebae 100644 --- a/pkgs/http/test/io/http_test.dart +++ b/pkgs/http/test/io/http_test.dart @@ -38,9 +38,9 @@ void main() { test('get', () async { var response = await http.get(serverUrl, headers: { - 'X-Random-Header': 'Value', - 'X-Other-Header': 'Other Value', - 'User-Agent': 'Dart' + 'X-Random-Header': ['Value'], + 'X-Other-Header': ['Other Value'], + 'User-Agent': ['Dart'] }); expect(response.statusCode, equals(200)); expect( @@ -65,10 +65,10 @@ void main() { 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' + 'X-Random-Header': ['Value'], + 'X-Other-Header': ['Other Value'], + 'Content-Type': ['text/plain'], + 'User-Agent': ['Dart'] }); expect(response.statusCode, equals(200)); expect( @@ -90,9 +90,9 @@ void main() { test('post with string', () async { var response = await http.post(serverUrl, headers: { - 'X-Random-Header': 'Value', - 'X-Other-Header': 'Other Value', - 'User-Agent': 'Dart' + 'X-Random-Header': ['Value'], + 'X-Other-Header': ['Other Value'], + 'User-Agent': ['Dart'] }, body: 'request body'); expect(response.statusCode, equals(200)); @@ -115,9 +115,9 @@ void main() { test('post with bytes', () async { var response = await http.post(serverUrl, headers: { - 'X-Random-Header': 'Value', - 'X-Other-Header': 'Other Value', - 'User-Agent': 'Dart' + 'X-Random-Header': ['Value'], + 'X-Other-Header': ['Other Value'], + 'User-Agent': ['Dart'] }, body: [ 104, 101, @@ -144,9 +144,9 @@ void main() { test('post with fields', () async { var response = await http.post(serverUrl, headers: { - 'X-Random-Header': 'Value', - 'X-Other-Header': 'Other Value', - 'User-Agent': 'Dart' + 'X-Random-Header': ['Value'], + 'X-Other-Header': ['Other Value'], + 'User-Agent': ['Dart'] }, body: { 'some-field': 'value', 'other-field': 'other value' @@ -180,10 +180,10 @@ void main() { 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' + 'X-Random-Header': ['Value'], + 'X-Other-Header': ['Other Value'], + 'Content-Type': ['text/plain'], + 'User-Agent': ['Dart'] }); expect(response.statusCode, equals(200)); expect( @@ -205,9 +205,9 @@ void main() { test('put with string', () async { var response = await http.put(serverUrl, headers: { - 'X-Random-Header': 'Value', - 'X-Other-Header': 'Other Value', - 'User-Agent': 'Dart' + 'X-Random-Header': ['Value'], + 'X-Other-Header': ['Other Value'], + 'User-Agent': ['Dart'] }, body: 'request body'); expect(response.statusCode, equals(200)); @@ -230,9 +230,9 @@ void main() { test('put with bytes', () async { var response = await http.put(serverUrl, headers: { - 'X-Random-Header': 'Value', - 'X-Other-Header': 'Other Value', - 'User-Agent': 'Dart' + 'X-Random-Header': ['Value'], + 'X-Other-Header': ['Other Value'], + 'User-Agent': ['Dart'] }, body: [ 104, 101, @@ -259,9 +259,9 @@ void main() { test('put with fields', () async { var response = await http.put(serverUrl, headers: { - 'X-Random-Header': 'Value', - 'X-Other-Header': 'Other Value', - 'User-Agent': 'Dart' + 'X-Random-Header': ['Value'], + 'X-Other-Header': ['Other Value'], + 'User-Agent': ['Dart'] }, body: { 'some-field': 'value', 'other-field': 'other value' @@ -295,10 +295,10 @@ void main() { 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' + 'X-Random-Header': ['Value'], + 'X-Other-Header': ['Other Value'], + 'Content-Type': ['text/plain'], + 'User-Agent': ['Dart'] }); expect(response.statusCode, equals(200)); expect( @@ -320,9 +320,9 @@ void main() { test('patch with string', () async { var response = await http.patch(serverUrl, headers: { - 'X-Random-Header': 'Value', - 'X-Other-Header': 'Other Value', - 'User-Agent': 'Dart' + 'X-Random-Header': ['Value'], + 'X-Other-Header': ['Other Value'], + 'User-Agent': ['Dart'] }, body: 'request body'); expect(response.statusCode, equals(200)); @@ -345,9 +345,9 @@ void main() { test('patch with bytes', () async { var response = await http.patch(serverUrl, headers: { - 'X-Random-Header': 'Value', - 'X-Other-Header': 'Other Value', - 'User-Agent': 'Dart' + 'X-Random-Header': ['Value'], + 'X-Other-Header': ['Other Value'], + 'User-Agent': ['Dart'] }, body: [ 104, 101, @@ -374,9 +374,9 @@ void main() { test('patch with fields', () async { var response = await http.patch(serverUrl, headers: { - 'X-Random-Header': 'Value', - 'X-Other-Header': 'Other Value', - 'User-Agent': 'Dart' + 'X-Random-Header': ['Value'], + 'X-Other-Header': ['Other Value'], + 'User-Agent': ['Dart'] }, body: { 'some-field': 'value', 'other-field': 'other value' @@ -403,9 +403,9 @@ void main() { test('delete', () async { var response = await http.delete(serverUrl, headers: { - 'X-Random-Header': 'Value', - 'X-Other-Header': 'Other Value', - 'User-Agent': 'Dart' + 'X-Random-Header': ['Value'], + 'X-Other-Header': ['Other Value'], + 'User-Agent': ['Dart'] }); expect(response.statusCode, equals(200)); expect( @@ -431,9 +431,9 @@ void main() { test('read', () async { var response = await http.read(serverUrl, headers: { - 'X-Random-Header': 'Value', - 'X-Other-Header': 'Other Value', - 'User-Agent': 'Dart' + 'X-Random-Header': ['Value'], + 'X-Other-Header': ['Other Value'], + 'User-Agent': ['Dart'] }); expect( response, @@ -461,9 +461,9 @@ void main() { test('readBytes', () async { var bytes = await http.readBytes(serverUrl, headers: { - 'X-Random-Header': 'Value', - 'X-Other-Header': 'Other Value', - 'User-Agent': 'Dart' + 'X-Random-Header': ['Value'], + 'X-Other-Header': ['Other Value'], + 'User-Agent': ['Dart'] }); expect( diff --git a/pkgs/http/test/io/request_test.dart b/pkgs/http/test/io/request_test.dart index ac6b44c3fd..d18f75a26e 100644 --- a/pkgs/http/test/io/request_test.dart +++ b/pkgs/http/test/io/request_test.dart @@ -19,7 +19,7 @@ void main() { test('send happy case', () async { final request = http.Request('GET', serverUrl) ..body = 'hello' - ..headers['User-Agent'] = 'Dart'; + ..headers.set('user-agent', 'Dart'); final response = await request.send(); 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')); }); diff --git a/pkgs/http/test/mock_client_test.dart b/pkgs/http/test/mock_client_test.dart index db561c51d6..d261d772d8 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'; @@ -14,7 +15,8 @@ void main() { test('handles a request', () async { var client = MockClient((request) async => http.Response( json.encode(request.bodyFields), 200, - request: request, headers: {'content-type': 'application/json'})); + request: request, + headers: http.Headers({'content-type': 'application/json'}))); var response = await client.post(Uri.http('example.com', '/foo'), body: {'field1': 'value1', 'field2': 'value2'}); @@ -43,4 +45,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')); + }); } diff --git a/pkgs/http/test/request_test.dart b/pkgs/http/test/request_test.dart index 59cb0988c5..e49e45c27a 100644 --- a/pkgs/http/test/request_test.dart +++ b/pkgs/http/test/request_test.dart @@ -44,7 +44,7 @@ void main() { test('is based on the content-type charset if it exists', () { var request = http.Request('POST', dummyUrl); - request.headers['Content-Type'] = 'text/plain; charset=iso-8859-1'; + request.headers.set('Content-Type', 'text/plain; charset=iso-8859-1'); expect(request.encoding.name, equals(latin1.name)); }); @@ -52,17 +52,17 @@ void main() { () { var request = http.Request('POST', dummyUrl) ..encoding = latin1 - ..headers['Content-Type'] = 'text/plain; charset=utf-8'; + ..headers.set('Content-Type', 'text/plain; charset=utf-8'); expect(request.encoding.name, equals(utf8.name)); - request.headers.remove('Content-Type'); + request.headers.delete('Content-Type'); expect(request.encoding.name, equals(latin1.name)); }); test('throws an error if the content-type charset is unknown', () { var request = http.Request('POST', dummyUrl); - request.headers['Content-Type'] = - 'text/plain; charset=not-a-real-charset'; + request.headers + .set('Content-Type', 'text/plain; charset=not-a-real-charset'); expect(() => request.encoding, throwsFormatException); }); }); @@ -125,7 +125,7 @@ void main() { test("can't be read with the wrong content-type", () { var request = http.Request('POST', dummyUrl); - request.headers['Content-Type'] = 'text/plain'; + request.headers.set('Content-Type', 'text/plain'); expect(() => request.bodyFields, throwsStateError); }); @@ -341,3 +341,9 @@ void main() { }); }); } + +extension on http.Headers { + void operator []=(String name, String value) => set(name, value); + + String? operator [](String name) => get(name); +} diff --git a/pkgs/http/test/response_test.dart b/pkgs/http/test/response_test.dart index 38061c1ef4..d7c939f0f2 100644 --- a/pkgs/http/test/response_test.dart +++ b/pkgs/http/test/response_test.dart @@ -24,7 +24,8 @@ void main() { test('respects the inferred encoding', () { var response = http.Response('föøbãr', 200, - headers: {'content-type': 'text/plain; charset=iso-8859-1'}); + headers: + http.Headers({'content-type': 'text/plain; charset=iso-8859-1'})); expect(response.bodyBytes, equals([102, 246, 248, 98, 227, 114])); }); }); @@ -42,7 +43,8 @@ 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'}); + headers: + http.Headers({'content-type': 'text/plain; charset=iso-8859-1'})); expect(response.body, equals('föøbãr')); }); }); diff --git a/pkgs/http/test/utils.dart b/pkgs/http/test/utils.dart index d4c319f73f..38759d276e 100644 --- a/pkgs/http/test/utils.dart +++ b/pkgs/http/test/utils.dart @@ -91,7 +91,7 @@ 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 contentType = MediaType.parse(item.headers.get('content-type')!); var boundary = contentType.parameters['boundary']!; var expected = cleanUpLiteral(_pattern) .replaceAll('\n', '\r\n') 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/http_client_conformance_tests.dart b/pkgs/http_client_conformance_tests/lib/http_client_conformance_tests.dart index 3500bf8df2..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,9 +12,11 @@ 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'; +import 'src/response_status_line_tests.dart'; import 'src/server_errors_test.dart'; export 'src/close_tests.dart' show testClose; @@ -26,9 +28,11 @@ 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; +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]. @@ -47,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); @@ -63,7 +73,9 @@ void testAll(Client Function() clientFactory, testResponseBodyStreamed(clientFactory(), canStreamResponseBody: canStreamResponseBody); testRequestHeaders(clientFactory()); + testRequestMethods(clientFactory(), preservesMethodCase: preservesMethodCase); testResponseHeaders(clientFactory()); + testResponseStatusLine(clientFactory()); testRedirect(clientFactory(), redirectAlwaysAllowed: redirectAlwaysAllowed); testServerErrors(clientFactory()); testCompressedResponseBody(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 index 040b338bf6..39324ad7c6 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) { @@ -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 3ce871bc21..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 @@ -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. @@ -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 b4ac8b2393..1723ab549c 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( @@ -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 be9c4d9722..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 @@ -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. @@ -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 6be306c787..47a77a7dbf 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. /// @@ -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)); @@ -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; @@ -51,9 +60,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')) 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_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 1f6c5b58b3..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 @@ -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. @@ -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)); @@ -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..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 @@ -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 @@ -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}'; + host = 'localhost:${await httpServerQueue.nextAsInt}'; }); - 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,172 @@ 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() 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'; + 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'); }); } 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 8adf98c9c7..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 @@ -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 { @@ -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.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..fa25735917 --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/src/request_methods_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_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); + 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..f9c924e217 --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/src/request_methods_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_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..802f57eb84 --- /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.js_interop) '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.nextAsInt}'; + }); + 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); + }); + }); +} 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 28686fa553..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 @@ -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. @@ -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 91ee549736..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 @@ -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. /// @@ -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.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_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 9b2c262c3d..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 @@ -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 { @@ -20,28 +20,60 @@ 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 { - 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'}); - - final response = await client.get(Uri.http(host, '')); + 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, '')); 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, '')); + 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', '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 +82,101 @@ 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())); + }); + }); + + 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(' '))); + }); }); }); } 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..f27aca8896 --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/src/response_status_line_server.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: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, + '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(); + 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..053bd111a9 --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/src/response_status_line_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_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); + 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..d70a325a50 --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/src/response_status_line_server_web.dart @@ -0,0 +1,12 @@ +// 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_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..6eb70c518b --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/src/response_status_line_tests.dart @@ -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 '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.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'). +/// +/// Clients behavior varies considerably if the status line is not valid. +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.nextAsInt}'; + }); + + 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')); + }); + }); +} 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 65de499e56..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 @@ -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}) { @@ -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(); +} diff --git a/pkgs/http_client_conformance_tests/pubspec.yaml b/pkgs/http_client_conformance_tests/pubspec.yaml index 6265c08313..520f1311b0 100644 --- a/pkgs/http_client_conformance_tests/pubspec.yaml +++ b/pkgs/http_client_conformance_tests/pubspec.yaml @@ -2,18 +2,19 @@ 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: '>=2.19.0 <3.0.0' + sdk: ^3.0.0 dependencies: async: ^2.8.2 dart_style: ^2.2.3 - http: ^0.13.4 + 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/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..1b5891e2c1 --- /dev/null +++ b/pkgs/http_profile/pubspec.yaml @@ -0,0 +1,16 @@ +name: http_profile +description: >- + 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 + +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/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 diff --git a/pkgs/java_http/.gitignore b/pkgs/java_http/.gitignore new file mode 100644 index 0000000000..28e4a6c94b --- /dev/null +++ b/pkgs/java_http/.gitignore @@ -0,0 +1,3 @@ +build/ +.flutter-plugins +.flutter-plugins-dependencies 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/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/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/jnigen.yaml b/pkgs/java_http/jnigen.yaml new file mode 100644 index 0000000000..a99320fc26 --- /dev/null +++ b/pkgs/java_http/jnigen.yaml @@ -0,0 +1,21 @@ +# 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 new file mode 100644 index 0000000000..743aa40223 --- /dev/null +++ b/pkgs/java_http/lib/java_http.dart @@ -0,0 +1,6 @@ +// 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 new file mode 100644 index 0000000000..379c640b1d --- /dev/null +++ b/pkgs/java_http/lib/src/java_client.dart @@ -0,0 +1,291 @@ +// 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 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/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/InputStream.dart b/pkgs/java_http/lib/src/third_party/java/io/InputStream.dart new file mode 100644 index 0000000000..3b930d49cd --- /dev/null +++ b/pkgs/java_http/lib/src/third_party/java/io/InputStream.dart @@ -0,0 +1,226 @@ +// 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 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 new file mode 100644 index 0000000000..a25d6e85d2 --- /dev/null +++ b/pkgs/java_http/lib/src/third_party/java/io/_package.dart @@ -0,0 +1,3 @@ +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 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 new file mode 100644 index 0000000000..3c6e5e6ba6 --- /dev/null +++ b/pkgs/java_http/lib/src/third_party/java/net/URL.dart @@ -0,0 +1,403 @@ +// 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 new file mode 100644 index 0000000000..6dd56e1df9 --- /dev/null +++ b/pkgs/java_http/lib/src/third_party/java/net/URLConnection.dart @@ -0,0 +1,836 @@ +// 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 new file mode 100644 index 0000000000..f52baa0ff1 --- /dev/null +++ b/pkgs/java_http/lib/src/third_party/java/net/_package.dart @@ -0,0 +1,3 @@ +export "HttpURLConnection.dart"; +export "URL.dart"; +export "URLConnection.dart"; diff --git a/pkgs/java_http/pubspec.yaml b/pkgs/java_http/pubspec.yaml new file mode 100644 index 0000000000..c04429a993 --- /dev/null +++ b/pkgs/java_http/pubspec.yaml @@ -0,0 +1,23 @@ +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: ^2.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 new file mode 100644 index 0000000000..c6e769ca6f --- /dev/null +++ b/pkgs/java_http/test/java_client_test.dart @@ -0,0 +1,20 @@ +// 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); + }); +} diff --git a/tool/ci.sh b/tool/ci.sh index 2885a5827d..d4cc8d2ee6 100755 --- a/tool/ci.sh +++ b/tool/ci.sh @@ -1,9 +1,10 @@ #!/bin/bash -# Created with package:mono_repo v6.5.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 @@ -67,11 +63,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,14 +83,22 @@ 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=$? ;; + 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